Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 25 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ tools/benchmarks/.build/
# Local session rules, kept on disk only
CLAUDE.md
.claude/
/Package.resolved
15 changes: 0 additions & 15 deletions Package.resolved

This file was deleted.

Loading