Build Cross SDKs for 6.2.1 debian-bookworm #67
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
| # The purpose of this CI is to build and test Linux Cross SDKs during development. | |
| # Only a single version of the SDK will be built for each architecture and tested. | |
| name: Develop Swift Linux Cross SDKs | |
| run-name: Build Cross SDKs for ${{ inputs.swift-version }} ${{ inputs.distribution }} | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| swift-version: | |
| description: 'Swift Version' | |
| required: true | |
| default: '6.2.1' | |
| type: string | |
| distribution: | |
| description: 'Distribution' | |
| required: true | |
| default: 'debian-bookworm' | |
| type: choice | |
| options: | |
| - ubuntu-focal | |
| - ubuntu-jammy | |
| - ubuntu-noble | |
| - debian-bullseye | |
| - debian-bookworm | |
| - rhel-ubi9 | |
| pull_request: | |
| branches: [ "main" ] | |
| env: | |
| SWIFT_VERSION: ${{ inputs.swift-version || '6.1.2' }} | |
| DISTRIBUTION: ${{ inputs.distribution || 'debian-bookworm' }} | |
| SDK_GENERATOR_DIR: swift-sdk-generator | |
| TEST_PROJECT: test-project | |
| jobs: | |
| sdk-generator-amd64: | |
| name: Swift SDK Generator (amd64) | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Dependencies | |
| shell: bash | |
| run: sudo apt install -y git-extras | |
| - name: Swift Version | |
| shell: bash | |
| run: swift --version | |
| - name: Common Dependencies Cache | |
| uses: actions/cache@v4 | |
| with: | |
| key: common-dependencies-amd64 | |
| path: | | |
| ${{ env.SDK_GENERATOR_DIR }} | |
| ${{ env.TEST_PROJECT }}/.build | |
| - name: Build SDK Generator | |
| shell: bash | |
| run: ./build-generator.sh | |
| - name: Resolve Test Dependencies | |
| shell: bash | |
| run: swift package resolve --package-path ${{ env.TEST_PROJECT }} | |
| sdk-generator-arm64: | |
| name: Swift SDK Generator (arm64) | |
| runs-on: ubuntu-24.04-arm | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Dependencies | |
| shell: bash | |
| run: sudo apt install -y git-extras | |
| - name: Swift Version | |
| shell: bash | |
| run: swift --version | |
| - name: Common Dependencies Cache | |
| uses: actions/cache@v4 | |
| with: | |
| key: common-dependencies-arm64 | |
| path: | | |
| ${{ env.SDK_GENERATOR_DIR }} | |
| ${{ env.TEST_PROJECT }}/.build | |
| - name: Build SDK Generator | |
| shell: bash | |
| run: ./build-generator.sh | |
| - name: Resolve Test Dependencies | |
| shell: bash | |
| run: swift package resolve --package-path ${{ env.TEST_PROJECT }} | |
| build-test-x86_64: | |
| name: Build & Test SDK (x86_64) | |
| runs-on: ubuntu-24.04 | |
| needs: [sdk-generator-amd64] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Restore Swift SDK Generator | |
| uses: actions/cache/restore@v4 | |
| with: | |
| key: common-dependencies-amd64 | |
| path: | | |
| ${{ env.SDK_GENERATOR_DIR }} | |
| ${{ env.TEST_PROJECT }}/.build | |
| fail-on-cache-miss: true | |
| - uses: ./.github/actions/build-and-test-sdk | |
| name: Build, Test, Publish ${{ env.SWIFT_VERSION }} for ${{ env.DISTRIBUTION }} | |
| with: | |
| swift-version: ${{ env.SWIFT_VERSION }} | |
| distribution: ${{ env.DISTRIBUTION }} | |
| target-arch: x86_64 | |
| build-test-aarch64: | |
| name: Build & Test SDK (aarch64) | |
| runs-on: ubuntu-24.04-arm | |
| needs: [sdk-generator-arm64] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Restore Swift SDK Generator | |
| uses: actions/cache/restore@v4 | |
| with: | |
| key: common-dependencies-arm64 | |
| path: | | |
| ${{ env.SDK_GENERATOR_DIR }} | |
| ${{ env.TEST_PROJECT }}/.build | |
| fail-on-cache-miss: true | |
| - uses: ./.github/actions/build-and-test-sdk | |
| name: Build, Test, Publish ${{ env.SWIFT_VERSION }} for ${{ env.DISTRIBUTION }} | |
| with: | |
| swift-version: ${{ env.SWIFT_VERSION }} | |
| distribution: ${{ env.DISTRIBUTION }} | |
| target-arch: aarch64 | |
| build-test-armv7: | |
| name: Build & Test SDK (armv7) | |
| runs-on: ubuntu-24.04 | |
| needs: [sdk-generator-amd64] | |
| if: ${{ inputs.distribution != 'rhel-ubi9' }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Restore Swift SDK Generator | |
| uses: actions/cache/restore@v4 | |
| with: | |
| key: common-dependencies-amd64 | |
| path: | | |
| ${{ env.SDK_GENERATOR_DIR }} | |
| ${{ env.TEST_PROJECT }}/.build | |
| fail-on-cache-miss: true | |
| - uses: ./.github/actions/build-and-test-sdk | |
| name: Build, Test, Publish ${{ env.SWIFT_VERSION }} for ${{ env.DISTRIBUTION }} | |
| with: | |
| swift-version: ${{ env.SWIFT_VERSION }} | |
| distribution: ${{ env.DISTRIBUTION }} | |
| target-arch: armv7 | |