Build Cross SDKs for 6.1 rhel-ubi9 #56
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.0.3' | |
| 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.0.3' }} | |
| DISTRIBUTION: ${{ inputs.distribution || 'debian-bookworm' }} | |
| SDK_GENERATOR_DIR: swift-sdk-generator | |
| TEST_PROJECT: test-project | |
| jobs: | |
| common-dependencies-amd64: | |
| name: Common Dependencies (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 }} | |
| common-dependencies-arm64: | |
| name: Common Dependencies (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: [common-dependencies-amd64] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Restore Common Dependencies | |
| uses: actions/cache/restore@v4 | |
| with: | |
| key: common-dependencies | |
| 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 | |
| target-binutils: x86-64-linux-gnu | |
| build-test-aarch64: | |
| name: Build & Test SDK (aarch64) | |
| runs-on: ubuntu-24.04-arm | |
| needs: [common-dependencies-arm64] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Restore Common Dependencies | |
| 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 | |
| target-binutils: aarch64-linux-gnu | |
| build-test-armv7: | |
| name: Build & Test SDK (armv7) | |
| runs-on: ubuntu-24.04 | |
| needs: [common-dependencies-amd64] | |
| if: ${{ inputs.distribution != 'rhel-ubi9' }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Restore Common Dependencies | |
| 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 | |
| target-binutils: arm-linux-gnueabihf |