3333 @semantic-release/changelog
3434 env :
3535 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
36- # - name: Upload release docs artifacts
37- # uses: actions/upload-artifact@v4
38- # with:
39- # name: documentation
40- # path: |
41- # build/release-intro.md
4236
43- linux-release :
44- name : 🐧 Ubuntu build
37+ gcc-musl-build :
38+ name : 🐧 Build release
4539 runs-on : ubuntu-latest
4640 needs : [semantic-release]
4741 if : ${{ needs.semantic-release.outputs.new_release_published == 'true' }}
@@ -62,114 +56,49 @@ jobs:
6256 uses : actions/checkout@v4
6357 with :
6458 fetch-depth : 0
65- - uses : hendrikmuhs/ccache-action@v1.2
66- - name : Install build deps
59+ - name : Build chroot ${{ matrix.target }}
6760 run : |
68- sudo apt install -qy tree cmake make autoconf automake libtool gcc g++ ccache ninja-build
69- - name : Downoad sources from files.dyne.org
61+ sudo make chroot
62+ echo "export ARCH=\"${{ matrix.target }}\"" | sudo tee /alpine/etc/profile
63+ - name : Build gcc-musl ${{ matrix.target }}
7064 run : |
71- cd sources && sh download_from_dyne.sh
72- - name : Build ${{ matrix.target }}
73- env :
74- XZ_OPT : -9e -T0
75- TARGET : ${{ matrix.target }}
65+ /alpine/enter-chroot make gcc
66+ - name : Build libs ${{ matrix.target }}
7667 run : |
77- make -s -j`nproc`
78- make -s install
79- make -C libs ARCH=${{ matrix.target }}
80- - name : Strip and clean binaries
68+ /alpine/enter-chroot make libs
69+ - name : Prepare ${{ matrix.target }}
8170 run : |
82- rm -f /opt/musl-dyne/bin/*-lto-dump
83- rm -f /opt/musl-dyne/${{ matrix.target }}/lib/*.py
84- find /opt/musl-dyne/bin /opt/musl-dyne/lib -type f -exec file {} \; | grep -E '(LSB exec|pie exec|shared obj|ar archive)' | cut -d: -f1 | xargs strip -g
85- find /opt/musl-dyne/${{ matrix.target }} -type f -exec file {} \; | grep -E '(LSB exec|pie exec|shared obj|ar archive)' | cut -d: -f1 | xargs /opt/musl-dyne/bin/${{ matrix.target }}-strip -g
86- rm -rf /opt/musl-dyne/share/man
87- cat README.md | awk '{gsub(/\[[^][]+\]\([^()]+\)/, gensub(/\[([^][]+)\]\([^()]+\)/, "\\1", "g")); print}' | fmt -w 72 > /opt/musl-dyne/README.txt
88- cp settings.cmake /opt/musl-dyne/
71+ /alpine/enter-chroot make prepare
8972 - name : Compress the package
9073 env :
9174 XZ_OPT : -9e -T0
9275 TARGET : ${{ matrix.target }}
9376 run : |
94- echo "Compressing: musl- dyne-${{ matrix.output }}.tar.xz"
95- cd /opt && tar -cJf musl- dyne-${{ matrix.output }}.tar.xz musl- dyne
96- - name : Upload release artifacts musl- dyne-${{ matrix.output }}
77+ echo "Compressing: dyne-gcc-musl -${{ matrix.output }}.tar.xz"
78+ tar -cJf dyne-gcc-musl- ${{ matrix.output }}.tar.xz dyne
79+ - name : Upload release artifacts dyne-gcc-musl -${{ matrix.output }}
9780 uses : actions/upload-artifact@v4
9881 with :
9982 name : release-${{ matrix.output }}
10083 path : |
101- /opt/musl-dyne-${{ matrix.output }}.tar.xz
102-
103- alpine-release :
104- name : 🗻 Alpine build
105- runs-on : ubuntu-latest
106- needs : [semantic-release]
107- if : ${{ needs.semantic-release.outputs.new_release_published == 'true' }}
108- strategy :
109- matrix :
110- include :
111- - target : arm-linux-musleabihf
112- output : arm_hf
113- - target : riscv64-linux-musl
114- output : riscv_64
115- - target : aarch64-linux-musl
116- output : arm_64
117- steps :
118- - uses : actions/checkout@v4
119- - name : Setup latest Alpine Linux
120- uses : jirutka/setup-alpine@v1
121- with :
122- volumes : /opt
123- packages : >-
124- bash
125- make
126- gcc
127- build-base
128- curl
129- patch
130- gawk
131- ccache
132- perl
133- rsync
134- xz
135- - name : Download sources inside Alpine chroot
136- run : |
137- ls -la
138- cd sources && sh download_from_dyne.sh
139- shell : alpine.sh {0}
140- - name : Build musl-dyne inside Alpine chroot
141- env :
142- XZ_OPT : -9e -T0
143- TARGET : ${{ matrix.target }}
144- shell : alpine.sh --root {0}
145- run : |
146- make -j`nproc`
147- make install
148- echo "Compressing: cross-alpine-${{ matrix.output }}.tar.xz"
149- cd /opt && tar -cJf cross-alpine-${{ matrix.output }}.tar.xz musl-dyne
150- - name : Upload release artifacts cross-alpine-${{ matrix.output }}
151- uses : actions/upload-artifact@v4
152- with :
153- name : alpine-${{ matrix.output }}
154- path : |
155- /opt/cross-alpine-${{ matrix.output }}.tar.xz
84+ dyne-gcc-musl-${{ matrix.output }}.tar.xz
15685
15786 draft-binary-release :
158- name : 📦 Pack release
159- needs : [semantic-release, linux-release, alpine-release ]
87+ name : 📦 Upload release
88+ needs : [semantic-release, gcc-musl-build ]
16089 runs-on : ubuntu-latest
16190 steps :
16291 - name : download binary artifacts
16392 uses : actions/download-artifact@v4
16493 with :
16594 path : |
166- musl- dyne
95+ dyne-gcc-musl
16796 - name : show directory structure
168- run : tree -dL 3 musl- dyne
97+ run : tree -dL 3 dyne-gcc-musl
16998 - name : compute sha256 hash checksums
17099 run : |
171- mkdir -p musl- dyne/checksums
172- find musl- dyne -type f -exec sha256sum {} \; | awk '{ split($2, a, "/"); print $1, a[length(a)] }' | tee musl- dyne/checksums/SHA256SUMS.txt
100+ mkdir -p dyne-gcc-musl /checksums
101+ find dyne-gcc-musl -type f -exec sha256sum {} \; | awk '{ split($2, a, "/"); print $1, a[length(a)] }' | tee dyne-gcc-musl /checksums/SHA256SUMS.txt
173102 - name : upload releases to files.dyne.org
174103 uses : appleboy/scp-action@v1
175104 with :
@@ -180,14 +109,11 @@ jobs:
180109 # scp-drone uploads dirs if wildcards are in them, so here
181110 # we need to list uploaded files one by one.
182111 source : |
183- musl-dyne/release-x86_64/musl-dyne-x86_64.tar.xz,
184- musl-dyne/release-arm_hf/musl-dyne-arm_hf.tar.xz,
185- musl-dyne/release-arm_64/musl-dyne-arm_64.tar.xz,
186- musl-dyne/release-riscv_64/musl-dyne-riscv_64.tar.xz,
187- musl-dyne/alpine-arm_hf/cross-alpine-arm_hf.tar.xz,
188- musl-dyne/alpine-arm_64/cross-alpine-arm_64.tar.xz,
189- musl-dyne/alpine-riscv_64/cross-alpine-riscv_64.tar.xz,
190- musl-dyne/checksums/SHA256SUMS.txt
112+ dyne-gcc-musl/release-x86_64/dyne-gcc-musl-x86_64.tar.xz,
113+ dyne-gcc-musl/release-arm_hf/dyne-gcc-musl-arm_hf.tar.xz,
114+ dyne-gcc-musl/release-arm_64/dyne-gcc-musl-arm_64.tar.xz,
115+ dyne-gcc-musl/release-riscv_64/dyne-gcc-musl-riscv_64.tar.xz,
116+ dyne-gcc-musl/checksums/SHA256SUMS.txt
191117 target : |
192118 /srv/ftp/musl
193119 strip_components : 2
@@ -196,20 +122,17 @@ jobs:
196122 uses : softprops/action-gh-release@v2
197123 with :
198124 files : |
199- musl-dyne/release-*/*
200- musl-dyne/alpine-*/*
201- musl-dyne/checksums/SHA256SUMS.txt
125+ dyne-gcc-musl/release-*/*
126+ dyne-gcc-musl/checksums/SHA256SUMS.txt
202127 tag_name : ${{ needs.semantic-release.outputs.new_release_version }}
203- # body_path: musl-dyne/documentation/release-intro.md
204- # append_body: true
205128 draft : false
206129 prerelease : false
207130 fail_on_unmatched_files : true
208131 generate_release_notes : true
209132
210133 remove-tag-on-fail :
211134 name : 🧻 Remove tag on fail
212- needs : [semantic-release, linux-release, alpine-release ]
135+ needs : [semantic-release, gcc-musl-build ]
213136 runs-on : ubuntu-latest
214137 if : ${{ (failure() || cancelled()) && needs.semantic-release.outputs.new_release_published == 'True' }}
215138 steps :
@@ -223,4 +146,4 @@ jobs:
223146 tag_name : ${{ needs.semantic-release.outputs.new_release_version }}
224147 github_token : ${{ secrets.GITHUB_TOKEN }}
225148 delete_release : false
226- repo : dyne/musl-dyne
149+ repo : dyne/musl
0 commit comments