From 6181e467e09df1f2d7a99e0d795e5074610d2e82 Mon Sep 17 00:00:00 2001 From: Everett Hildenbrandt Date: Tue, 10 Oct 2023 13:19:06 -0600 Subject: [PATCH] Remove focal image usage (#3600) This removes the focal image from K packaging. Part of: https://github.com/runtimeverification/k/issues/3591 --------- Co-authored-by: Roberto Rosmaninho --- .github/workflows/release.yml | 58 ++------------------------ install-k | 2 +- k-distribution/INSTALL.md | 8 ++-- package/debian/Dockerfile | 2 +- package/docker/Dockerfile.ubuntu-focal | 28 ------------- 5 files changed, 9 insertions(+), 89 deletions(-) delete mode 100644 package/docker/Dockerfile.ubuntu-focal diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 17a920fdfab..8ae80a14534 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -117,59 +117,7 @@ jobs: name: kore-exec.tar.gz path: | **/kore-exec.tar.gz - - ubuntu-focal: - name: 'K Ubuntu Focal Package' - runs-on: [self-hosted, linux, normal] - timeout-minutes: 90 - steps: - - uses: actions/checkout@v3 - - name: 'Build and Test Package' - uses: ./.github/actions/test-package - with: - os: ubuntu - distro: focal - llvm: 12 - jdk: 11 - pkg-name: kframework_amd64_ubuntu_focal.deb - build-package: package/debian/build-package focal - test-package: package/debian/test-package - - name: 'Upload Package to Release' - env: - GITHUB_TOKEN: ${{ secrets.JENKINS_GITHUB_PAT }} - run: | - set -x - version=$(cat package/version) - cp kframework_amd64_ubuntu_focal.deb kframework_${version}_amd64_ubuntu_focal.deb - gh release upload --repo runtimeverification/k --clobber v${version} kframework_${version}_amd64_ubuntu_focal.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-focal-${version} - docker login --username rvdockerhub --password ${DOCKERHUB_PASSWORD} - docker image build . --file package/docker/Dockerfile.ubuntu-focal --tag ${DOCKERHUB_REPO}:${version_tag} - docker run --name k-package-docker-test-focal-${GITHUB_SHA} --rm -it --detach ${DOCKERHUB_REPO}:${version_tag} - docker exec -t k-package-docker-test-focal-${GITHUB_SHA} bash -c 'cd ~ && echo "module TEST imports BOOL endmodule" > test.k' - docker exec -t k-package-docker-test-focal-${GITHUB_SHA} bash -c 'cd ~ && kompile test.k --backend llvm' - docker exec -t k-package-docker-test-focal-${GITHUB_SHA} bash -c 'cd ~ && 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-focal-${GITHUB_SHA} - - name: On Failure, Upload the kore-exec.tar.gz file to the Summary Page - if: failure() - uses: actions/upload-artifact@v2 - with: - name: kore-exec.tar.gz - path: | - **/kore-exec.tar.gz - + debian-bookworm: name: 'K Debian Bookworm Package' runs-on: [self-hosted, linux, normal] @@ -400,7 +348,7 @@ jobs: name: 'Publish Release' runs-on: [self-hosted, linux, normal] environment: production - needs: [nix-release, macos-build, macos-test, source-tarball, ubuntu-jammy, ubuntu-focal, debian-bookworm, set-release-id, arch] + needs: [nix-release, macos-build, macos-test, source-tarball, ubuntu-jammy, debian-bookworm, set-release-id, arch] steps: - name: 'Check out code' uses: actions/checkout@v3 @@ -416,7 +364,7 @@ jobs: server-id: runtime.verification.snapshots server-username: MAVEN_USERNAME server-password: MAVEN_PASSWORD - + # Build and Run Tests in Docker - name: 'Set up Docker' uses: ./.github/actions/with-docker diff --git a/install-k b/install-k index 66754d5fbeb..cb868dc62b5 100755 --- a/install-k +++ b/install-k @@ -12,7 +12,7 @@ case $ID in ubuntu) CODENAME=$UBUNTU_CODENAME case $CODENAME in - bionic|focal|jammy) + jammy) ;; *) echo "Unsupported Ubuntu version, try building from source." diff --git a/k-distribution/INSTALL.md b/k-distribution/INSTALL.md index 9c9f509eb6b..48121501073 100644 --- a/k-distribution/INSTALL.md +++ b/k-distribution/INSTALL.md @@ -113,7 +113,7 @@ requires about ~1.4GB of dependencies and will take some time. ### Ubuntu Focal (20.04) ```sh -sudo apt install ./kframework_amd64_ubuntu_focal.deb +sudo apt install ./kframework_amd64_ubuntu_jammy.deb ``` ### Ubuntu Jammy (22.04) @@ -176,19 +176,19 @@ Docker images with K pre-installed are available at the [runtimeverification/kframework-k Docker Hub repository](https://hub.docker.com/repository/docker/runtimeverificationinc/kframework-k). Each release at `COMMIT_ID` has an image associated with it at -`runtimeverificationinc/kframework-k:ubuntu-focal-COMMIT_ID`. +`runtimeverificationinc/kframework-k:ubuntu-jammy-COMMIT_ID`. To run the image directly: ```sh -docker run -it runtimeverificationinc/kframework-k:ubuntu-focal-COMMIT_ID +docker run -it runtimeverificationinc/kframework-k:ubuntu-jammy-COMMIT_ID ``` and to make a Docker Image based on it, use the following line in your `Dockerfile`: ```Dockerfile -FROM runtimeverificationinc/kframework-k:ubuntu-focal-COMMIT_ID +FROM runtimeverificationinc/kframework-k:ubuntu-jammy-COMMIT_ID ``` We also create Ubuntu 22.04 images with the `ubuntu-jammy-COMMIT_ID` tags. diff --git a/package/debian/Dockerfile b/package/debian/Dockerfile index 82329034e37..740695c6ccd 100644 --- a/package/debian/Dockerfile +++ b/package/debian/Dockerfile @@ -1,4 +1,4 @@ -ARG BASE_IMAGE=ubuntu:focal +ARG BASE_IMAGE=ubuntu:jammy FROM ${BASE_IMAGE} ARG BASE_IMAGE diff --git a/package/docker/Dockerfile.ubuntu-focal b/package/docker/Dockerfile.ubuntu-focal deleted file mode 100644 index 58906bc8d21..00000000000 --- a/package/docker/Dockerfile.ubuntu-focal +++ /dev/null @@ -1,28 +0,0 @@ -FROM ubuntu:focal - -ENV TZ=America/Chicago -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone - -RUN apt-get update \ - && apt-get upgrade --yes \ - && apt-get install --yes \ - build-essential \ - git \ - python3 \ - python3-pip - -RUN git clone 'https://github.com/z3prover/z3' --branch=z3-4.8.15 \ - && cd z3 \ - && python3 scripts/mk_make.py \ - && cd build \ - && make -j8 \ - && make install \ - && cd ../.. \ - && rm -rf z3 - -COPY kframework_amd64_ubuntu_focal.deb /kframework_amd64_ubuntu_focal.deb -RUN apt-get update \ - && apt-get upgrade --yes \ - && apt-get install --yes --no-install-recommends /kframework_amd64_ubuntu_focal.deb - -RUN rm -rf /kframework_amd64_ubuntu_focal.deb