sdk-install-exercise #18
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: sdk-install-exercise | |
| on: | |
| push: | |
| branches: [ main ] | |
| tags: "[0-9]+.[0-9]+.[0-9]+" | |
| schedule: | |
| - cron: '0 0 * * *' | |
| workflow_dispatch: | |
| pull_request: | |
| jobs: | |
| ci: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: ['macos-15', 'macos-15-intel', 'macos-26', 'ubuntu-latest'] | |
| swift-android-sdk-version: ['6.2', 'nightly-6.3', 'nightly-main'] | |
| setup-sdk: ['false', 'true'] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: skiptools/actions/setup-skip@main | |
| with: | |
| verbose: true | |
| install-swift-android-sdk: ${{ matrix.setup-sdk }} | |
| swift-android-sdk-version: ${{ matrix.swift-android-sdk-version }} | |
| # alternative to setting up the SDK | |
| - uses: skiptools/swift-android-action@v2 | |
| if: ${{ matrix.setup-sdk == 'false' }} | |
| with: | |
| build-package: false | |
| install-swift-android-sdk: ${{ matrix.setup-sdk }} | |
| swift-version: ${{ matrix.swift-android-sdk-version }} | |
| - run: swift package init --name SwiftAndroidBuildDemo | |
| - run: | | |
| echo 'import Android' >> Sources/SwiftAndroidBuildDemo/SwiftAndroidBuildDemo.swift | |
| # workaround for skip android build toolchain location on Linux | |
| - run: mkdir -p ~/.swiftpm/toolchains | |
| - run: skip android build --verbose --arch x86_64 | |
| - run: skip android build --verbose --arch aarch64 | |
| - run: skip android build --verbose --arch armv7 | |