From 0fb58ebad120ec5786b7fb688338c48d2ec915dc Mon Sep 17 00:00:00 2001 From: Everett Hildenbrandt Date: Tue, 22 Aug 2023 17:25:20 +0000 Subject: [PATCH 1/4] .github/master-push: publish notification to slack on release success/failure --- .github/workflows/master-push.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/master-push.yml b/.github/workflows/master-push.yml index 362a1fb9c5..cacfe91b8d 100644 --- a/.github/workflows/master-push.yml +++ b/.github/workflows/master-push.yml @@ -152,3 +152,19 @@ jobs: 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 77a10fb5fb326a18d0c370b73350e3c642776e39 Mon Sep 17 00:00:00 2001 From: Everett Hildenbrandt Date: Tue, 22 Aug 2023 17:36:54 +0000 Subject: [PATCH 2/4] .github/: update to use tag => container-name in with-docker action --- .github/actions/with-docker/action.yml | 42 +++++++++++----------- .github/workflows/master-push.yml | 5 +-- .github/workflows/test-pr.yml | 14 ++++---- .github/workflows/update-foundry-prove.yml | 2 +- 4 files changed, 32 insertions(+), 31 deletions(-) diff --git a/.github/actions/with-docker/action.yml b/.github/actions/with-docker/action.yml index 8e3c9197f3..b07d95e0e3 100644 --- a/.github/actions/with-docker/action.yml +++ b/.github/actions/with-docker/action.yml @@ -1,10 +1,15 @@ name: 'With Docker' description: 'Run a given stage with Docker Image' inputs: - tag: - description: 'Docker image tag to use' + container-name: + description: 'Docker container name to use' type: string required: true + tag-name: + description: 'Docker image tag to use' + type: string + required: false + default: runtimeverificationinc/kevm subdir: description: 'Subdirectory where code is cloned.' required: false @@ -25,11 +30,6 @@ inputs: required: false type: number default: 14 - jdk: - description: 'JDK version to use.' - required: false - type: number - default: 17 dockerfile: description: 'Hardcode the path of the dockerfile to use.' required: false @@ -43,13 +43,13 @@ runs: run: | set -euxo pipefail - TAG_NAME=${{ inputs.tag }} + CONTAINER_NAME=${{ inputs.container-name }} SUBDIR=${{ inputs.subdir }} BASE_OS=${{ inputs.os }} BASE_DISTRO=${{ inputs.distro }} - JDK_VERSION=${{ inputs.jdk }} DOCKERFILE=${{ inputs.dockerfile }} LLVM_VERSION=${{ inputs.llvm }} + TAG_NAME=${{ inputs.tag-name }} USER=github-user GROUP=${USER} @@ -63,7 +63,7 @@ runs: --tag z3:${Z3_VERSION} \ docker build . --file ${DOCKERFILE} \ - --tag runtimeverification/${TAG_NAME} \ + --tag ${TAG_NAME} \ --build-arg USER_ID=${USER_ID} \ --build-arg GROUP_ID=${GROUP_ID} \ --build-arg USER=${USER} \ @@ -73,15 +73,15 @@ runs: --build-arg Z3_VERSION=${Z3_VERSION} \ --build-arg LLVM_VERSION=${LLVM_VERSION} - docker run \ - --name ${TAG_NAME} \ - --rm \ - --interactive \ - --tty \ - --detach \ - --user root \ - --workdir /home/${USER}/workspace \ - runtimeverification/${TAG_NAME} + docker run \ + --name ${CONTAINER_NAME} \ + --rm \ + --interactive \ + --tty \ + --detach \ + --user root \ + --workdir /home/${USER}/workspace \ + ${TAG_NAME} - docker cp . ${TAG_NAME}:/home/${USER}/workspace - docker exec ${TAG_NAME} chown -R ${USER}:${GROUP} /home/${USER} + docker cp . ${CONTAINER_NAME}:/home/${USER}/workspace + docker exec ${CONTAINER_NAME} chown -R ${USER}:${GROUP} /home/${USER} diff --git a/.github/workflows/master-push.yml b/.github/workflows/master-push.yml index cacfe91b8d..734e30e78b 100644 --- a/.github/workflows/master-push.yml +++ b/.github/workflows/master-push.yml @@ -64,7 +64,8 @@ jobs: - name: 'Set up Docker' uses: ./.github/actions/with-docker with: - tag: kevm-package-jammy-${{ github.sha }} + container-name: kevm-package-jammy-${{ github.sha }} + - name: 'Build Package' run: | set -euxo pipefail @@ -75,7 +76,7 @@ jobs: - name: 'Setup Foundry Test Docker' uses: ./.github/actions/with-docker with: - tag: kevm-ci-test-${{ github.sha }} + container-name: kevm-ci-test-${{ github.sha }} dockerfile: package/docker/Dockerfile - name: 'KEVM Foundry Test' diff --git a/.github/workflows/test-pr.yml b/.github/workflows/test-pr.yml index e034323103..ead1de3413 100644 --- a/.github/workflows/test-pr.yml +++ b/.github/workflows/test-pr.yml @@ -79,7 +79,7 @@ jobs: - name: 'Set up Docker' uses: ./.github/actions/with-docker with: - tag: kevm-ci-profile-${{ github.sha }} + container-name: kevm-ci-profile-${{ github.sha }} - name: 'Build kevm-pyk' run: docker exec -u github-user kevm-ci-profile-${GITHUB_SHA} /bin/bash -c 'make poetry' - name: 'Build Foundry' @@ -106,7 +106,7 @@ jobs: - name: 'Set up Docker' uses: ./.github/actions/with-docker with: - tag: kevm-ci-concrete-${{ github.sha }} + container-name: kevm-ci-concrete-${{ github.sha }} - name: 'Build kevm-pyk' run: docker exec -u github-user kevm-ci-concrete-${GITHUB_SHA} /bin/bash -c 'make poetry' - name: 'Build blockchain-k-plugin-deps' @@ -139,7 +139,7 @@ jobs: - name: 'Set up Docker' uses: ./.github/actions/with-docker with: - tag: kevm-ci-haskell-${{ github.sha }} + container-name: kevm-ci-haskell-${{ github.sha }} - name: 'Prove Haskell' run: docker exec -u github-user kevm-ci-haskell-${GITHUB_SHA} /bin/bash -c 'make test-prove' - name: 'Tear down Docker' @@ -160,7 +160,7 @@ jobs: - name: 'Set up Docker' uses: ./.github/actions/with-docker with: - tag: kevm-ci-foundry-${{ github.sha }} + container-name: kevm-ci-foundry-${{ github.sha }} - name: 'Build kevm-pyk' run: docker exec -u github-user kevm-ci-foundry-${GITHUB_SHA} /bin/bash -c 'make poetry' - name: 'Build Foundry' @@ -185,7 +185,7 @@ jobs: - name: 'Set up Docker' uses: ./.github/actions/with-docker with: - tag: kevm-ci-booster-${{ github.sha }} + container-name: kevm-ci-booster-${{ github.sha }} - name: 'Build kevm-pyk' run: docker exec -u github-user kevm-ci-booster-${GITHUB_SHA} /bin/bash -c 'make poetry' - name: 'Build blockchain-k-plugin-deps' @@ -250,7 +250,7 @@ jobs: - name: 'Set up Docker' uses: ./.github/actions/with-docker with: - tag: kevm-package-jammy-${{ github.sha }} + container-name: kevm-package-jammy-${{ github.sha }} - name: 'Build Package' run: | set -euxo pipefail @@ -261,7 +261,7 @@ jobs: - name: 'Setup Foundry Test Docker' uses: ./.github/actions/with-docker with: - tag: kevm-ci-test-${{ github.sha }} + container-name: kevm-ci-test-${{ github.sha }} dockerfile: package/docker/Dockerfile - name: 'KEVM Foundry Test' diff --git a/.github/workflows/update-foundry-prove.yml b/.github/workflows/update-foundry-prove.yml index c80f0e2298..83beb6f23d 100644 --- a/.github/workflows/update-foundry-prove.yml +++ b/.github/workflows/update-foundry-prove.yml @@ -23,7 +23,7 @@ jobs: - name: 'Set up Docker' uses: ./.github/actions/with-docker with: - tag: kevm-update-output-${{ github.sha }} + container-name: kevm-update-output-${{ github.sha }} os: ubuntu distro: jammy llvm: 14 From 160807f548b53b121c5b08c09a84b596b7d109e3 Mon Sep 17 00:00:00 2001 From: devops Date: Tue, 22 Aug 2023 17:40:45 +0000 Subject: [PATCH 3/4] Set Version: 1.0.273 --- kevm-pyk/pyproject.toml | 2 +- package/debian/changelog | 2 +- package/version | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kevm-pyk/pyproject.toml b/kevm-pyk/pyproject.toml index 19571b198b..9828d4b9c9 100644 --- a/kevm-pyk/pyproject.toml +++ b/kevm-pyk/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "kevm-pyk" -version = "1.0.272" +version = "1.0.273" description = "" authors = [ "Runtime Verification, Inc. ", diff --git a/package/debian/changelog b/package/debian/changelog index 90c2b959a6..8e43842b35 100644 --- a/package/debian/changelog +++ b/package/debian/changelog @@ -1,4 +1,4 @@ -kevm (1.0.272) unstable; urgency=medium +kevm (1.0.273) unstable; urgency=medium * Initial Release. diff --git a/package/version b/package/version index 3b79cbb6c7..3b931e1bcc 100644 --- a/package/version +++ b/package/version @@ -1 +1 @@ -1.0.272 +1.0.273 From 6ff9d1f59f14801e019a68b63990afd06fdcf5be Mon Sep 17 00:00:00 2001 From: Everett Hildenbrandt Date: Tue, 22 Aug 2023 17:42:06 +0000 Subject: [PATCH 4/4] .github/master-push: publish dockerhub image with correct tag identifier --- .github/workflows/master-push.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/master-push.yml b/.github/workflows/master-push.yml index 734e30e78b..65665d2fcf 100644 --- a/.github/workflows/master-push.yml +++ b/.github/workflows/master-push.yml @@ -73,10 +73,14 @@ jobs: docker exec -u github-user kevm-package-jammy-${GITHUB_SHA} /bin/bash -c 'package/debian/package jammy' docker cp kevm-package-jammy-${GITHUB_SHA}:/home/github-user/kevm_${version}_amd64.deb ./ + - name: 'Set Version ID' + run: echo "KEVM_VERSION=$(cat package/version)" >> "${GITHUB_ENV}" + - name: 'Setup Foundry Test Docker' uses: ./.github/actions/with-docker with: container-name: kevm-ci-test-${{ github.sha }} + tag-name: runtimeverificationinc/kevm:ubuntu-jammy-${{ env.KEVM_VERSION }} dockerfile: package/docker/Dockerfile - name: 'KEVM Foundry Test' @@ -95,10 +99,10 @@ jobs: DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }} run: | set -euxo pipefail - version=$(cat package/version) - tag_name="runtimeverificationinc/kevm:ubuntu-jammy-${version}" + dockerhub_repo=runtimeverificationinc/kevm + tag_name=ubuntu-jammy-${KEVM_VERSION} docker login --username rvdockerhub --password ${DOCKERHUB_PASSWORD} - docker image push ${tag_name} + docker image push "${dockerhub_repo}:${tag_name}" - name: 'Tear down Docker' if: always()