Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix releases, publish notifications to slack on broken releases #2028

Merged
merged 4 commits into from
Aug 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 21 additions & 21 deletions .github/actions/with-docker/action.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -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}
Expand All @@ -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} \
Expand All @@ -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}
31 changes: 26 additions & 5 deletions .github/workflows/master-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,18 +64,23 @@ 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
version=$(cat package/version)
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:
tag: kevm-ci-test-${{ github.sha }}
container-name: kevm-ci-test-${{ github.sha }}
tag-name: runtimeverificationinc/kevm:ubuntu-jammy-${{ env.KEVM_VERSION }}
dockerfile: package/docker/Dockerfile

- name: 'KEVM Foundry Test'
Expand All @@ -94,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()
Expand Down Expand Up @@ -152,3 +157,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 }}
14 changes: 7 additions & 7 deletions .github/workflows/test-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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'
Expand Down Expand Up @@ -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'
Expand All @@ -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'
Expand All @@ -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'
Expand Down Expand Up @@ -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
Expand All @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-foundry-prove.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion kevm-pyk/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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. <contact@runtimeverification.com>",
Expand Down
2 changes: 1 addition & 1 deletion package/debian/changelog
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
kevm (1.0.272) unstable; urgency=medium
kevm (1.0.273) unstable; urgency=medium

* Initial Release.

Expand Down
2 changes: 1 addition & 1 deletion package/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.272
1.0.273