Skip to content

Commit a0aa0ca

Browse files
committed
build: Nightly repro build for Ubuntu Noble.
1 parent 0aa52b7 commit a0aa0ca

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed

.github/workflows/repro.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
# https://docs.corelightning.org/docs/repro
3+
name: Repro Build Nightly
4+
on:
5+
# 05:00 Berlin, 03:00 UTC, 23:00 New York, 20:00 Los Angeles
6+
schedule:
7+
- cron: "0 3 * * *"
8+
jobs:
9+
ubuntu-noble:
10+
name: Ubuntu Noble Repro build
11+
runs-on: ubuntu-22.04
12+
steps:
13+
- name: Git checkout
14+
uses: actions/checkout@v2
15+
16+
- name: Build environment setup
17+
run: |
18+
echo "Building base image for noble"
19+
docker run --rm -v $(pwd):/build ubuntu:noble bash -c "apt-get update && apt-get install -y debootstrap && debootstrap noble /build/noble"
20+
tar -C noble -c . | docker import - noble
21+
22+
- name: Builder image setup
23+
run: docker build -t cl-repro-noble - < contrib/reprobuild/Dockerfile.noble
24+
25+
- name: Create release directory
26+
run: mkdir $GITHUB_WORKSPACE/release
27+
28+
- name: Build using the builder image and store Git state.
29+
run: |
30+
# Perform the repro build.
31+
docker run --name cl-build -v $GITHUB_WORKSPACE:/repo -e FORCE_MTIME=$(date +%F) -t cl-repro-noble
32+
33+
# Commit the image and use it to inspect the Git tree state.
34+
docker commit cl-build cl-release
35+
docker run --rm -v $GITHUB_WORKSPACE:/repo -t cl-release git status > release/git-status.txt
36+
docker run --rm -v $GITHUB_WORKSPACE:/repo -t cl-release git diff > release/git-diff.txt
37+
38+
# Change permissions on the release files for access by build environment.
39+
docker run --rm -v $GITHUB_WORKSPACE:/repo -t cl-repro-noble chmod -R 777 /repo/release
40+
41+
- name: Assert clean release
42+
run: |
43+
releasefile=$(ls release/clightning-*)
44+
echo 'Release file:'
45+
ls -al release/clightning-*
46+
47+
if [ -n "$(echo $releasefile | sed -n '/-modded/p')" ]; then
48+
echo "Git Status:"
49+
cat release/git-status.txt
50+
echo "Git Diff:"
51+
cat release/git-diff.txt
52+
53+
echo 'Error: release modded / dirty tree.'
54+
exit 1
55+
else
56+
echo 'Success! Clean release.'
57+
fi

0 commit comments

Comments
 (0)