Skip to content

Commit 84e790d

Browse files
authored
feat: add musl linux builds (#138)
1 parent b768eac commit 84e790d

5 files changed

Lines changed: 730 additions & 697 deletions

File tree

.github/workflows/release.yml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,33 @@ jobs:
1818
matrix:
1919
build:
2020
- {
21-
NAME: linux-x64-glibc,
21+
NAME: linux-x64,
2222
OS: ubuntu-22.04,
2323
TOOLCHAIN: stable,
2424
TARGET: x86_64-unknown-linux-gnu,
2525
BIN: sherif
2626
}
2727
- {
28-
NAME: linux-arm64-glibc,
28+
NAME: linux-x64-musl,
29+
OS: ubuntu-22.04,
30+
TOOLCHAIN: stable,
31+
TARGET: x86_64-unknown-linux-musl,
32+
BIN: sherif
33+
}
34+
- {
35+
NAME: linux-arm64,
2936
OS: ubuntu-22.04,
3037
TOOLCHAIN: stable,
3138
TARGET: aarch64-unknown-linux-gnu,
3239
BIN: sherif
3340
}
41+
- {
42+
NAME: linux-arm64-musl,
43+
OS: ubuntu-22.04,
44+
TOOLCHAIN: stable,
45+
TARGET: aarch64-unknown-linux-musl,
46+
BIN: sherif
47+
}
3448
- {
3549
NAME: win32-x64-msvc,
3650
OS: windows-2022,
@@ -92,17 +106,21 @@ jobs:
92106
run: |
93107
cd npm
94108
# derive the OS and architecture from the build matrix name
95-
# note: when split by a hyphen, first part is the OS and the second is the architecture
109+
# note: NAME format is either "os-arch" or "os-arch-variant" (e.g., linux-x64-musl)
96110
node_os=$(echo "${{ matrix.build.NAME }}" | cut -d '-' -f1)
97111
export node_os
98112
node_arch=$(echo "${{ matrix.build.NAME }}" | cut -d '-' -f2)
99113
export node_arch
114+
node_variant=$(echo "${{ matrix.build.NAME }}" | cut -d '-' -f3)
115+
export node_variant
100116
# set the version
101117
export node_version="${{ env.RELEASE_VERSION }}"
102118
# set the package name
103119
# note: use 'windows' as OS name instead of 'win32'
104120
if [ "${{ matrix.build.OS }}" = "windows-2022" ]; then
105121
export node_pkg="sherif-windows-${node_arch}"
122+
elif [ -n "${node_variant}" ]; then
123+
export node_pkg="sherif-${node_os}-${node_arch}-${node_variant}"
106124
else
107125
export node_pkg="sherif-${node_os}-${node_arch}"
108126
fi

0 commit comments

Comments
 (0)