Skip to content

Migrate kontrol module from evm-semantics #21

Migrate kontrol module from evm-semantics

Migrate kontrol module from evm-semantics #21

Workflow file for this run

name: 'Test PR'
on:
pull_request:
branches:
- 'master'
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/checkout@v3
with:
token: ${{ secrets.JENKINS_GITHUB_PAT }}
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
git add --update && git commit --message "Set Version: $(cat package/version)" || true
- name: 'Push updates'
run: git push origin HEAD:${GITHUB_HEAD_REF}
code-quality-checks:
needs: version-bump
name: 'Code Quality Checks'
runs-on: ubuntu-latest
steps:
- name: 'Check out code'
uses: actions/checkout@v3
- name: 'Install Poetry'
uses: Gr1N/setup-poetry@v8
- name: 'Run code quality checks'
run: make check
- name: 'Run pyupgrade'
run: make pyupgrade
unit-tests:
needs: code-quality-checks
name: 'Unit Tests'
runs-on: ubuntu-latest
steps:
- name: 'Check out code'
uses: actions/checkout@v3
- name: 'Install Poetry'
uses: Gr1N/setup-poetry@v8
- name: 'Run unit tests'
run: make cov-unit
profile:
needs: code-quality-checks
name: 'Profiling'
runs-on: [self-hosted, linux, normal]
strategy:
matrix:
backend: ['legacy', 'booster']
timeout-minutes: 15
steps:
- name: 'Check out code'
uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- name: 'Set up Docker'
uses: ./.github/actions/with-docker
with:
container-name: kontrol-ci-profile-${{ github.sha }}
- name: 'Build KEVM'
run: |
docker exec -u github-user kontrol-ci-profile-${GITHUB_SHA} /bin/bash -c 'poetry install'
docker exec -u github-user kontrol-ci-profile-${GITHUB_SHA} /bin/bash -c 'CXX=clang++-14 poetry run kevm-dist --verbose build -j`nproc` plugin foundry'
- name: 'Run profiling'
run: |
PROF_ARGS=
[ ${{ matrix.backend }} == 'booster' ] && PROF_ARGS=--use-booster
docker exec -u github-user kontrol-ci-profile-${GITHUB_SHA} make profile PROF_ARGS=${PROF_ARGS}
- name: 'Tear down Docker'
if: always()
run: |
docker stop --time=0 kontrol-ci-profile-${GITHUB_SHA}
integration-tests:
needs: code-quality-checks
name: 'Integration Tests'
runs-on: [self-hosted, linux, normal]
strategy:
matrix:
backend: ['legacy', 'booster']
timeout-minutes: 150
steps:
- name: 'Check out code'
uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- name: 'Set up Docker'
uses: ./.github/actions/with-docker
with:
container-name: control-ci-integration-${{ github.sha }}
- name: 'Build KEVM'
run: |
docker exec -u github-user kontrol-ci-integration-${GITHUB_SHA} /bin/bash -c 'poetry install'
docker exec -u github-user kontrol-ci-integration-${GITHUB_SHA} /bin/bash -c 'CXX=clang++-14 poetry run kevm-dist --verbose build -j`nproc` plugin foundry'
- name: 'Run integration tests'
run: |
TEST_ARGS=
[ ${{ matrix.backend }} == 'booster' ] && TEST_ARGS=--use-booster
docker exec --user github-user kontrol-ci-integration-${GITHUB_SHA} make cov-integration TEST_ARGS=${TEST_ARGS}
- name: 'Tear down Docker'
if: always()
run: |
docker stop --time=0 kontrol-ci-integration-${GITHUB_SHA}