Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions .github/actions/build-bundle/action.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
# Copyright Kani Contributors
# SPDX-License-Identifier: Apache-2.0 OR MIT
name: Build bundle
description: "Build the Kani bundle for the current architecture and OS. The inputs must match the worker architecture."
description: "Build the Kani bundle for the current platform. The inputs must match the worker architecture."
inputs:
arch:
description: "Current architecture tuple"
os:
description: "Current operating system"
platform:
description: "Current platform tuple"
outputs:
version:
description: "The bundle version (latest or =crate_version)"
Expand Down Expand Up @@ -55,14 +53,14 @@ runs:
shell: bash
run: |
cargo bundle -- ${{ env.VERSION }}
echo "BUNDLE=kani-${{ env.VERSION }}-${{ inputs.arch }}.tar.gz" >> $GITHUB_ENV
echo "BUNDLE=kani-${{ env.VERSION }}-${{ inputs.platform }}.tar.gz" >> $GITHUB_ENV

- name: Build package
shell: bash
run: |
cargo package -p kani-verifier
mv target/package/kani-verifier-${{ env.CRATE_VERSION }}.crate ${{ inputs.os }}-kani-verifier.crate
echo "PKG=${{ inputs.os }}-kani-verifier.crate" >> $GITHUB_ENV
mv target/package/kani-verifier-${{ env.CRATE_VERSION }}.crate ${{ inputs.platform }}-kani-verifier.crate
echo "PKG=${{ inputs.platform }}-kani-verifier.crate" >> $GITHUB_ENV

- name: Upload bundle
uses: actions/upload-artifact@v4
Expand Down
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-22.04, ubuntu-24.04, macos-14]
os: [macos-13, ubuntu-22.04, ubuntu-24.04, macos-14, ubuntu-24.04-arm]
steps:
- name: Checkout Kani
uses: actions/checkout@v4
Expand Down
83 changes: 59 additions & 24 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true

jobs:
build_bundle_macos:
name: BuildBundle-MacOs
build_bundle_macos_x86_64:
name: BuildBundle-MacOs-x86_64
runs-on: macos-13
outputs:
version: ${{ steps.bundle.outputs.version }}
Expand All @@ -41,11 +41,10 @@ jobs:
id: bundle
uses: ./.github/actions/build-bundle
with:
os: macos-13
arch: x86_64-apple-darwin
platform: x86_64-apple-darwin

build_bundle_macos_aarch64:
name: BuildBundle-MacOs-ARM
name: BuildBundle-MacOs-aarch64
runs-on: macos-14
outputs:
version: ${{ steps.bundle.outputs.version }}
Expand All @@ -65,11 +64,10 @@ jobs:
id: bundle
uses: ./.github/actions/build-bundle
with:
os: macos-14
arch: aarch64-apple-darwin
platform: aarch64-apple-darwin

build_bundle_linux:
name: BuildBundle-Linux
build_bundle_linux_x86_64:
name: BuildBundle-Linux-x86_64
runs-on: ubuntu-22.04
outputs:
version: ${{ steps.bundle.outputs.version }}
Expand All @@ -89,25 +87,53 @@ jobs:
id: bundle
uses: ./.github/actions/build-bundle
with:
os: linux
arch: x86_64-unknown-linux-gnu
platform: x86_64-unknown-linux-gnu

build_bundle_linux_aarch64:
name: BuildBundle-Linux-aarch64
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:
platform: aarch64-unknown-linux-gnu

