Skip to content

Commit a0041a6

Browse files
committed
CI: remove focal and add resolute Ubuntu builds
Changelog-None
1 parent 11b8324 commit a0041a6

9 files changed

Lines changed: 99 additions & 117 deletions

File tree

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ release/
88
focal/
99
jammy/
1010
noble/
11+
resolute/

.github/workflows/release.yml

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,12 @@ on:
1414
required: true
1515
skip_validation:
1616
description: Skip release validation for untagged commit testing
17-
default: no
18-
type: choice
19-
options:
20-
- yes
21-
- no
17+
default: false
18+
type: boolean
2219
create_release:
2320
description: Create a draft release
24-
default: no
25-
type: choice
26-
options:
27-
- yes
28-
- no
21+
default: false
22+
type: boolean
2923

3024
jobs:
3125
check:
@@ -54,7 +48,7 @@ jobs:
5448
echo "Determined version: $VERSION"
5549
5650
- name: Validate release
57-
if: github.event_name != 'workflow_dispatch' || github.event.inputs.skip_validation != 'yes'
51+
if: ${{ !(github.event_name == 'workflow_dispatch' && github.event.inputs.skip_validation) }}
5852
run: tools/check-release.sh --version=${VERSION}
5953

6054
- name: Catpure version output
@@ -72,9 +66,9 @@ jobs:
7266
matrix:
7367
target:
7468
- 'bin-Fedora'
75-
- 'bin-Ubuntu-focal'
7669
- 'bin-Ubuntu-jammy'
7770
- 'bin-Ubuntu-noble'
71+
- 'bin-Ubuntu-resolute'
7872
steps:
7973
- name: Git checkout
8074
uses: actions/checkout@v6
@@ -99,7 +93,7 @@ jobs:
9993
- name: Build release
10094
run: |
10195
# Allow build release to execute if manually triggered for testing
102-
if [ "${{ github.event_name }}" == "workflow_dispatch" && github.event.inputs.skip_validation == 'yes' ]; then
96+
if [[ "${{ github.event_name }}" == "workflow_dispatch" && "${{ github.event.inputs.skip_validation }}" == "true" ]]; then
10397
tools/build-release.sh ${{ matrix.target }} --force-version "${{ env.version }}" --force-unclean --force-mtime "$(date +%Y-%m-%d)"
10498
else
10599
tools/build-release.sh ${{ matrix.target }}
@@ -187,7 +181,7 @@ jobs:
187181
echo "release_title=$RELEASE_TITLE" >> "$GITHUB_OUTPUT"
188182
189183
- name: Prepare release draft
190-
if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.create_release == 'yes')
184+
if: ${{ github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.create_release) }}
191185
uses: softprops/action-gh-release@v3
192186
with:
193187
name: "${{ env.version }} ${{ steps.release_data.outputs.release_title }}"

