diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4a9cc11..dcf0d06 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,9 +1,10 @@ -# DiffractoKit CI: the gate (`swift test -c release`), the consumer check, the README consumer and the example. +# DiffractoKit CI: the gate (`swift test -c release`), the consumer check, the README consumer, the example and an iOS +# Simulator build. # -# The package's floor is macOS 15 / iOS 18 (since 0.2.0) with tools 6.2; `macos-latest` -# is used with the newest Xcode on the image selected. On 2026-10-15 that was Xcode 26.6, whose compiler (not the local Swift -# 6.4) crashed in its SIL ownership verifier on `catch SomeError.someCase { ... }` clauses in the tests (run 38747583963): the -# tests therefore bind the error (`catch let caught as SomeError`) and match the case in the body. +# The package's floor is macOS 15 / iOS 18 (since 0.2.0) with tools 6.2; the macos-26 image with Xcode 26.6 is pinned below. +# Xcode 26.6's compiler crashed in its SIL ownership verifier on `catch SomeError.someCase { ... }` clauses in the tests +# (run 38747583963, 2026-10-15): the tests therefore bind the error (`catch let caught as SomeError`) and match the case in +# the body. Package.resolved is not tracked, so CI resolves the newest ImagoKit the manifest's range allows, as a consumer does. # # THE PINS' PYTHON ORACLES ARE NOT RUN HERE. The tests read committed fixtures (Tests/*/Fixtures/*.json, generated by # tools/*/pins.py against pymatgen 2026.9.24, pymatgen-core 2026.9.23, spglib 2.8.0, NumPy 2.5.4, SciPy 1.18.1 and py4DSTEM @@ -25,16 +26,19 @@ concurrency: group: ci-${{ github.ref }} cancel-in-progress: true +env: + # Pinned like the apps: the macos-26 image's Xcode 26.6 (Swift 6.3, macOS 26 SDK). Bump on purpose. + DEVELOPER_DIR: /Applications/Xcode_26.6.app/Contents/Developer + jobs: test: - runs-on: macos-latest + runs-on: macos-26 timeout-minutes: 90 steps: - uses: actions/checkout@v7 - - name: Select the newest Xcode + - name: Toolchain on record run: | - xcode=$(ls -d /Applications/Xcode*.app | sort -V | tail -1) - sudo xcode-select -s "$xcode" + xcode-select -p swift --version - name: Gate (swift test, release) run: swift test -c release @@ -47,6 +51,17 @@ jobs: swift build -c release --product diffracto-example "$(swift build -c release --show-bin-path)/diffracto-example" + post-merge: + name: iOS build (after merge) + # Not on pull requests: the free plan's macOS runners are scarce, so the extra builds run on main, tags and by hand. + if: github.event_name != 'pull_request' + runs-on: macos-26 + timeout-minutes: 90 + steps: + - uses: actions/checkout@v7 + - name: Build the libraries for iOS (Simulator, not run) + run: xcodebuild -scheme DiffractoKit-Package -destination 'generic/platform=iOS Simulator' -quiet build + version: name: CHANGELOG version matches the tag runs-on: ubuntu-latest @@ -74,7 +89,7 @@ jobs: name: Lint (shared SwiftLint and SwiftFormat config) runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - name: SwiftLint run: docker run --rm -v "$PWD:/work" -w /work --entrypoint swiftlint ghcr.io/realm/swiftlint:0.65.1 lint --strict --quiet - name: SwiftFormat diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 89df0ae..b2ae61a 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -2,7 +2,7 @@ # published to GitHub Pages at https://mac4dstem.github.io/DiffractoKit/documentation/ on every tag. # On a pull request the site is built and uploaded as an artifact only, so a broken catalog fails before the tag. # -# No swift-docc-plugin: the kit takes no package dependencies. `xcodebuild docbuild` builds the archives +# No swift-docc-plugin: the kit adds no dependency for its docs (its one package dependency is ImagoKit). `xcodebuild docbuild` builds the archives # from the package's own schemes; `docc merge` (Xcode 16+) joins them. Needs Pages enabled with source "GitHub Actions" # (repository Settings > Pages). Copied from CuboKit's pattern; the module list is read from the .docc catalogs. name: Docs @@ -23,16 +23,19 @@ concurrency: group: docs-${{ github.ref }} cancel-in-progress: true +env: + # Pinned like the apps: the macos-26 image's Xcode 26.6 (Swift 6.3, macOS 26 SDK). Bump on purpose. + DEVELOPER_DIR: /Applications/Xcode_26.6.app/Contents/Developer + jobs: build: - runs-on: macos-latest + runs-on: macos-26 timeout-minutes: 60 steps: - uses: actions/checkout@v7 - - name: Select the newest Xcode + - name: Toolchain on record run: | - xcode=$(ls -d /Applications/Xcode*.app | sort -V | tail -1) - sudo xcode-select -s "$xcode" + xcode-select -p xcodebuild -version - name: Build the site run: tools/build-docs.sh .docs-site /DiffractoKit diff --git a/.gitignore b/.gitignore index cbb0eff..5dcc0ad 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ tools/benchmarks/.build/ # Local session rules, kept on disk only CLAUDE.md .claude/ +/Package.resolved diff --git a/Package.resolved b/Package.resolved deleted file mode 100644 index 3247d08..0000000 --- a/Package.resolved +++ /dev/null @@ -1,15 +0,0 @@ -{ - "originHash" : "50c6c155fde616d95d664e60390bc3a98df42b7ca33b93d0821665b82325e57d", - "pins" : [ - { - "identity" : "imagokit", - "kind" : "remoteSourceControl", - "location" : "https://github.com/mac4DSTEM/ImagoKit", - "state" : { - "revision" : "2af2133b27b54043ffd6655ba2112edfce533f46", - "version" : "0.2.0" - } - } - ], - "version" : 3 -}