fix k framework install with github token #14
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: CI | |
on: [push] | |
jobs: | |
foundry-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
with: | |
fetch-depth: 0 | |
submodules: recursive | |
- uses: foundry-rs/foundry-toolchain@v1 | |
with: | |
version: nightly | |
- name: Install forge-std | |
run: | | |
forge install foundry-rs/forge-std --no-commit | |
forge remappings > remappings.txt | |
- name: Run non-Kontrol tests | |
run: | | |
forge test --no-match-path "src/test/kontrol/*" -vvv | |
- name: Run snapshot without Kontrol tests | |
run: forge snapshot --no-match-path "src/test/kontrol/*" | |
formal-verification: | |
runs-on: ubuntu-latest | |
needs: foundry-test | |
steps: | |
- uses: actions/checkout@master | |
with: | |
fetch-depth: 0 | |
submodules: recursive | |
# Download and Extract K Framework | |
- name: Download K Framework | |
env: | |
REPOSITORY_TOKEN: ${{ secrets.REPOSITORY_TOKEN }} | |
run: | | |
echo "Downloading K Framework..." | |
curl -H "Authorization: token $REPOSITORY_TOKEN" -L -o kframework.tar.gz https://github.com/runtimeverification/k/releases/download/v7.1.170/kframework-7.1.170-src.tar.gz | |
echo "Validating tarball..." | |
file kframework.tar.gz || { echo "Download failed"; exit 1; } | |
echo "Extracting K Framework..." | |
mkdir -p kframework | |
tar -xvzf kframework.tar.gz -C kframework --strip-components=1 || { echo "Extraction failed"; exit 1; } | |
ls -l kframework || { echo "Extraction directory not found"; exit 1; } | |
echo "Setting up K Framework..." | |
export PATH=$PATH:$(pwd)/kframework/bin | |
# Download and Build KEVM | |
- name: Install KEVM | |
run: | | |
echo "Downloading KEVM..." | |
curl -LO https://github.com/runtimeverification/evm-semantics/releases/download/v1.0/evm.tar.gz | |
echo "Extracting KEVM..." | |
mkdir -p evm | |
tar -xvzf evm.tar.gz -C evm --strip-components=1 || { echo "Extraction failed"; exit 1; } | |
ls -l evm || { echo "EVM directory not found"; exit 1; } | |
echo "Building KEVM..." | |
cd evm | |
export PATH=$PATH:$(pwd)/bin | |
make deps | |
make build | |
# Run the Formal Verification Job | |
- name: Formal Verification with KEVM | |
run: | | |
echo "Running formal verification..." | |
cd evm | |
krun verification.k || { echo "Formal verification failed"; exit 1; } |