Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a workflow that runs Verus on each task #25

Merged
merged 29 commits into from
Dec 2, 2024
Merged
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
97a1754
Try to run the latest Verus in CI
parno Nov 25, 2024
93c8ac0
Specify the repo in question
parno Nov 25, 2024
96ebcc2
Use a custom action to get the release asset info
parno Nov 25, 2024
ddc006c
Package info
parno Nov 25, 2024
ed92ca5
Prepackage dependencies
parno Nov 25, 2024
793aa88
Try a different access method
parno Nov 25, 2024
8bf7a06
Find the latest release manually
parno Nov 25, 2024
82bd55f
Try again with compilation
parno Nov 25, 2024
0b55911
Get latest release manually, now with recompile
parno Nov 25, 2024
28e90d4
Printf debuggging 1
parno Nov 25, 2024
ac8b9dc
Use for..of
parno Nov 25, 2024
37c5a68
Specify the desired platform and grab the download URL
parno Nov 25, 2024
4d3ba8f
curl to a zip file
parno Nov 25, 2024
303f2ec
Use a better path for Verus
parno Nov 25, 2024
5aeba80
Clean up main.js
parno Nov 25, 2024
53d232d
pwd
parno Nov 25, 2024
ddcc768
Relative path to Verus
parno Nov 25, 2024
73cc1f8
Install rustup and toolchain
parno Nov 25, 2024
31c8f91
Remove dnf
parno Nov 25, 2024
b9251ac
Merge branch 'main' into ci-setup
parno Nov 26, 2024
323992e
Clean up and add docs
parno Nov 26, 2024
4f48ff6
Remove JS-based GitHub action in favor of `gh`-based Bash script
parno Dec 2, 2024
8944a43
Add GH_TOKEN
parno Dec 2, 2024
1340b75
Replace gh script with a curl+jq command from @jaybosamiya,
parno Dec 2, 2024
8086b9b
Try double quotes
parno Dec 2, 2024
043e1f7
Use the release info
parno Dec 2, 2024
4098ccf
Get the jq version
parno Dec 2, 2024
cc12be4
Update syntax to account for jq 1.6
parno Dec 2, 2024
2c4075b
Fill in the output
parno Dec 2, 2024
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
52 changes: 52 additions & 0 deletions .github/workflows/verus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: verus

on: [pull_request, workflow_dispatch]

jobs:
verus:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4

- name: Install toolchain dependencies
shell: bash
run: |
curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused -fsSL "https://sh.rustup.rs" | sh -s -- --profile minimal --default-toolchain none -y
echo "${CARGO_HOME:-$HOME/.cargo}/bin" >> $GITHUB_PATH

- name: Install Rust toolchain
run: |
rustup update --no-self-update stable
rustup install 1.79.0-x86_64-unknown-linux-gnu

- name: Get the URL for the latest Verus release
id: verus-release-info
run: |
jq --version
echo "VERUS_URL=$(curl -s https://api.github.com/repos/verus-lang/verus/releases | jq -r '.[].assets[].browser_download_url' | grep x86-linux -)" >> $GITHUB_OUTPUT

- name: Download the latest Verus release
run: |
curl --proto '=https' --tlsv1.2 -LsSf ${{ steps.verus-release-info.outputs.VERUS_URL }} -o verus.zip; unzip verus.zip

- name: run Verus
working-directory: ./tasks
run: |
# Run `verus` on each file, collecting failures if any
ANYFAILED=""
for i in *.rs; do
echo -n "[verus] $i: "
if ../verus-x86-linux/verus "$i" >/dev/null 2>/dev/null; then
echo "success"
else
echo "failed"
# Re-run `verus` on any failure just to display the actual output
../verus-x86-linux/verus "$i" || true
ANYFAILED="$ANYFAILED $i"
fi
done
if [ -n "$ANYFAILED" ]; then
echo "Failed:$ANYFAILED"
exit 1
fi