13
13
check :
14
14
name : Check
15
15
outputs :
16
- version : steps.capture.outputs.version
16
+ version : ${{ steps.capture.outputs.version }}
17
17
runs-on : ubuntu-24.04
18
18
steps :
19
19
- name : Git checkout
@@ -37,10 +37,18 @@ jobs:
37
37
id : capture
38
38
run : echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
39
39
40
- release :
41
- name : Release
40
+ releases :
41
+ name : Releases
42
42
needs : check
43
43
runs-on : ubuntu-24.04
44
+ strategy :
45
+ fail-fast : false # Let each build finish.
46
+ matrix :
47
+ target :
48
+ - ' bin-Fedora-28-amd64'
49
+ - ' bin-Ubuntu-focal'
50
+ - ' bin-Ubuntu-jammy'
51
+ - ' bin-Ubuntu-noble'
44
52
steps :
45
53
- name : Git checkout
46
54
uses : actions/checkout@v4
@@ -54,13 +62,41 @@ jobs:
54
62
./configure
55
63
56
64
- name : Build environment setup
57
- run : contrib/cl-repro.sh
65
+ run : |
66
+ distribution=$(echo ${{ matrix.target }} | cut -d'-' -f3)
67
+ echo "Building base image for ${distribution}"
68
+ sudo docker run --rm -v $(pwd):/build ubuntu:${distribution} bash -c "\
69
+ apt-get update && \
70
+ apt-get install -y debootstrap && \
71
+ debootstrap ${distribution} /build/${distribution}"
72
+ sudo tar -C ${distribution} -c . | docker import - ${distribution}
73
+
74
+ # Build Docker image
75
+ docker build -t cl-repro-${distribution} - < contrib/reprobuild/Dockerfile.${distribution}
76
+ if : contains(matrix.target, 'Ubuntu')
58
77
59
78
- name : Build release
60
- run : tools/build-release.sh bin-Fedora-28-amd64 bin-Ubuntu
79
+ run : tools/build-release.sh ${{ matrix.target }}
61
80
62
- - name : Upload release artifacts
81
+ - name : Upload target artifacts
63
82
uses : actions/upload-artifact@v4
64
83
with :
65
84
path : release/
85
+ name : ${{ matrix.target }}
66
86
if-no-files-found : error
87
+
88
+ artifact :
89
+ name : Construct release artifact
90
+ needs :
91
+ - check
92
+ - releases
93
+ env :
94
+ version : ${{ needs.check.outputs.version }}
95
+ runs-on : ubuntu-24.04
96
+ steps :
97
+ - name : Merge artifacts
98
+ uses : actions/upload-artifact/merge@v4
99
+ with :
100
+ name : c-lightning-${{ env.version }}
101
+ pattern : bin-*
102
+ delete-merged : true
0 commit comments