.github/workflows/repro.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
strategy:
1515
fail-fast: false # Let each build finish.
1616
matrix:
17-
version: ['focal', 'jammy', 'noble']
17+
version: ['jammy', 'noble', 'resolute']
1818
steps:
1919
- name: Git checkout
2020
uses: actions/checkout@v6
@@ -93,6 +93,7 @@ jobs:
9393
with:
9494
server_address: smtp.gmail.com
9595
server_port: 587
96+
secure: true
9697
username: ${{ secrets.EMAIL_USERNAME }}
9798
password: ${{ secrets.EMAIL_PASSWORD }}
9899
from: ${{ secrets.EMAIL_USERNAME }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ bionic/
101101
focal/
102102
jammy/
103103
noble/
104+
resolute/
104105
release/
105106
.vscode/
106107
.cache/

contrib/cl-repro.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/sh
2-
# This script creates base images for focal, jammy, and noble. Then it builds the
3-
# cl-repro-focal, cl-repro-jammy, and cl-repro-noble builder images. The base images are created using
2+
# This script creates base images for jammy, noble, and resolute. Then it builds the
3+
# cl-repro-jammy, cl-repro-noble, and cl-repro-resolute builder images. The base images are created using
44
# debootstrap, and the cl-repro images are created using the Dockerfiles in
55
# contrib/reprobuild. These builder images will finally be used to build the
66
# reproducible binaries.
@@ -14,7 +14,7 @@ LIGHTNING_DIR=$PWD
1414
LIGHTNING_DIR=$(echo "$LIGHTNING_DIR" | sed 's|/contrib$||')
1515
echo "Lightning Directory: $LIGHTNING_DIR"
1616

17-
for v in focal jammy noble; do
17+
for v in jammy noble resolute; do
1818
echo "Building base image for $v"
1919
sudo docker run -v "$LIGHTNING_DIR":/build ubuntu:$v \
2020
bash -c "apt-get update && apt-get install -y debootstrap && debootstrap $v /build/$v"
Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM focal
1+
FROM ubuntu:resolute
22

33
ENV TZ=UTC
44
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
@@ -18,41 +18,29 @@ RUN apt-get update \
1818
file \
1919
gettext \
2020
git \
21+
curl \
22+
libsqlite3-dev \
2123
libpq-dev \
2224
libsodium23 \
2325
libsodium-dev \
26+
lowdown \
2427
libtool \
2528
m4 \
2629
sudo \
2730
unzip \
2831
wget \
29-
zip \
30-
&& cd /tmp \
31-
&& wget https://github.com/kristapsdz/lowdown/archive/refs/tags/VERSION_1_0_2.tar.gz \
32-
&& tar -xzf VERSION_1_0_2.tar.gz \
33-
&& cd lowdown-VERSION_1_0_2 \
34-
&& ./configure \
35-
&& make \
36-
&& make install \
37-
&& ldconfig \
38-
&& cd / \
39-
&& rm -rf /tmp/VERSION_1_0_2.tar.gz /tmp/lowdown-VERSION_1_0_2
40-
41-
# Ensure correct ownership
42-
RUN chown root:root /etc/sudoers
43-
RUN chown root:root /usr/lib/sudo/sudoers.so
32+
jq \
33+
zip
4434

45-
# Download and install jq from official repository
46-
RUN wget -O /usr/local/bin/jq https://github.com/jqlang/jq/releases/download/jq-1.6/jq-linux64 \
47-
&& chmod +x /usr/local/bin/jq
35+
# Configure /repo/.git as 'safe.directory'
36+
RUN git config --global --add safe.directory /repo/.git
4837

49-
# install Python3.10 (more reproducible than relying on python3-setuptools)
38+
# Install Python3.10 (more reproducible than relying on python3-setuptools)
5039
RUN git clone https://github.com/pyenv/pyenv.git /root/.pyenv && \
5140
apt-get install -y --no-install-recommends \
5241
libbz2-dev \
5342
libffi-dev \
5443
libreadline-dev \
55-
libsqlite3-dev \
5644
libssl-dev \
5745
zlib1g-dev && \
5846
pyenv install 3.10.0 && \

doc/getting-started/advanced-setup/repro.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,20 +41,20 @@ the non-updated repos).
4141

4242
The following table lists the codenames of distributions that we currently support:
4343

44-
- Ubuntu 20.04:
45-
- Distribution Version: 20.04
46-
- Codename: focal
4744
- Ubuntu 22.04:
4845
- Distribution Version: 22.04
4946
- Codename: jammy
5047
- Ubuntu 24.04:
5148
- Distribution Version: 24.04
5249
- Codename: noble
50+
- Ubuntu 26.04:
51+
- Distribution Version: 26.04
52+
- Codename: resolute
5353

5454
Depending on your host OS release you might not have `debootstrap` manifests for versions newer than your host OS. Due to this we run the `debootstrap` commands in a container of the latest version itself:
5555

