Skip to content

Commit

Permalink
Update CI for PI2 fork (#2)
Browse files Browse the repository at this point in the history
This updates the CI to remove the checks that we no longer want to
perform which are related to Nix or to the Haskell backend.

---------

Co-authored-by: F-WRunTime <[email protected]>
  • Loading branch information
Dwight Guth and F-WRunTime committed Jun 17, 2024
1 parent daa78da commit b88d125
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 271 deletions.
130 changes: 0 additions & 130 deletions .github/workflows/master-push.yml

This file was deleted.

125 changes: 4 additions & 121 deletions .github/workflows/test-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,35 +9,9 @@ concurrency:

jobs:

version-bump:
name: 'Version Bump'
runs-on: ubuntu-latest
steps:
- name: 'Check out code'
uses: actions/checkout@v4
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 [email protected]
- 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)
sed --in-place "s/^VERSION: Final = '.*'$/VERSION: Final = '${new_version}'/" kevm-pyk/src/kevm_pyk/__init__.py
git add --update && git commit --message "Set Version: ${new_version}" || true
- name: 'Push updates'
run: git push origin HEAD:${GITHUB_HEAD_REF}

kevm-pyk-code-quality-checks:
name: 'Code Quality Checks'
runs-on: ubuntu-latest
runs-on: [self-hosted, linux, flyweight]
steps:
- name: 'Check out code'
uses: actions/checkout@v4
Expand All @@ -51,7 +25,7 @@ jobs:
kevm-pyk-unit-tests:
needs: kevm-pyk-code-quality-checks
name: 'Unit Tests'
runs-on: ubuntu-latest
runs-on: [self-hosted, linux, normal]
steps:
- name: 'Check out code'
uses: actions/checkout@v4
Expand All @@ -63,7 +37,7 @@ jobs:
kevm-pyk-profile:
needs: kevm-pyk-code-quality-checks
name: 'Profiling'
runs-on: ubuntu-latest
runs-on: [self-hosted, linux, normal]
steps:
- name: 'Check out code'
uses: actions/checkout@v4
Expand All @@ -90,7 +64,7 @@ jobs:
- name: 'Build kevm-pyk'
run: docker exec -u github-user kevm-ci-concrete-${{ github.sha }} /bin/bash -c 'make poetry'
- name: 'Build targets'
run: docker exec -u github-user kevm-ci-concrete-${{ github.sha }} /bin/bash -c 'CXX=clang++-14 poetry -C kevm-pyk run kdist --verbose build -j`nproc` evm-semantics.haskell evm-semantics.kllvm evm-semantics.kllvm-runtime'
run: docker exec -u github-user kevm-ci-concrete-${{ github.sha }} /bin/bash -c 'CXX=clang++-14 poetry -C kevm-pyk run kdist --verbose build -j`nproc` evm-semantics.kllvm evm-semantics.kllvm-runtime'
- name: 'Test integration'
run: docker exec -u github-user kevm-ci-concrete-${{ github.sha }} /bin/bash -c 'make test-integration'
- name: 'Test conformance'
Expand All @@ -101,94 +75,3 @@ jobs:
if: always()
run: |
docker stop --time=0 kevm-ci-concrete-${{ github.sha }}
test-prove:
name: 'Build and Test KEVM proofs'
needs: kevm-pyk-code-quality-checks
runs-on: [self-hosted, linux, fast]
strategy:
fail-fast: false
matrix:
include:
- test-suite: 'test-prove-kprove'
test-args:
timeout: 45
- test-suite: 'test-prove-pyk'
test-args: '--no-use-booster'
timeout: 180
- test-suite: 'test-prove-pyk'
test-args:
timeout: 150
- test-suite: 'test-prove-pyk'
test-args: '--use-booster-dev'
timeout: 45
- test-suite: 'test-prove-optimizations'
test-args:
timeout: 45
- test-suite: 'test-prove-dss'
test-args:
timeout: 45
timeout-minutes: ${{ matrix.timeout }}
steps:
- name: 'Check out code'
uses: actions/checkout@v4
- name: 'Check out select submodules'
run: |
set -eux
git submodule update --init --recursive -- kevm-pyk/src/kevm_pyk/kproj/plugin
- name: 'Set up Docker'
uses: ./.github/actions/with-docker
with:
container-name: kevm-ci-haskell-${{ matrix.test-suite }}-${{ github.sha }}
- name: 'Build kevm-pyk'
run: docker exec -u github-user kevm-ci-haskell-${{ matrix.test-suite }}-${{ github.sha }} /bin/bash -c 'make poetry'
- name: 'Build distribution'
run: docker exec -u github-user kevm-ci-haskell-${{ matrix.test-suite }}-${{ github.sha }} /bin/bash -c 'CXX=clang++-14 poetry -C kevm-pyk run kdist --verbose build -j`nproc` evm-semantics.plugin evm-semantics.haskell'
- name: 'Prove Haskell'
run: docker exec -u github-user kevm-ci-haskell-${{ matrix.test-suite }}-${{ github.sha }} /bin/bash -c "make ${{ matrix.test-suite }} PYTEST_ARGS='-vv ${{ matrix.test-args }}' PYTEST_PARALLEL=4"
- name: 'Tear down Docker'
if: always()
run: |
docker stop --time=0 kevm-ci-haskell-${{ matrix.test-suite }}-${{ github.sha }}
nix:
name: 'Nix'
strategy:
fail-fast: false
matrix:
include:
- runner: normal
- runner: macos-13
- runner: ARM64
needs: kevm-pyk-code-quality-checks
runs-on: ${{ matrix.runner }}
timeout-minutes: 60
steps:
- name: 'Check out code'
uses: actions/checkout@v4
with:
# Check out pull request HEAD instead of merge commit.
ref: ${{ github.event.pull_request.head.sha }}
- name: 'Check out select submodules'
run: |
set -eux
git submodule update --init --recursive -- kevm-pyk/src/kevm_pyk/kproj/plugin
- 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 KEVM'
run: GC_DONT_GC=1 nix build --extra-experimental-features 'nix-command flakes' --print-build-logs
- name: 'Test KEVM'
run: GC_DONT_GC=1 nix build --extra-experimental-features 'nix-command flakes' --print-build-logs .#kevm-test
20 changes: 0 additions & 20 deletions .github/workflows/update-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,25 +39,5 @@ jobs:
BKP_VERSION=$(git -C kevm-pyk/src/kevm_pyk/kproj/plugin rev-parse HEAD)
echo ${BKP_VERSION} > deps/blockchain-k-plugin_release
git add deps/blockchain-k-plugin_release && git commit -m "deps/blockchain-k-plugin_release: sync release file version ${BKP_VERSION}" || true
- name: 'Install Nix/Cachix'
uses: cachix/install-nix-action@v19
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
with:
name: k-framework
authToken: ${{ secrets.CACHIX_PUBLIC_TOKEN }}
- name: 'Update nix flake inputs'
run: |
K_VERSION=v$(cat deps/k_release)
BKP_VERSION=$(cat deps/blockchain-k-plugin_release)
sed -i 's! k-framework.url = "github:runtimeverification/k/[v0-9\.]*"! k-framework.url = "github:runtimeverification/k/'"${K_VERSION}"'"!' flake.nix
sed -i 's! blockchain-k-plugin.url = "github:runtimeverification/blockchain-k-plugin/[0-9a-f]*"! blockchain-k-plugin.url = "github:runtimeverification/blockchain-k-plugin/'"${BKP_VERSION}"'"!' flake.nix
sed -i 's! pyk.url = "github:runtimeverification/k/[v0-9\.]*?dir=pyk"! pyk.url = "github:runtimeverification/k/'"${K_VERSION}"'?dir=pyk"!' flake.nix
nix run .#update-from-submodules
nix flake update
git add flake.nix flake.lock && git commit -m 'flake.{nix,lock}: update Nix derivations' || true
- name: 'Push updates'
run: git push

0 comments on commit b88d125

Please sign in to comment.