Add support for building release for Raspi OS versions, armv6 and armv7 #12
Workflow file for this run
This file contains 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: Build Swift Release | |
on: | |
push: | |
branches: [ "feature/**" ] | |
release: | |
types: [published] | |
env: | |
SWIFT_VERSION: 6.0.3 | |
SWIFT_TAG: swift-6.0.3-RELEASE | |
SWIFT_WORKSPACE_CACHE: swift-workspace | |
jobs: | |
fetch-sources: | |
name: Fetch Swift Sources | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/checkout-swift | |
name: "Restore or Checkout ${{ env.SWIFT_VERSION }}" | |
with: | |
swift-tag: ${{ env.SWIFT_TAG }} | |
swift-workspace-cache: ${{ env.SWIFT_WORKSPACE_CACHE }} | |
build-for-distribution: | |
strategy: | |
matrix: | |
distribution: [ | |
"debian-bullseye", | |
"debian-bookworm", | |
"ubuntu-focal", | |
"ubuntu-jammy", | |
"ubuntu-noble" | |
] | |
name: Build Swift | |
runs-on: ubuntu-latest | |
needs: [fetch-sources] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Generate Builder Container | |
shell: bash | |
run: | | |
source ./swift-builder/swift-builder-common | |
./swift-builder/build-container.sh | |
- uses: ./.github/actions/build-for-distribution | |
name: "Build & Publish Swift ${{ env.SWIFT_VERSION }}" | |
with: | |
swift-tag: ${{ env.SWIFT_TAG }} | |
swift-workspace-cache: ${{ env.SWIFT_WORKSPACE_CACHE }} | |
swift-target-arch: armv7 | |
distribution: ${{ matrix.distribution }} | |
builder-tag: ${{ env.SWIFT_VERSION }} | |
- name: Update Release ${{ env.SWIFT_VERSION }} | |
uses: ncipollo/release-action@v1 | |
with: | |
allowUpdates: true | |
name: Swift ${{ env.SWIFT_VERSION }} for armv7 | |
tag: ${{ env.SWIFT_VERSION }} | |
commit: ${{ github.sha }} | |
artifactErrorsFailBuild: true | |
artifacts: "*.tar.gz" | |
body: "See the [README](https://github.com/xtremekforever/swift-armv7#continuous-integration) for more information on build artifacts." | |
build-for-raspios: | |
strategy: | |
matrix: | |
distribution: [ | |
"raspios-bullseye", | |
"raspios-bookworm" | |
] | |
swift-target-arch: ["armv6", "armv7"] | |
name: Build for RaspiOS | |
runs-on: ubuntu-latest | |
needs: [fetch-sources] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Generate Builder Container | |
shell: bash | |
run: | | |
source ./swift-builder/swift-builder-common | |
./swift-builder/build-container.sh | |
- uses: ./.github/actions/build-for-distribution | |
name: "Build & Publish Swift ${{ env.SWIFT_VERSION }}" | |
with: | |
swift-tag: ${{ env.SWIFT_TAG }} | |
swift-workspace-cache: ${{ env.SWIFT_WORKSPACE_CACHE }} | |
swift-target-arch: ${{ matrix.swift-target-arch }} | |
distribution: ${{ matrix.distribution }} | |
builder-tag: ${{ env.SWIFT_VERSION }} | |
- name: Update Release ${{ env.SWIFT_VERSION }} | |
uses: ncipollo/release-action@v1 | |
with: | |
allowUpdates: true | |
name: Swift ${{ env.SWIFT_VERSION }} for armv6/armv7 | |
tag: ${{ env.SWIFT_VERSION }} | |
commit: ${{ github.sha }} | |
artifactErrorsFailBuild: true | |
artifacts: "*.tar.gz" | |
body: "See the [README](https://github.com/xtremekforever/swift-armv7#continuous-integration) for more information on build artifacts." |