5656
```shell
57-
for v in focal jammy noble; do
57+
for v in jammy noble resolute; do
5858
echo "Building base image for $v"
5959
docker run --rm -v $(pwd):/build ubuntu:$v \
6060
bash -c "apt-get update && apt-get install -y debootstrap && debootstrap $v /build/$v"
@@ -86,9 +86,9 @@ For this purpose we have a number of Dockerfiles in the [`contrib/reprobuild`](h
8686
We can then build the builder image by calling `docker build` and passing it the `Dockerfile`:
8787

8888
```shell
89-
docker build -t cl-repro-focal - < contrib/reprobuild/Dockerfile.focal
9089
docker build -t cl-repro-jammy - < contrib/reprobuild/Dockerfile.jammy
9190
docker build -t cl-repro-noble - < contrib/reprobuild/Dockerfile.noble
91+
docker build -t cl-repro-resolute - < contrib/reprobuild/Dockerfile.resolute
9292
```
9393

9494
Since we pass the `Dockerfile` through `stdin` the build command will not create a context, i.e., the current directory is not passed to `docker` and it'll be independent of the currently checked out version. This also means that you will be able to reuse the docker image for future builds, and don't have to repeat this dance every time. Verifying the `Dockerfile` therefore is
@@ -102,9 +102,9 @@ Finally, after finishing the environment setup we can perform the actual build.
102102
We'll need the release directory available for this, so create it now if it doesn't exist:`mkdir release`, then we can simply execute the following command inside the git repository (remember to checkout the tag you are trying to build):
103103

104104
```bash
105-
docker run --rm -v $(pwd):/repo -ti cl-repro-focal
106105
docker run --rm -v $(pwd):/repo -ti cl-repro-jammy
107106
docker run --rm -v $(pwd):/repo -ti cl-repro-noble
107+
docker run --rm -v $(pwd):/repo -ti cl-repro-resolute
108108
```
109109

110110
The last few lines of output also contain the `sha256sum` hashes of all artifacts, so if you're just verifying the build those are the lines that are of interest to you:
@@ -123,7 +123,7 @@ The release captain is in charge of creating the manifest, whereas contributors
123123
## Script build-release
124124
1: Pull latest code from master
125125

126-
2: Run the `tools/build-release.sh bin-Fedora bin-Ubuntu sign` script. This will create a release directory, build binaries for Fedora, and build binaries for Ubuntu (Focal, Jammy, and Noble). Finally, it will sign the ZIP, Fedora, and Ubuntu builds.
126+
2: Run the `tools/build-release.sh bin-Fedora bin-Ubuntu sign` script. This will create a release directory, build binaries for Fedora, and build binaries for Ubuntu (Jammy, Noble, and Resolute). Finally, it will sign the ZIP, Fedora, and Ubuntu builds.
127127

128128
## Manual
129129
The release captain creates the manifest as follows:
@@ -143,7 +143,7 @@ gpg -sb --armor SHA256SUMS
143143

144144
2: Copy above files in the lightning directory.
145145

146-
3: Run `tools/build-release.sh --verify` script. It will build binaries for Ubuntu (Focal, Jammy & Noble), verify zip & Ubuntu builds while copying Fedora checksums from the release captain's file.
146+
3: Run `tools/build-release.sh --verify` script. It will build binaries for Ubuntu (Jammy, Noble & Resolute), verify zip & Ubuntu builds while copying Fedora checksums from the release captain's file.
147147

148148
4. Then send the resulting `release/SHA256SUMS.asc` file to the release captain so it can be merged with the other signatures into `SHASUMS.asc`.
149149

@@ -200,9 +200,9 @@ Producing output similar to the following:
200200
```shell
201201
sha256sum: clightning-v24.11-Fedora-35-amd64.tar.gz: No such file or directory
202202
clightning-v24.11-Fedora-35-amd64.tar.gz: FAILED open or read
203-
clightning-v24.11-Ubuntu-20.04.tar.xz: OK
204203
clightning-v24.11-Ubuntu-22.04.tar.xz: OK
205204
clightning-v24.11-Ubuntu-24.04.tar.xz: OK
205+
clightning-v24.11-Ubuntu-26.04.tar.xz: OK
206206
clightning-v24.11.zip: OK
207207
sha256sum: WARNING: 1 listed file could not be read
208208
```

tools/build-release.sh

Lines changed: 54 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#! /bin/sh
22
set -e
33

4+
echo "RAW ARGS: [$*]"
5+
echo "ARG COUNT: $#"
6+
echo "ARG1: [$1]"
7+
48
# When run inside docker (from below), we do build and drop result in /release
59
if [ "$1" = "--inside-docker" ]; then
610
echo "Inside docker: starting build"
@@ -32,44 +36,54 @@ SUDO=
3236
ALL_TARGETS="bin-Fedora bin-Ubuntu docker sign"
3337
# ALL_TARGETS="bin-Fedora bin-Ubuntu tarball deb docker sign"
3438

35-
for arg; do
36-
case "$arg" in
37-
--force-version=*)
38-
FORCE_VERSION=${arg#*=}
39-
;;
40-
--force-unclean)
41-
FORCE_UNCLEAN=true
42-
;;
43-
--force-mtime=*)
44-
FORCE_MTIME=${arg#*=}
45-
;;
46-
--verify)
47-
VERIFY_RELEASE=true
48-
;;
49-
--without-zip)
50-
WITHOUT_ZIP=true
51-
;;
52-
--sudo)
53-
SUDO=sudo
54-
;;
55-
--help)
56-
echo "Usage: [--force-version=<ver>] [--force-unclean] [--force-mtime=YYYY-MM-DD] [--verify] [TARGETS]"
57-
echo Known targets: "$ALL_TARGETS"
58-
echo "Example: tools/build-release.sh"
59-
echo "Example: tools/build-release.sh --force-version=v23.05 --force-unclean --force-mtime=2023-05-01 bin-Fedora bin-Ubuntu sign"
60-
echo "Example: tools/build-release.sh --verify"
61-
echo "Example: tools/build-release.sh --force-version=v23.05 --force-unclean --force-mtime=2023-05-01 --verify"
62-
echo "Example: tools/build-release.sh docker"
63-
echo "Example: tools/build-release.sh --force-version=v23.05 --force-unclean --force-mtime=2023-05-01 docker"
64-
exit 0
65-
;;
66-
-*)
67-
echo "Unknown arg $arg" >&2
68-
exit 1
69-
;;
70-
*)
71-
break
72-
;;
39+
TARGETS=""
40+
41+
while [ $# -gt 0 ]; do
42+
case "$1" in
43+
--force-version=*)
44+
FORCE_VERSION=${1#*=}
45+
;;
46+
--force-version)
47+
shift
48+
FORCE_VERSION=$1
49+
;;
50+
--force-unclean)
51+
FORCE_UNCLEAN=true
52+
;;
53+
--force-mtime=*)
54+
FORCE_MTIME=${1#*=}
55+
;;
56+
--force-mtime)
57+
shift
58+
FORCE_MTIME=$1
59+
;;
60+
--verify)
61+
VERIFY_RELEASE=true
62+
;;
63+
--without-zip)
64+
WITHOUT_ZIP=true
65+
;;
66+
--sudo)
67+
SUDO=sudo
68+
;;
69+
--help)
70+
echo "Usage: [--force-version=<ver>] [--force-unclean] [--force-mtime=YYYY-MM-DD] [--verify] [TARGETS]"
71+
echo Known targets: "$ALL_TARGETS"
72+
echo "Example: tools/build-release.sh"
73+
echo "Example: tools/build-release.sh --force-version=v23.05 --force-unclean --force-mtime=2023-05-01 bin-Fedora bin-Ubuntu sign"
74+
echo "Example: tools/build-release.sh --verify"
75+
echo "Example: tools/build-release.sh --force-version=v23.05 --force-unclean --force-mtime=2023-05-01 --verify"
76+
echo "Example: tools/build-release.sh docker"
77+
echo "Example: tools/build-release.sh --force-version=v23.05 --force-unclean --force-mtime=2023-05-01 docker"
78+
exit 0
79+
;;
80+
-*)
81+
echo "Unknown arg $1" >&2
82+
exit 1
83+
;;
84+
*)
85+
TARGETS="$TARGETS $1"
86+
;;
7387
esac
7488
shift
7589
done
@@ -124,11 +138,7 @@ if [ "$VERIFY_RELEASE" = "true" ]; then
124138
fi
125139
fi
126140

127-
if [ "$#" = 0 ]; then
128-
TARGETS=" $ALL_TARGETS "
129-
else
130-
TARGETS=" $* "
131-
fi
141+
TARGETS=${TARGETS:-$ALL_TARGETS}
132142

133143
RELEASEDIR="$(pwd)/release"
134144
BARE_VERSION="$(echo "${VERSION}" | sed 's/^v//g')"
@@ -184,7 +194,7 @@ for target in $TARGETS; do
184194
;;
185195
Ubuntu*)
186196
distributions=${platform#Ubuntu-}
187-
[ "$distributions" = "Ubuntu" ] && distributions="focal jammy noble"
197+
[ "$distributions" = "Ubuntu" ] && distributions="jammy noble resolute"
188198
for d in $distributions; do
189199
# Capitalize the first letter of distro
190200
D=$(echo "$d" | awk '{print toupper(substr($0,1,1))substr($0,2)}')

0 commit comments

Comments
 (0)