From 15dbd4f1f3add5a756f5992c631196f8527556b2 Mon Sep 17 00:00:00 2001 From: Sean T Allen Date: Sun, 28 Jan 2024 09:25:13 -0500 Subject: [PATCH] Add Fedora 39 builder (#4483) The builder will be used to build nightly and release versions of ponyc targetting Fedora 39. No release notes are being added at this time, nor is RELEASE_PROCESS.md being updated as until a nightly runs, we can't be sure this will fully work. The docker image created for the builder can almost certainly be trimmed down in size, but I am not a Fedora/DNF expert. I am looking to the requester of Fedora 39 support to assist with trimming the image down. --- .../Dockerfile | 20 +++++++++++++++++++ .../build-and-push.bash | 15 ++++++++++++++ .github/workflows/nightlies.yml | 4 ++++ .github/workflows/release.yml | 4 ++++ 4 files changed, 43 insertions(+) create mode 100644 .ci-dockerfiles/x64-64-unknown-linux-fedora39-buiilder/Dockerfile create mode 100644 .ci-dockerfiles/x64-64-unknown-linux-fedora39-buiilder/build-and-push.bash diff --git a/.ci-dockerfiles/x64-64-unknown-linux-fedora39-buiilder/Dockerfile b/.ci-dockerfiles/x64-64-unknown-linux-fedora39-buiilder/Dockerfile new file mode 100644 index 0000000000..ee47cb7096 --- /dev/null +++ b/.ci-dockerfiles/x64-64-unknown-linux-fedora39-buiilder/Dockerfile @@ -0,0 +1,20 @@ +FROM fedora:39 + +RUN dnf install -y clang \ + cmake \ + git \ + make \ + zlib \ + curl \ + python3-pip \ + lldb \ + libstdc++-static \ + && pip3 install cloudsmith-cli + +# needed for GitHub actions +RUN git config --global --add safe.directory /__w/ponyc/ponyc + +# add user pony in order to not run tests as root +RUN useradd -u 1001 -ms /bin/bash -d /home/pony -g root pony +USER pony +WORKDIR /home/pony diff --git a/.ci-dockerfiles/x64-64-unknown-linux-fedora39-buiilder/build-and-push.bash b/.ci-dockerfiles/x64-64-unknown-linux-fedora39-buiilder/build-and-push.bash new file mode 100644 index 0000000000..e40269f935 --- /dev/null +++ b/.ci-dockerfiles/x64-64-unknown-linux-fedora39-buiilder/build-and-push.bash @@ -0,0 +1,15 @@ +#!/bin/bash + +set -o errexit +set -o nounset + +# +# *** You should already be logged in to GHCR when you run this *** +# + +NAME="ghcr.io/ponylang/ponyc-ci-x86-64-unknown-linux-fedora39-builder" +TODAY=$(date +%Y%m%d) +DOCKERFILE_DIR="$(dirname "$0")" + +docker build --pull -t "${NAME}:${TODAY}" "${DOCKERFILE_DIR}" +docker push "${NAME}:${TODAY}" diff --git a/.github/workflows/nightlies.yml b/.github/workflows/nightlies.yml index 3d2f7d5799..a1b3ed1ba9 100644 --- a/.github/workflows/nightlies.yml +++ b/.github/workflows/nightlies.yml @@ -24,6 +24,10 @@ jobs: name: x86-64-unknown-linux-musl triple-os: linux-musl triple-vendor: unknown + - image: ghcr.io/ponylang/ponyc-ci-x86-64-unknown-linux-fedora39-builder:20240128 + name: x86-64-unknown-linux-fedora39 + triple-os: linux-fedora39 + triple-vendor: unknown name: ${{ matrix.name }} container: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9dcc2e8708..601c48abf0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -47,6 +47,10 @@ jobs: name: x86-64-unknown-linux-musl triple-os: linux-musl triple-vendor: unknown + - image: ghcr.io/ponylang/ponyc-ci-x86-64-unknown-linux-fedora39-builder:20240128 + name: x86-64-unknown-linux-fedora39 + triple-os: linux-fedora39 + triple-vendor: unknown name: ${{ matrix.name }} container: