Skip to content

Update dependency: deps/k_release #2032

Update dependency: deps/k_release

Update dependency: deps/k_release #2032

Workflow file for this run

name: 'Run Tests'
on:
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
version-bump:
name: 'Version Bump'
runs-on: [self-hosted, linux, flyweight-ephemeral]
steps:
- name: 'Check out code'
uses: actions/checkout@v3
with:
token: ${{ secrets.JENKINS_GITHUB_PAT }}
# fetch-depth 0 means deep clone the repo
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: 'Configure GitHub user'
run: |
git config user.name devops
git config user.email devops@runtimeverification.com
- name: 'Update version'
run: |
og_version=$(git show origin/${GITHUB_BASE_REF}:package/version)
./package/version.sh bump ${og_version}
./package/version.sh sub
new_version=$(cat package/version)
git add --update && git commit --message "Set Version: ${new_version}" || true
- name: 'Push updates'
run: git push origin HEAD:${GITHUB_HEAD_REF}
pykwasm-code-quality-checks:
name: 'Code Quality Checks'
runs-on: ubuntu-latest
steps:
- name: 'Check out code'
uses: actions/checkout@v3
with:
submodules: recursive
- name: 'Install Poetry'
uses: Gr1N/setup-poetry@v8
- name: 'Build pykwasm'
run: poetry -C pykwasm install
- name: 'Run code quality checks'
run: make -C pykwasm check
- name: 'Run pyupgrade'
run: make -C pykwasm pyupgrade
- name: 'Run unit tests'
run: make -C pykwasm cov-unit
conformance-tests:
name: 'Conformance Tests'
needs: pykwasm-code-quality-checks
runs-on: [self-hosted, linux, normal]
timeout-minutes: 30
steps:
- name: 'Check out code'
uses: actions/checkout@v3
with:
submodules: recursive
- name: 'Set up Docker'
uses: ./.github/actions/with-docker
with:
container-name: kwasm-ci-conformance-${{ github.sha }}
- name: 'Build pykwasm'
run: docker exec -u user kwasm-ci-conformance-${GITHUB_SHA} poetry -C pykwasm install
- name: 'Build LLVM definition'
run: docker exec -u user kwasm-ci-conformance-${GITHUB_SHA} poetry -C pykwasm run kdist -v build wasm-semantics.llvm
- name: 'Run integration tests'
run: docker exec -u user kwasm-ci-conformance-${GITHUB_SHA} make -C pykwasm cov-integration
- name: 'Run simple tests'
run: docker exec -u user kwasm-ci-conformance-${GITHUB_SHA} make -j2 test-simple
- name: 'Run conformance tests: run'
run: docker exec -u user kwasm-ci-conformance-${GITHUB_SHA} make -j2 test-conformance-supported
- name: 'Run conformance tests: parse'
run: docker exec -u user kwasm-ci-conformance-${GITHUB_SHA} make test-conformance-parse
- name: 'Tear down Docker'
if: always()
run: |
docker stop --time=0 kwasm-ci-conformance-${GITHUB_SHA}
prove-tests:
name: 'Prover Tests'
needs: pykwasm-code-quality-checks
runs-on: [self-hosted, linux, normal]
timeout-minutes: 30
steps:
- name: 'Check out code'
uses: actions/checkout@v3
with:
submodules: recursive
- name: 'Set up Docker'
uses: ./.github/actions/with-docker
with:
container-name: kwasm-ci-prove-${{ github.sha }}
- name: 'Build pykwasm'
run: docker exec -u user kwasm-ci-prove-${GITHUB_SHA} poetry -C pykwasm install
- name: 'Build Haskell definitions'
run: docker exec -u user kwasm-ci-prove-${GITHUB_SHA} poetry -C pykwasm run kdist -v build wasm-semantics.{kwasm-lemmas,wrc20} -j2
- name: 'Run prover tests'
run: docker exec -u user kwasm-ci-prove-${GITHUB_SHA} make -j6 test-prove
- name: 'Tear down Docker'
if: always()
run: |
docker stop --time=0 kwasm-ci-prove-${GITHUB_SHA}
nix:
name: 'Nix'
strategy:
fail-fast: false
matrix:
include:
- runner: normal
- runner: macos-13
- runner: ARM64
needs: pykwasm-code-quality-checks
runs-on: ${{ matrix.runner }}
timeout-minutes: 60
steps:
- name: 'Check out code'
uses: actions/checkout@v3
with:
# Check out pull request HEAD instead of merge commit.
ref: ${{ github.event.pull_request.head.sha }}
- name: 'Install Nix'
if: ${{ matrix.runner == 'macos-13' }}
uses: cachix/install-nix-action@v25
with:
install_url: https://releases.nixos.org/nix/nix-2.19.3/install
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
substituters = http://cache.nixos.org https://cache.iog.io
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=
- name: 'Install Cachix'
if: ${{ matrix.runner == 'macos-13' }}
uses: cachix/cachix-action@v14
with:
name: k-framework
authToken: ${{ secrets.CACHIX_PUBLIC_TOKEN }}
- name: 'Build KWASM'
run: GC_DONT_GC=1 nix build .#kwasm --extra-experimental-features 'nix-command flakes' --print-build-logs
- name: 'Build KWASM-Pyk'
run: GC_DONT_GC=1 nix build .#kwasm-pyk --extra-experimental-features 'nix-command flakes' --print-build-logs
- name: 'Test KWASM'
run: GC_DONT_GC=1 nix build .#kwasm-test --extra-experimental-features 'nix-command flakes' --print-build-logs