-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into synthesizer-args
- Loading branch information
Showing
20 changed files
with
491 additions
and
263 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
# 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." | ||
inputs: | ||
arch: | ||
description: "Current architecture tuple" | ||
os: | ||
description: "Current operating system" | ||
outputs: | ||
version: | ||
description: "The bundle version (latest or =crate_version)" | ||
value: ${{ steps.set_output.outputs.version }} | ||
crate_version: | ||
description: "The current crate version" | ||
value: ${{ steps.set_output.outputs.crate_version }} | ||
bundle: | ||
description: "The bundle file name" | ||
value: ${{ steps.set_output.outputs.bundle }} | ||
package: | ||
description: "The package file name" | ||
value: ${{ steps.set_output.outputs.package }} | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Export crate version | ||
shell: bash | ||
run: | | ||
echo "CRATE_VERSION=$(cargo pkgid | cut -d@ -f2)" >> $GITHUB_ENV | ||
- name: Export tag version | ||
shell: bash | ||
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/kani-') }} | ||
run: | | ||
# GITHUB_REF is refs/tags/kani-0.1.0 | ||
echo "VERSION=$(echo ${{ github.ref }} | cut -d "-" -f 2)" >> $GITHUB_ENV | ||
- name: Check Version | ||
shell: bash | ||
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/kani-') }} | ||
run: | | ||
# Validate git tag & Cargo.toml are in sync on version number | ||
if [[ ${{ env.CRATE_VERSION }} != ${{ env.VERSION }} ]]; then | ||
echo "Git tag ${{env.VERSION}} did not match crate version ${{env.CRATE_VERSION}}" | ||
exit 1 | ||
fi | ||
- name: Export latest version | ||
shell: bash | ||
if: ${{ !startsWith(github.ref, 'refs/tags/kani-') }} | ||
run: | | ||
echo "VERSION=latest" >> $GITHUB_ENV | ||
- name: Build bundle | ||
shell: bash | ||
run: | | ||
cargo bundle -- ${{ env.VERSION }} | ||
echo "BUNDLE=kani-${{ env.VERSION }}-${{ inputs.arch }}.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 | ||
- name: Upload bundle | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ env.BUNDLE }} | ||
path: ${{ env.BUNDLE }} | ||
if-no-files-found: error | ||
# Aggressively short retention: we don't really need these | ||
retention-days: 3 | ||
|
||
- name: Upload kani-verifier pkg | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ env.PKG }} | ||
path: ${{ env.PKG }} | ||
if-no-files-found: error | ||
# Aggressively short retention: we don't really need these | ||
retention-days: 3 | ||
|
||
- name: Export output | ||
shell: bash | ||
id: set_output | ||
run: | | ||
echo "version=${{ env.VERSION }}" >> ${GITHUB_OUTPUT} | ||
echo "crate_version=${{ env.CRATE_VERSION }}" >> ${GITHUB_OUTPUT} | ||
echo "bundle=${{ env.BUNDLE }}" >> ${GITHUB_OUTPUT} | ||
echo "package=${{ env.PKG }}" >> ${GITHUB_OUTPUT} |
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Copyright Kani Contributors | ||
# SPDX-License-Identifier: Apache-2.0 OR MIT | ||
# | ||
# Workflow that execute jobs based on the files that were changed or some label configuration. | ||
# | ||
# The first job in this workflow will auto label the PR, while the following jobs will conditionally | ||
# run according to the auto-label result. | ||
# | ||
# This workflow runs on `pull_request_target` because the labeler needs extra write permission. | ||
# Thus, we keep this job minimal, and the only actions used are from the same verified publisher. | ||
# | ||
# Other jobs should not require extra permissions, so be careful when adding new jobs to not propagate write | ||
# permissions. | ||
# | ||
# Note that this also means that the workflow version run is the one currently in `main`, | ||
# not the one from the PR. This is only relevant if a PR is changing this workflow. | ||
# | ||
# See <https://github.com/actions/labeler/issues/121> for more details. | ||
|
||
name: Kani Extra | ||
on: pull_request_target | ||
|
||
jobs: | ||
# Keep this job minimal since it requires extra permission | ||
auto-label: | ||
name: Auto Label | ||
permissions: | ||
contents: read | ||
pull-requests: write | ||
outputs: | ||
all-labels: ${{ steps.labeler.outputs.all-labels }} | ||
new-labels: ${{ steps.labeler.outputs.new-labels }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Kani | ||
uses: actions/checkout@v3 | ||
|
||
- name: Label PR | ||
id: labeler | ||
uses: actions/labeler@v4 | ||
with: | ||
dot: true | ||
|
||
verification-bench: | ||
name: Verification Benchmarks | ||
needs: auto-label | ||
permissions: {} | ||
if: contains(needs.auto-label.outputs.all-labels, 'Z-BenchCI') | ||
uses: ./.github/workflows/bench.yml |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Copyright Kani Contributors | ||
# SPDX-License-Identifier: Apache-2.0 OR MIT | ||
|
||
# Run the regression job on Apple M1 only on commits to `main` | ||
name: Kani CI M1 | ||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
|
||
env: | ||
RUST_BACKTRACE: 1 | ||
|
||
jobs: | ||
regression: | ||
runs-on: macos-13-xlarge | ||
steps: | ||
- name: Checkout Kani | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Kani Dependencies | ||
uses: ./.github/actions/setup | ||
with: | ||
os: macos-13-xlarge | ||
|
||
- name: Build Kani | ||
run: cargo build-dev | ||
|
||
- name: Execute Kani regression | ||
run: ./scripts/kani-regression.sh |
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
Oops, something went wrong.