Update dependency: deps/plugin #2994
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: 'Test' | |
on: | |
pull_request: | |
branches: | |
- 'master' | |
# Stop in progress workflows on the same branch and same workflow to use latest committed code | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
version-bump: | |
name: 'Version Bump' | |
runs-on: ubuntu-latest | |
steps: | |
- name: 'Check out code' | |
uses: actions/[email protected] | |
with: | |
token: ${{ secrets.JENKINS_GITHUB_PAT }} | |
# fetch-depth 0 means deep clone the repo | |
fetch-depth: 0 | |
- name: 'Update Version' | |
run: | | |
set -x | |
git config user.name devops | |
git config user.email [email protected] | |
./package/version.sh bump $(git show origin/${GITHUB_BASE_REF}:package/version) | |
./package/version.sh sub | |
if git add --update && git commit --message "Set Version: $(cat package/version)"; then | |
git push origin HEAD:${GITHUB_HEAD_REF} | |
fi | |
build-nix: | |
name: 'Nix / Build' | |
strategy: | |
matrix: | |
include: | |
- runner: ubuntu-latest | |
os: ubuntu-latest | |
- runner: macos-12 | |
os: macos-12 | |
- runner: MacM1 | |
os: self-macos-12 | |
runs-on: ${{ matrix.runner }} | |
needs: version-bump | |
steps: | |
- name: 'Check out code' | |
uses: actions/[email protected] | |
- name: 'Install Nix/Cachix' | |
if: ${{ !startsWith(matrix.os, 'self') }} | |
uses: cachix/install-nix-action@v22 | |
with: | |
install_url: https://releases.nixos.org/nix/nix-2.13.3/install | |
extra_nix_config: | | |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | |
- uses: cachix/cachix-action@v12 | |
if: ${{ !startsWith(matrix.os, 'self') }} | |
with: | |
name: k-framework | |
authToken: ${{ secrets.CACHIX_PUBLIC_TOKEN }} | |
skipPush: true | |
- name: 'Build via Nix' | |
run: GC_DONT_GC=1 nix build .#kavm --print-build-logs | |
test-pr: | |
name: 'Test PR' | |
runs-on: [self-hosted, linux, normal] | |
needs: version-bump | |
steps: | |
- name: 'Check out code' | |
uses: actions/[email protected] | |
with: | |
submodules: recursive | |
- name: 'Set up Docker' | |
run: | | |
set -euxo pipefail | |
K_VERSION="$(cat deps/k_release)" | |
KAVM_COMMIT="$(git rev-parse --short=7 HEAD)" | |
docker build . \ | |
--file Dockerfile \ | |
--build-arg K_VERSION=${K_VERSION} \ | |
--tag runtimeverification/avm-semantics-ci:${KAVM_COMMIT} | |
docker stop avm-semantics-ci || true && docker rm avm-semantics-ci || true | |
docker run \ | |
--name avm-semantics-ci \ | |
--rm \ | |
--interactive \ | |
--detach \ | |
runtimeverification/avm-semantics-ci:${KAVM_COMMIT} | |
docker cp . avm-semantics-ci:/home/user | |
docker exec avm-semantics-ci chown -R user:user /home/user | |
- name: 'Check code style' | |
run: docker exec --user user --workdir /home/user -t avm-semantics-ci /bin/bash -c 'make check-kavm-codestyle' | |
- name: 'Build AVM semantics' | |
run: | | |
docker exec --user user --workdir /home/user -t avm-semantics-ci /bin/bash -c 'cd deps/plugin && make clean' | |
docker exec --user user --workdir /home/user -t avm-semantics-ci /bin/bash -c 'make build' | |
- name: 'Test Bison parsers ' | |
run: | | |
docker exec --user user --workdir /home/user -t avm-semantics-ci /bin/bash -c 'make -j4 test-kavm-bison-parsers' | |
- name: 'Test AVM semantics --- scenarious' | |
run: | | |
docker exec --user user --workdir /home/user -t avm-semantics-ci /bin/bash -c 'THREADS=4 make test-kavm-avm-simulation' | |
- name: 'Test AVM semantics --- algod integration' | |
run: | | |
docker exec --user user --workdir /home/user -t avm-semantics-ci /bin/bash -c 'THREADS=4 make test-kavm-algod' | |
- name: 'Test AVM semantics --- proofs --- opcodes' | |
run: | | |
docker exec --user user --workdir /home/user -t avm-semantics-ci /bin/bash -c 'make -j4 test-avm-semantics-opcode-prove' | |
- name: 'Test AVM semantics --- proofs --- transactions' | |
run: | | |
docker exec --user user --workdir /home/user -t avm-semantics-ci /bin/bash -c 'make -j4 test-avm-semantics-transactions-prove' | |
- name: 'Test AVM semantics --- proofs --- app calls' | |
run: | | |
docker exec --user user --workdir /home/user -t avm-semantics-ci /bin/bash -c 'make -j4 test-avm-semantics-calls-prove' | |
# - name: 'Test AVM semantics --- proofs Pact CPMM' | |
# run: | | |
# docker exec --user user --workdir /home/user -t avm-semantics-ci /bin/bash -c 'make -j4 test-avm-semantics-pact-prove' | |
- name: 'Test AVM semantics --- proofs --- PyTeal generated' | |
run: | | |
docker exec --user user --workdir /home/user -t avm-semantics-ci /bin/bash -c 'THREADS=4 make test-pyteal-prove' | |
- name: 'Test AVM semantics --- KCFG proofs --- app calls' | |
run: | | |
docker exec --user user --workdir /home/user -t avm-semantics-ci /bin/bash -c 'make test-avm-semantics-calls-kcfg-prove' | |
- name: 'Tear down Docker' | |
if: always() | |
run: | | |
docker stop --time=0 avm-semantics-ci |