test-use-local-toolchain:
name: TestLocalToolchain
needs: [build_bundle_macos, build_bundle_linux]
needs: [build_bundle_macos_x86_64, build_bundle_macos_aarch64, build_bundle_linux, build_bundle_linux_arm]
strategy:
matrix:
os: [macos-13, ubuntu-22.04, ubuntu-24.04]
os: [macos-13, macos-14, ubuntu-22.04, ubuntu-24.04, ubuntu-24.04-arm]
include:
- os: macos-13
rust_target: x86_64-apple-darwin
prev_job: ${{ needs.build_bundle_macos.outputs }}
prev_job: ${{ needs.build_bundle_macos_x86_64.outputs }}
- os: macos-14
rust_target: aarch64-apple-darwin
prev_job: ${{ needs.build_bundle_macos_aarch64.outputs }}
- os: ubuntu-22.04
rust_target: x86_64-unknown-linux-gnu
prev_job: ${{ needs.build_bundle_linux.outputs }}
prev_job: ${{ needs.build_bundle_linux_x86_64.outputs }}
- os: ubuntu-24.04
rust_target: x86_64-unknown-linux-gnu
prev_job: ${{ needs.build_bundle_linux.outputs }}
prev_job: ${{ needs.build_bundle_linux_x86_64.outputs }}
- os: ubuntu-24.04-arm
rust_target: aarch64-unknown-linux-gnu
prev_job: ${{ needs.build_bundle_linux_aarch64.outputs }}
runs-on: ${{ matrix.os }}
steps:
- name: Download bundle
Expand Down Expand Up @@ -194,15 +220,19 @@ jobs:

test_bundle:
name: TestBundle
needs: [build_bundle_macos, build_bundle_linux]
needs: [build_bundle_macos_x86_64, build_bundle_macos_aarch64, build_bundle_linux_x86_64, build_bundle_linux_aarch64]
strategy:
matrix:
os: [macos-13, ubuntu-22.04, ubuntu-24.04]
os: [macos-13, macos-14, 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 }}
- prev_job: ${{ needs.build_bundle_linux_x86_64.outputs }}
- os: macos-13
prev_job: ${{ needs.build_bundle_macos.outputs }}
prev_job: ${{ needs.build_bundle_macos_x86_64.outputs }}
- os: macos-14
prev_job: ${{ needs.build_bundle_macos_aarch64.outputs }}
- os: ubuntu-24.04-arm
prev_job: ${{ needs.build_bundle_linux_aarch64.outputs }}
runs-on: ${{ matrix.os }}
steps:
- name: Download bundle
Expand Down Expand Up @@ -242,7 +272,7 @@ jobs:
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/kani-') }}
name: Release
runs-on: ubuntu-24.04
needs: [build_bundle_macos, build_bundle_macos_aarch64, build_bundle_linux, test_bundle]
needs: [build_bundle_macos_x86_64, build_bundle_macos_aarch64, build_bundle_linux_x86_64, build_bundle_linux_aarch64, test_bundle]
outputs:
version: ${{ steps.versioning.outputs.version }}
upload_url: ${{ steps.create_release.outputs.upload_url }}
Expand Down Expand Up @@ -270,7 +300,7 @@ jobs:
- name: Download MacOS bundle
uses: actions/download-artifact@v4
with:
name: ${{ needs.build_bundle_macos.outputs.bundle }}
name: ${{ needs.build_bundle_macos_x86_64.outputs.bundle }}

- name: Download MacOS ARM bundle
uses: actions/download-artifact@v4
Expand All @@ -280,7 +310,12 @@ jobs:
- name: Download Linux bundle
uses: actions/download-artifact@v4
with:
name: ${{ needs.build_bundle_linux.outputs.bundle }}
name: ${{ needs.build_bundle_linux_x86_64.outputs.bundle }}

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

- name: Create release
id: create_release
Expand All @@ -290,7 +325,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_x86_64.outputs.bundle }},${{ needs.build_bundle_linux_aarch64.outputs.bundle }},${{ needs.build_bundle_macos_x86_64.outputs.bundle }},${{ needs.build_bundle_macos_aarch64.outputs.bundle }}"
body: |
Kani Rust verifier release bundle version ${{ env.TAG_VERSION }}.
draft: true
Expand Down
1 change: 1 addition & 0 deletions scripts/setup/ubuntu-24.04-arm
2 changes: 1 addition & 1 deletion scripts/setup/ubuntu/install_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ sudo apt-get --yes update

sudo DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --yes "${DEPS[@]}"

ARCH=$(uname -m)
ARCH=$(uname -m | sed 's/aarch64/arm64/')
curl -L --remote-name https://github.com/cvc5/cvc5/releases/download/cvc5-1.3.0/cvc5-Linux-${ARCH}-static.zip
sudo unzip -o -j -d /usr/local/bin cvc5-Linux-${ARCH}-static.zip cvc5-Linux-${ARCH}-static/bin/cvc5
rm cvc5-Linux-${ARCH}-static.zip
Expand Down
Loading