Skip to content

K Framework Release 4608/merge #1475

K Framework Release 4608/merge

K Framework Release 4608/merge #1475

Workflow file for this run

name: 'Release'
run-name: K Framework Release ${{ github.ref_name }}
on:
pull_request:
types: [opened, edited, reopened, synchronize]
branches:
- 'develop'
concurrency:
group: ${{ github.workflow }}
jobs:
set-release-id:
name: 'Set Release ID'
runs-on: ubuntu-24.04
steps:
- name: 'Get release_id'
run: echo "release_id=$(jq --raw-output '.release.id' "$GITHUB_EVENT_PATH")" >> "${GITHUB_OUTPUT}"
id: release
outputs:
release_id: ${{ steps.release.outputs.release_id }}
source-tarball:
name: 'Create source tarball'
runs-on: ubuntu-latest
environment: production
steps:
- name: 'Check out code'
uses: actions/checkout@v4
with:
submodules: recursive
- name: 'Create source tarball'
env:
GITHUB_TOKEN: ${{ secrets.JENKINS_GITHUB_PAT }}
run: |
set -x
version=$(cat package/version)
tarball=kframework-${version}-src.tar.gz
# shellcheck disable=SC2038
find . -name .git | xargs rm -r
CURDIR=$(pwd)
cd ..
tar czvf "${tarball}" "$(basename "${CURDIR}")"
mv "${tarball}" "${CURDIR}/"
cd "${CURDIR}"
#gh release upload --repo runtimeverification/k --clobber "v${version}" "${tarball}"
ubuntu-noble:
name: 'K Ubuntu Noble Package'
runs-on: [self-hosted, linux, normal]
timeout-minutes: 90
steps:
- uses: actions/checkout@v4
- name: 'Build and Test Package'
uses: ./.github/actions/test-package
with:
os: ubuntu
distro: noble
llvm: 16
jdk: 21
pkg-name: kframework_amd64_ubuntu_noble.deb
build-package: package/debian/build-package noble kframework
test-package: package/debian/test-package
- name: 'Upload the package built to the Summary Page'
uses: actions/upload-artifact@v4
with:
name: kframework_amd64_ubuntu_noble.deb
path: kframework_amd64_ubuntu_noble.deb
if-no-files-found: error
retention-days: 1
- name: 'Upload Package to Release'
env:
GITHUB_TOKEN: ${{ secrets.JENKINS_GITHUB_PAT }}
run: |
set -x
version=$(cat package/version)
cp kframework_amd64_ubuntu_noble.deb "kframework_${version}_amd64_ubuntu_noble.deb"
#gh release upload --repo runtimeverification/k --clobber "v${version}" "kframework_${version}_amd64_ubuntu_noble.deb"
- name: 'Build, Test, and Push Dockerhub Image'
shell: bash {0}
env:
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
DOCKERHUB_REPO: runtimeverificationinc/kframework-k
run: |
set -euxo pipefail
version=$(cat package/version)
version_tag=ubuntu-noble-${version}
docker login --username rvdockerhub --password "${DOCKERHUB_PASSWORD}"
docker image build . --file package/docker/Dockerfile.ubuntu-noble --tag "${DOCKERHUB_REPO}:${version_tag}"
docker run --name "k-package-docker-test-noble-${GITHUB_SHA}" --rm -it --detach "${DOCKERHUB_REPO}:${version_tag}"
docker exec -t "k-package-docker-test-noble-${GITHUB_SHA}" bash -c 'cd ~ && echo "module TEST imports BOOL endmodule" > test.k'
docker exec -t "k-package-docker-test-noble-${GITHUB_SHA}" bash -c 'cd ~ && kompile test.k --backend llvm'
docker exec -t "k-package-docker-test-noble-${GITHUB_SHA}" bash -c 'cd ~ && kompile test.k --backend haskell'
docker exec -t "k-package-docker-test-noble-${GITHUB_SHA}" bash -c 'cd ~ && pyk kompile test.k --backend llvm'
docker exec -t "k-package-docker-test-noble-${GITHUB_SHA}" bash -c 'cd ~ && pyk kompile test.k --backend haskell'
#docker image push "${DOCKERHUB_REPO}:${version_tag}"
- name: 'Clean up Docker Container'
if: always()
run: |
docker stop --time=0 "k-package-docker-test-noble-${GITHUB_SHA}"
- name: On Failure, Upload the kore-exec.tar.gz file to the Summary Page
if: failure()
uses: actions/upload-artifact@v4
with:
name: kore-exec.tar.gz
path: |
**/kore-exec.tar.gz