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

add ubuntu noble release #4608

Merged
merged 15 commits into from
Sep 3, 2024
1 change: 0 additions & 1 deletion .github/workflows/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ RUN apt-get update \
pkg-config \
python3 \
python3-dev \
python3-distutils \
python3-pip \
xxd \
zlib1g-dev
Expand Down
63 changes: 62 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,67 @@ jobs:
kup publish k-framework-binary .#k --keep-days 180
kup publish k-framework-binary .#k.openssl.procps.secp256k1 --keep-days 180

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}"
dwightguth marked this conversation as resolved.
Show resolved Hide resolved
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

ubuntu-jammy:
name: 'K Ubuntu Jammy Package'
runs-on: [self-hosted, linux, normal]
Expand Down Expand Up @@ -359,7 +420,7 @@ jobs:
name: 'Publish Release'
runs-on: [self-hosted, linux, normal]
environment: production
needs: [cachix-release, macos-test, source-tarball, ubuntu-jammy, set-release-id]
needs: [cachix-release, macos-test, source-tarball, ubuntu-jammy, ubuntu-noble, set-release-id]
steps:
- name: 'Check out code'
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion package/debian/kframework-frontend/control.jammy
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Source: kframework-frontend
Section: devel
Priority: optional
Maintainer: Tamas Toth <[email protected]>
Build-Depends: debhelper (>=10) , flex , maven , openjdk-17-jdk , pkg-config , python3 , python3-dev , python3-distutils , python3-pip , zlib1g-dev
Build-Depends: debhelper (>=10) , flex , maven , openjdk-17-jdk , pkg-config , python3 , python3-dev , python3-pip , zlib1g-dev
Standards-Version: 3.9.6
Homepage: https://github.com/runtimeverification/k

Expand Down
1 change: 1 addition & 0 deletions package/debian/kframework/compat.noble
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
10
2 changes: 1 addition & 1 deletion package/debian/kframework/control.jammy
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Source: kframework
Section: devel
Priority: optional
Maintainer: Dwight Guth <[email protected]>
Build-Depends: clang-15 , cmake , debhelper (>=10) , flex , libboost-test-dev , libfmt-dev , libgmp-dev , libjemalloc-dev , libmpfr-dev , libsecp256k1-dev , libunwind-dev , libyaml-dev , maven , openjdk-17-jdk , pkg-config , python3 , python3-dev , python3-distutils , python3-pip , xxd , zlib1g-dev
Build-Depends: clang-15 , cmake , debhelper (>=10) , flex , libboost-test-dev , libfmt-dev , libgmp-dev , libjemalloc-dev , libmpfr-dev , libsecp256k1-dev , libunwind-dev , libyaml-dev , maven , openjdk-17-jdk , pkg-config , python3 , python3-dev , python3-pip , xxd , zlib1g-dev
Standards-Version: 3.9.6
Homepage: https://github.com/runtimeverification/k

Expand Down
18 changes: 18 additions & 0 deletions package/debian/kframework/control.noble
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Source: kframework
Section: devel
Priority: optional
Maintainer: Dwight Guth <[email protected]>
Build-Depends: clang-16 , cmake , debhelper (>=10) , flex , libboost-test-dev , libfmt-dev , libgmp-dev , libjemalloc-dev , libmpfr-dev , libsecp256k1-dev , libunwind-dev , libyaml-dev , maven , openjdk-21-jdk , pkg-config , python3 , python3-dev , python3-pip , xxd , zlib1g-dev
Standards-Version: 3.9.6
Homepage: https://github.com/runtimeverification/k

Package: kframework
Architecture: any
Section: devel
Priority: optional
Depends: bison , clang-16 , openjdk-21-jre-headless , flex , gcc , g++ , libboost-dev , libffi-dev , libfmt-dev , libgmp-dev , libjemalloc-dev , libmpfr-dev , libsecp256k1-1 , libtinfo-dev , libunwind-dev , libyaml-0-2 , libz3-4 , lld-16 , llvm-16 , pkg-config
Recommends: z3
Description: K framework toolchain
Includes K Framework compiler for K language definitions, and K interpreter
and prover for programs written in languages defined in K.
Homepage: https://github.com/runtimeverification/k
43 changes: 43 additions & 0 deletions package/debian/kframework/rules.noble
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
#export DH_VERBOSE = 1


# see FEATURE AREAS in dpkg-buildflags(1)

# The LLVM backend is built using Clang, which is incompatible with LTO flags
# added by default in newer versions of dpkg.
# https://wiki.debian.org/ToolChain/LTO
export DEB_BUILD_MAINT_OPTIONS=hardening=-stackprotector optimize=-lto

# see ENVIRONMENT in dpkg-buildflags(1)
# package maintainers to append CFLAGS
#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
# package maintainers to append LDFLAGS
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

DESTDIR=$(shell pwd)/debian/kframework
PREFIX=/usr
PYTHON_VERSION=python3.10
tothtamas28 marked this conversation as resolved.
Show resolved Hide resolved
PYTHON_DEB_VERSION=python3
export DESTDIR
export PREFIX

%:
dh $@

override_dh_auto_build:
mvn --batch-mode package -DskipTests -Dllvm.backend.prefix=$(PREFIX) -Dllvm.backend.destdir=$(DESTDIR)

override_dh_auto_install:
package/package

override_dh_strip:
dh_strip -Xliballoc.a -Xlibarithmetic.a -XlibAST.a -Xlibutil.a -XlibParser.a -Xlibcollect.a -Xlibcollections.a -Xlibjson.a -Xlibstrings.a -Xlibmeta.a -Xlibio.a

# dh_make generated override targets
# This is example for Cmake (See https://bugs.debian.org/641051 )
#override_dh_auto_configure:
# dh_auto_configure -- # -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH)

7 changes: 5 additions & 2 deletions package/docker/Dockerfile.ubuntu-jammy
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,18 @@ RUN apt-get update \
build-essential \
git \
python3 \
python3-pip
python3-pip \
pipx

COPY kframework_amd64_ubuntu_jammy.deb /kframework_amd64_ubuntu_jammy.deb
RUN apt-get update \
&& apt-get upgrade --yes \
&& apt-get install --yes --no-install-recommends /kframework_amd64_ubuntu_jammy.deb

COPY pyk /pyk
RUN pip install poetry \
RUN pipx install poetry \
&& pipx ensurepath \
&& . /root/.profile \
&& cd /pyk \
&& make build \
&& pip install dist/*.whl \
Expand Down
29 changes: 29 additions & 0 deletions package/docker/Dockerfile.ubuntu-noble
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FROM runtimeverificationinc/z3:ubuntu-noble-4.13.0

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 \
pipx

COPY kframework_amd64_ubuntu_noble.deb /kframework_amd64_ubuntu_noble.deb
RUN apt-get update \
&& apt-get upgrade --yes \
&& apt-get install --yes --no-install-recommends /kframework_amd64_ubuntu_noble.deb

COPY pyk /pyk
RUN pipx install poetry \
&& pipx ensurepath \
&& . /root/.profile \
&& cd /pyk \
&& make build \
&& pip install dist/*.whl --break-system-packages \
&& rm -rf /pyk

RUN rm -rf /kframework_amd64_ubuntu_noble.deb
2 changes: 1 addition & 1 deletion pyk/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyk/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ coloredlogs = "^15.0.1"
filelock = "^3.9.0"
graphviz = "^0.20.1"
hypothesis = "^6.103.1"
psutil = "5.9.5"
psutil = "^5.9.5"
pybind11 = "^2.10.3"
pytest = "*"
textual = "^0.27.0"
Expand Down
Loading