Skip to content
This repository was archived by the owner on Nov 19, 2025. It is now read-only.

Commit 6484f8b

Browse files
Reorder steps to prevent errors
1 parent fafdd5a commit 6484f8b

File tree

1 file changed

+26
-24
lines changed

1 file changed

+26
-24
lines changed

.github/workflows/build.yml

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,23 @@ jobs:
8989
NODE_VERSION: '20.x'
9090
FORCE_COLOR: '1'
9191
steps:
92+
- name: Setup Java
93+
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
94+
with:
95+
distribution: adopt-hotspot
96+
java-version: 21
97+
java-package: jdk
98+
architecture: x64
99+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
100+
with:
101+
ref: ${{ inputs.release-tag || '' }}
92102
- name: Checkout musl
93103
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
94104
with:
95105
repository: kraj/musl
96106
ref: c47ad25ea3b484e10326f933e927c0bc8cded3da # patched 1.2.5 version
97107
path: musl
108+
clean: false
98109
- name: Install musl
99110
run: |
100111
# See https://www.graalvm.org/latest/reference-manual/native-image/guides/build-static-executables/
@@ -120,16 +131,6 @@ jobs:
120131
CC=musl-gcc ./configure --prefix=$MUSL_HOME --static
121132
make && make install
122133
popd
123-
- name: Setup Java
124-
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
125-
with:
126-
distribution: adopt-hotspot
127-
java-version: 21
128-
java-package: jdk
129-
architecture: x64
130-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
131-
with:
132-
ref: ${{ inputs.release-tag || '' }}
133134
- name: Use Node.js ${{ env.NODE_VERSION }}
134135
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # 4.4.0
135136
with:
@@ -191,47 +192,48 @@ jobs:
191192
NODE_VERSION: '20.x'
192193
FORCE_COLOR: '1'
193194
steps:
195+
- name: Setup Java
196+
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
197+
with:
198+
distribution: adopt-hotspot
199+
java-version: 21
200+
java-package: jdk
201+
architecture: x64
202+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
203+
with:
204+
ref: ${{ inputs.release-tag || '' }}
194205
- name: Checkout musl
195206
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
196207
with:
197208
repository: kraj/musl
198209
ref: c47ad25ea3b484e10326f933e927c0bc8cded3da # patched 1.2.5 version
199210
path: musl
211+
clean: false
200212
- name: Install musl
201213
run: |
202214
# See https://www.graalvm.org/latest/reference-manual/native-image/guides/build-static-executables/
203215
export MUSL_HOME=$PWD/musl-toolchain
204-
216+
205217
# Build musl from source
206218
pushd musl
207219
./configure --prefix=$MUSL_HOME --static
208220
sudo make && make install
209221
popd
210-
222+
211223
# Install a symlink for use by native-image
212224
ln -s $MUSL_HOME/bin/musl-gcc $MUSL_HOME/bin/arm64-linux-musl-gcc
213-
225+
214226
# Extend the system path and confirm that musl is available by printing its version
215227
export PATH="$MUSL_HOME/bin:$PATH"
216228
arm64-linux-musl-gcc --version
217-
229+
218230
# Build zlib with musl from source and install into the MUSL_HOME directory
219231
curl -O https://zlib.net/fossils/zlib-1.2.13.tar.gz
220232
tar -xzvf zlib-1.2.13.tar.gz
221233
pushd zlib-1.2.13
222234
CC=musl-gcc ./configure --prefix=$MUSL_HOME --static
223235
make && make install
224236
popd
225-
- name: Setup Java
226-
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
227-
with:
228-
distribution: adopt-hotspot
229-
java-version: 21
230-
java-package: jdk
231-
architecture: x64
232-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
233-
with:
234-
ref: ${{ inputs.release-tag || '' }}
235237
- name: Use Node.js ${{ env.NODE_VERSION }}
236238
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # 4.4.0
237239
with:

0 commit comments

Comments
 (0)