From 4ceffd095b0c97aa06da6fe99ca9379820050a5e Mon Sep 17 00:00:00 2001 From: Alexander Schmutz Date: Tue, 1 Jul 2025 09:51:12 +0200 Subject: [PATCH] Create swift.yml --- .github/workflows/swift.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/swift.yml diff --git a/.github/workflows/swift.yml b/.github/workflows/swift.yml new file mode 100644 index 0000000..4e76d9d --- /dev/null +++ b/.github/workflows/swift.yml @@ -0,0 +1,37 @@ +name: swift-algorithms ci +on: + push: + branches: + - '*' + workflow_dispatch: + pull_request: + branches: + - '*' +jobs: + linux-android: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: "Test Swift Package on Linux" + run: swift test + - name: "Test Swift Package on Android" + uses: skiptools/swift-android-action@v2 + macos-ios: + runs-on: macos-latest + steps: + - uses: actions/checkout@v4 + - name: "Test Swift Package on macOS" + run: swift test + - name: "Test Swift Package on iOS" + run: xcodebuild test -sdk "iphonesimulator" -destination "platform=iOS Simulator,name=$(xcrun simctl list devices --json | jq -r '.devices | to_entries[] | .value[] | select(.availability == "(available)" or .isAvailable == true) | .name' | grep -E '^iPhone [0-9]+$' | sort -V | tail -n 1)" -scheme "$(xcodebuild -list -json | jq -r '.workspace.schemes[-1]')" + windows: + runs-on: windows-latest + steps: + - uses: actions/checkout@v4 + - name: "Setup Swift on Windows" + uses: compnerd/gha-setup-swift@main + with: + branch: swift-6.1-release + tag: 6.1-RELEASE + - name: "Test Swift Package on Windows" + run: swift test