From 88d011feff5becab9444f131bcfe8bdd19cc3459 Mon Sep 17 00:00:00 2001 From: Dwight Guth Date: Mon, 8 Apr 2024 14:20:11 -0500 Subject: [PATCH 1/6] remove master push CI job --- .github/workflows/master-push.yml | 130 ------------------------------ 1 file changed, 130 deletions(-) delete mode 100644 .github/workflows/master-push.yml diff --git a/.github/workflows/master-push.yml b/.github/workflows/master-push.yml deleted file mode 100644 index ab4c0ffcf3..0000000000 --- a/.github/workflows/master-push.yml +++ /dev/null @@ -1,130 +0,0 @@ -name: 'Master Push' -on: - push: - branches: - - 'master' -concurrency: - group: ${{ github.workflow }} - cancel-in-progress: true - -jobs: - - nix-cache: - name: 'Populate Nix Cache' - strategy: - matrix: - include: - - runner: normal - - runner: macos-13 - - runner: ARM64 - runs-on: ${{ matrix.runner }} - steps: - - name: 'Check out code' - uses: actions/checkout@v3 - with: - ref: ${{ github.event.push.head.sha }} - fetch-depth: 0 - - name: 'Upgrade bash' - if: ${{ contains(matrix.os, 'macos') }} - run: brew install bash - - name: 'Install Nix' - if: ${{ matrix.runner == 'macos-13' }} - 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 }} - - name: 'Install Cachix' - if: ${{ matrix.runner == 'macos-13' }} - uses: cachix/cachix-action@v12 - with: - name: k-framework - signingKey: ${{ secrets.CACHIX_SIGNING_KEY }} - skipPush: true - - name: 'Build and cache KEVM' - uses: workflow/nix-shell-action@v3.0.3 - env: - GC_DONT_GC: 1 - CACHIX_AUTH_TOKEN: '${{ secrets.CACHIX_PUBLIC_TOKEN }}' - with: - packages: jq - script: | - kevm=$(nix build --extra-experimental-features 'nix-command flakes' .#kevm --json | jq -r '.[].outputs | to_entries[].value') - drv=$(nix-store --query --deriver ${kevm}) - nix-store --query --requisites --include-outputs ${drv} | cachix push k-framework - - make-release: - name: 'Cut Release' - runs-on: ubuntu-latest - needs: nix-cache - steps: - - name: 'Check out code' - uses: actions/checkout@v3 - with: - ref: ${{ github.event.push.head.sha }} - fetch-depth: 0 - - name: 'Make release' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - set -x - VERSION=v$(cat package/version) - gh release create ${VERSION} --target ${{ github.sha }} - - name: 'Update dependents' - run: | - set -x - VERSION=$(cat package/version) - curl --fail \ - -X POST \ - -H "Accept: application/vnd.github+json" \ - -H "Authorization: Bearer ${{ secrets.JENKINS_GITHUB_PAT }}" \ - -H "X-GitHub-Api-Version: 2022-11-28" \ - https://api.github.com/repos/runtimeverification/devops/dispatches \ - -d '{"event_type":"on-demand-test","client_payload":{"repo":"runtimeverification/evm-semantics","version":"'${VERSION}'"}}' - - gh-pages: - name: 'Publish GH Pages' - runs-on: ubuntu-latest - needs: make-release - steps: - - name: 'Check out gh-pages' - uses: actions/checkout@v3 - with: - fetch-depth: 0 - submodules: true - ref: ${{ github.event.push.head.sha }} - - run: | - git config --global user.email 'devops@runtimeverification.com' - git config --global user.name 'RV DevOps' - - name: 'Publish gh-pages' - run: | - git checkout -B gh-pages - cd web - npm install - npm run build - npm run build-sitemap - cd - - mv web/public_content ./ - rm -rf $(find . -maxdepth 1 -not -name public_content -a -not -name .git -a -not -name .gitmodules -a -not -path . -a -not -path .. -a -not -name CNAME) - mv public_content/* ./ - rm -rf public_content - git add ./ - git commit -m 'gh-pages: Updated the website' - git merge --strategy ours origin/gh-pages --allow-unrelated-histories - git push origin gh-pages - - name: 'Post failure to channel' - if: failure() - uses: slackapi/slack-github-action@v1.24.0 - with: - channel-id: "#kevm-notifications" - slack-message: "Failed to create KEVM release: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" - env: - SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} - - name: 'Post success to channel' - if: success() - uses: slackapi/slack-github-action@v1.24.0 - with: - channel-id: "#kevm-notifications" - slack-message: "Created KEVM release: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" - env: - SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} From 252657cee08fb8c622d5b992f17ed279a17ae8ba Mon Sep 17 00:00:00 2001 From: Dwight Guth Date: Mon, 8 Apr 2024 14:20:20 -0500 Subject: [PATCH 2/6] remove nix CI stuff --- .github/workflows/update-version.yml | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/.github/workflows/update-version.yml b/.github/workflows/update-version.yml index d152f0d25f..768276e5f0 100644 --- a/.github/workflows/update-version.yml +++ b/.github/workflows/update-version.yml @@ -44,26 +44,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=$(cat deps/k_release) - BKP_VERSION=$(cat deps/blockchain-k-plugin_release) - PYK_VERSION=$(cat deps/pyk_release) - sed -i 's! k-framework.url = "github:runtimeverification/k/[v0-9\.]*"! k-framework.url = "github:runtimeverification/k/v'"${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/pyk/[v0-9\.]*"! pyk.url = "github:runtimeverification/pyk/'"${PYK_VERSION}"'"!' 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 From 279bf25e829b948247badc99b49d0360e4ff6f54 Mon Sep 17 00:00:00 2001 From: Dwight Guth Date: Mon, 8 Apr 2024 14:20:47 -0500 Subject: [PATCH 3/6] remove version bump --- .github/workflows/test-pr.yml | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/.github/workflows/test-pr.yml b/.github/workflows/test-pr.yml index 4aabb0e20c..05097299dc 100644 --- a/.github/workflows/test-pr.yml +++ b/.github/workflows/test-pr.yml @@ -9,32 +9,6 @@ concurrency: 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) - 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: [self-hosted, linux, flyweight-ephemeral] From 5a72123516e494725bca7626213416fe53d4488c Mon Sep 17 00:00:00 2001 From: Dwight Guth Date: Mon, 8 Apr 2024 14:22:14 -0500 Subject: [PATCH 4/6] remove proof tests and nix tests --- .github/workflows/test-pr.yml | 76 ----------------------------------- 1 file changed, 76 deletions(-) diff --git a/.github/workflows/test-pr.yml b/.github/workflows/test-pr.yml index 05097299dc..ab916547aa 100644 --- a/.github/workflows/test-pr.yml +++ b/.github/workflows/test-pr.yml @@ -93,79 +93,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: - timeout: 180 - - test-suite: 'test-prove-pyk' - test-args: '--use-booster' - timeout: 150 - timeout-minutes: ${{ matrix.timeout }} - steps: - - name: 'Check out code' - uses: actions/checkout@v3 - with: - submodules: recursive - - 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@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 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 From 9d6132e74729434229149fd81a18fa1f262fffca Mon Sep 17 00:00:00 2001 From: Dwight Guth Date: Mon, 8 Apr 2024 14:22:59 -0500 Subject: [PATCH 5/6] don't build haskell backend --- .github/workflows/test-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-pr.yml b/.github/workflows/test-pr.yml index ab916547aa..4852a88d3f 100644 --- a/.github/workflows/test-pr.yml +++ b/.github/workflows/test-pr.yml @@ -82,7 +82,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' From b28a179d130526df97fe851a034fd111f2333db6 Mon Sep 17 00:00:00 2001 From: F-WRunTime Date: Mon, 8 Apr 2024 21:17:43 -0600 Subject: [PATCH 6/6] Fix runner target machines to Pi2 Named machines --- .github/workflows/test-pr.yml | 14 +++++++------- .github/workflows/update-version.yml | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test-pr.yml b/.github/workflows/test-pr.yml index 4852a88d3f..e1904d3b17 100644 --- a/.github/workflows/test-pr.yml +++ b/.github/workflows/test-pr.yml @@ -11,10 +11,10 @@ jobs: kevm-pyk-code-quality-checks: name: 'Code Quality Checks' - runs-on: [self-hosted, linux, flyweight-ephemeral] + runs-on: [self-hosted, linux, flyweight] steps: - name: 'Check out code' - uses: actions/checkout@v3 + uses: actions/checkout@v4 - uses: actions/setup-python@v4 with: python-version: "3.10" @@ -28,10 +28,10 @@ jobs: kevm-pyk-unit-tests: needs: kevm-pyk-code-quality-checks name: 'Unit Tests' - runs-on: [self-hosted, linux, normal-ephemeral] + runs-on: [self-hosted, linux, normal] steps: - name: 'Check out code' - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: true fetch-depth: 0 @@ -47,10 +47,10 @@ jobs: kevm-pyk-profile: needs: kevm-pyk-code-quality-checks name: 'Profiling' - runs-on: [self-hosted, linux, normal-ephemeral] + runs-on: [self-hosted, linux, normal] steps: - name: 'Check out code' - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: recursive fetch-depth: 0 @@ -71,7 +71,7 @@ jobs: timeout-minutes: 45 steps: - name: 'Check out code' - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: recursive fetch-depth: 0 diff --git a/.github/workflows/update-version.yml b/.github/workflows/update-version.yml index 768276e5f0..38d6ddcc2d 100644 --- a/.github/workflows/update-version.yml +++ b/.github/workflows/update-version.yml @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-latest steps: - name: 'Check out code' - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: recursive token: ${{ secrets.JENKINS_GITHUB_PAT }}