Skip to content

Commit

Permalink
build: Nightly repro build for Ubuntu Noble.
Browse files Browse the repository at this point in the history
  • Loading branch information
s373nZ committed Sep 5, 2024
1 parent 5ec5580 commit d55177f
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
30 changes: 30 additions & 0 deletions .github/workflows/repro.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
# https://docs.corelightning.org/docs/repro
name: Repro Build Nightly
on:
# TODO: reinstate after testing
# schedule:
# - cron: "0 3 * * *"
# TODO: remove after testing
push:
branches:
- 7117-repro-nightly-builds
jobs:
ubuntu-noble:
name: Ubuntu Noble Repro build
runs-on: ubuntu-22.04
steps:
- name: Git checkout
uses: actions/checkout@v2

- name: Build environment setup
run: |
echo "Building base image for noble"
docker run --rm -v $(pwd):/build ubuntu:noble bash -c "apt-get update && apt-get install -y debootstrap && debootstrap noble /build/noble"
tar -C noble -c . | docker import - noble
- name: Builder image setup
run: docker build -t cl-repro-noble - < contrib/reprobuild/Dockerfile.noble

- name: Build using the builder image
run: docker run --rm -v $GITHUB_WORKSPACE:/repo -e FORCE_MTIME=$(date +%F) -t cl-repro-noble
2 changes: 1 addition & 1 deletion contrib/reprobuild/Dockerfile.noble
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,5 @@ WORKDIR /build
CMD git clone /repo . \
&& poetry export -o requirements.txt --without-hashes \
&& pip install -r requirements.txt \
&& tools/repro-build.sh \
&& tools/repro-build.sh --force-version=$CLN_VERSION --force-mtime=$CLN_BUILD_MTIME \
&& cp *.xz /repo/release/
4 changes: 4 additions & 0 deletions tools/repro-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ fi
PLATFORM="$OS"-"$VER"
VERSION=${FORCE_VERSION:-$(git describe --always --dirty=-modded --abbrev=7 2>/dev/null || pwd | sed -n 's,.*/clightning-\(v[0-9.rc\-]*\)$,\1,p')}

# TODO: remove after testing
echo "Repro Version: $VERSION"
echo "Repro Forced mTime: $FORCE_MTIME"

# eg. ## [0.6.3] - 2019-01-09: "The Smallblock Conspiracy"
# Skip 'v' here in $VERSION
MTIME=${FORCE_MTIME:-$(sed -n "s/^## \\[${VERSION#v}\\] - \\([-0-9]*\\).*/\\1/p" < CHANGELOG.md)}
Expand Down

0 comments on commit d55177f

Please sign in to comment.