From 557b66664b930330ad1647cf95c06f7337c40780 Mon Sep 17 00:00:00 2001 From: Kabir Oberai Date: Sun, 24 May 2026 18:21:14 -0400 Subject: [PATCH 1/3] CI tests --- .github/actions/configure-xcode/action.yml | 9 +++++ .github/workflows/build.yml | 47 ++++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 .github/actions/configure-xcode/action.yml create mode 100644 .github/workflows/build.yml diff --git a/.github/actions/configure-xcode/action.yml b/.github/actions/configure-xcode/action.yml new file mode 100644 index 0000000..e809abb --- /dev/null +++ b/.github/actions/configure-xcode/action.yml @@ -0,0 +1,9 @@ +name: 'Configure Xcode' +description: 'Set up Xcode version' +runs: + using: composite + steps: + - name: Set up Xcode + shell: bash + run: | + sudo xcode-select -s /Applications/Xcode_26.4.app diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..300d4e9 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,47 @@ +on: + push: + branches: + - main + pull_request: +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true +jobs: + build-linux: + strategy: + fail-fast: false + matrix: + host: + - runner: ubuntu-24.04 + arch: x86_64 + - runner: ubuntu-24.04-arm + arch: aarch64 + runs-on: ${{ matrix.host.runner }} + steps: + - name: Checkout + uses: actions/checkout@v6 + - name: Build and test + run: | + docker run -v .:/work -w /work -it swift:6.3 swift test + build-macos: + runs-on: macos-26 + steps: + - name: Checkout + uses: actions/checkout@v6 + - uses: ./.github/actions/configure-xcode + - name: Build and test + run: | + swift test + build-ios: + runs-on: macos-26 + steps: + - name: Checkout + uses: actions/checkout@v6 + - uses: ./.github/actions/configure-xcode + - name: Build and test + run: | + set -o pipefail \ + && xcodebuild test \ + -skipMacroValidation -skipPackagePluginValidation \ + -scheme AssetKit -destination 'platform=iOS Simulator,name=iPhone 17,OS=latest' \ + | xcbeautify From 1c4a2d04cc267831111e29dd06b741c639b0c1e2 Mon Sep 17 00:00:00 2001 From: Kabir Oberai Date: Sun, 24 May 2026 18:22:50 -0400 Subject: [PATCH 2/3] Fixes --- .github/workflows/build.yml | 4 ++-- Tests/AssetKitTests/AssetKitTests.swift | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 300d4e9..caf923a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,7 +22,7 @@ jobs: uses: actions/checkout@v6 - name: Build and test run: | - docker run -v .:/work -w /work -it swift:6.3 swift test + docker run -v .:/work -w /work -t swift:6.3 swift test build-macos: runs-on: macos-26 steps: @@ -43,5 +43,5 @@ jobs: set -o pipefail \ && xcodebuild test \ -skipMacroValidation -skipPackagePluginValidation \ - -scheme AssetKit -destination 'platform=iOS Simulator,name=iPhone 17,OS=latest' \ + -scheme AssetKit -destination 'platform=iOS Simulator,name=iPhone 17,OS=latest,arch=arm64' \ | xcbeautify diff --git a/Tests/AssetKitTests/AssetKitTests.swift b/Tests/AssetKitTests/AssetKitTests.swift index 985bc9e..b6a7751 100644 --- a/Tests/AssetKitTests/AssetKitTests.swift +++ b/Tests/AssetKitTests/AssetKitTests.swift @@ -1,2 +1,4 @@ import Testing @testable import AssetKit + +@Test func example() {} From fbee23bc684707dee52739b8bcbdedce3fbe37c6 Mon Sep 17 00:00:00 2001 From: Kabir Oberai Date: Sun, 24 May 2026 18:27:19 -0400 Subject: [PATCH 3/3] changes --- .github/workflows/build.yml | 7 +++++-- Dockerfile | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 Dockerfile diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index caf923a..5fa51d9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,9 +20,12 @@ jobs: steps: - name: Checkout uses: actions/checkout@v6 - - name: Build and test + - name: Build image + run: | + docker build . -t assetkit + - name: Test run: | - docker run -v .:/work -w /work -t swift:6.3 swift test + docker run -v .:/work -w /work -t assetkit swift test build-macos: runs-on: macos-26 steps: diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..1bec9e4 --- /dev/null +++ b/Dockerfile @@ -0,0 +1 @@ +FROM swift:6.3