Skip to content

Commit

Permalink
Enable GitHub Linux/Arm runners in CI
Browse files Browse the repository at this point in the history
GitHub made Linux Arm 64-bit runners available:
https://github.blog/changelog/2025-01-16-linux-arm64-hosted-runners-now-available-for-free-in-public-repositories-public-preview/.
Run regression tests on those and build release packages.
  • Loading branch information
tautschnig committed Jan 17, 2025
1 parent 6f70c7d commit db88e5f
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/kani.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-13, ubuntu-20.04, ubuntu-22.04, ubuntu-24.04, macos-14]
os: [macos-13, ubuntu-20.04, ubuntu-22.04, ubuntu-24.04, macos-14, ubuntu-24.04-arm]
steps:
- name: Checkout Kani
uses: actions/checkout@v4
Expand Down
46 changes: 40 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,36 @@ jobs:
os: linux
arch: x86_64-unknown-linux-gnu

build_bundle_linux_arm:
name: BuildBundle-Linux-Arm
runs-on: ubuntu-24.04-arm
outputs:
version: ${{ steps.bundle.outputs.version }}
bundle: ${{ steps.bundle.outputs.bundle }}
package: ${{ steps.bundle.outputs.package }}
crate_version: ${{ steps.bundle.outputs.crate_version }}
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Kani Dependencies
uses: ./.github/actions/setup
with:
os: ubuntu-24.04-arm

- name: Build bundle
id: bundle
uses: ./.github/actions/build-bundle
with:
os: linux
arch: aarch64-unknown-linux-gnu

test-use-local-toolchain:
name: TestLocalToolchain
needs: [build_bundle_macos, build_bundle_linux]
needs: [build_bundle_macos, build_bundle_linux, build_bundle_linux_arm]
strategy:
matrix:
os: [macos-13, ubuntu-20.04, ubuntu-22.04, ubuntu-24.04]
os: [macos-13, ubuntu-20.04, ubuntu-22.04, ubuntu-24.04, ubuntu-24.04-arm]
include:
- os: macos-13
rust_target: x86_64-apple-darwin
Expand All @@ -111,6 +135,9 @@ jobs:
- os: ubuntu-24.04
rust_target: x86_64-unknown-linux-gnu
prev_job: ${{ needs.build_bundle_linux.outputs }}
- os: ubuntu-24.04-arm
rust_target: aarch64-unknown-linux-gnu
prev_job: ${{ needs.build_bundle_linux_arm.outputs }}
runs-on: ${{ matrix.os }}
steps:
- name: Download bundle
Expand Down Expand Up @@ -197,15 +224,17 @@ jobs:
test_bundle:
name: TestBundle
needs: [build_bundle_macos, build_bundle_linux]
needs: [build_bundle_macos, build_bundle_linux, build_bundle_linux_arm]
strategy:
matrix:
os: [macos-13, ubuntu-20.04, ubuntu-22.04, ubuntu-24.04]
os: [macos-13, ubuntu-20.04, ubuntu-22.04, ubuntu-24.04, ubuntu-24.04-arm]
include:
# Stores the output of the previous job conditional to the OS
- prev_job: ${{ needs.build_bundle_linux.outputs }}
- os: macos-13
prev_job: ${{ needs.build_bundle_macos.outputs }}
- os: ubuntu-24.04-arm
prev_job: ${{ needs.build_bundle_linux_arm.outputs }}
runs-on: ${{ matrix.os }}
steps:
- name: Download bundle
Expand Down Expand Up @@ -245,7 +274,7 @@ jobs:
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/kani-') }}
name: Release
runs-on: ubuntu-20.04
needs: [build_bundle_macos, build_bundle_macos_aarch64, build_bundle_linux, test_bundle]
needs: [build_bundle_macos, build_bundle_macos_aarch64, build_bundle_linux, build_bundle_linux_arm, test_bundle]
outputs:
version: ${{ steps.versioning.outputs.version }}
upload_url: ${{ steps.create_release.outputs.upload_url }}
Expand Down Expand Up @@ -285,6 +314,11 @@ jobs:
with:
name: ${{ needs.build_bundle_linux.outputs.bundle }}

- name: Download Linux Arm bundle
uses: actions/download-artifact@v4
with:
name: ${{ needs.build_bundle_linux_arm.outputs.bundle }}

- name: Create release
id: create_release
uses: ncipollo/release-action@v1.15.0
Expand All @@ -293,7 +327,7 @@ jobs:
with:
name: kani-${{ env.TAG_VERSION }}
tag: kani-${{ env.TAG_VERSION }}
artifacts: "${{ needs.build_bundle_linux.outputs.bundle }},${{ needs.build_bundle_macos.outputs.bundle }},${{ needs.build_bundle_macos_aarch64.outputs.bundle }}"
artifacts: "${{ needs.build_bundle_linux.outputs.bundle }},${{ needs.build_bundle_linux_arm.outputs.bundle }},${{ needs.build_bundle_macos.outputs.bundle }},${{ needs.build_bundle_macos_aarch64.outputs.bundle }}"
body: |
Kani Rust verifier release bundle version ${{ env.TAG_VERSION }}.
draft: true
Expand Down

0 comments on commit db88e5f

Please sign in to comment.