38
38
- name : Install Node.js v18
39
39
uses : actions/setup-node@v3
40
40
with :
41
- node-version : " 18"
41
+ node-version : " 18.15.0 "
42
42
43
43
- name : Install development tools
44
44
run : |
@@ -100,27 +100,37 @@ jobs:
100
100
discussion_category_name : " 📣 Announcements"
101
101
files : ./release-packages/*
102
102
103
- # TODO: We should use the same CentOS image to cross-compile if possible?
104
103
package-linux-cross :
105
104
name : Linux cross-compile builds
106
- runs-on : ubuntu-20.04
105
+ runs-on : ubuntu-latest
107
106
timeout-minutes : 15
108
107
needs : npm-version
108
+ container : " debian:buster"
109
109
strategy :
110
110
matrix :
111
111
include :
112
112
- prefix : aarch64-linux-gnu
113
- arch : arm64
113
+ npm_arch : arm64
114
+ apt_arch : arm64
114
115
- prefix : arm-linux-gnueabihf
115
- arch : armv7l
116
+ npm_arch : armv7l
117
+ apt_arch : armhf
116
118
117
119
env :
118
120
AR : ${{ format('{0}-ar', matrix.prefix) }}
121
+ AS : ${{ format('{0}-as', matrix.prefix) }}
119
122
CC : ${{ format('{0}-gcc', matrix.prefix) }}
123
+ CPP : ${{ format('{0}-cpp', matrix.prefix) }}
120
124
CXX : ${{ format('{0}-g++', matrix.prefix) }}
121
- LINK : ${{ format('{0}-g++', matrix.prefix) }}
122
- npm_config_arch : ${{ matrix.arch }}
125
+ FC : ${{ format('{0}-gfortran', matrix.prefix) }}
126
+ LD : ${{ format('{0}-ld', matrix.prefix) }}
127
+ STRIP : ${{ format('{0}-strip', matrix.prefix) }}
128
+ PKG_CONFIG_PATH : ${{ format('/usr/lib/{0}/pkgconfig', matrix.prefix) }}
129
+ TARGET_ARCH : ${{ matrix.apt_arch }}
130
+ npm_config_arch : ${{ matrix.npm_arch }}
123
131
NODE_VERSION : v18.15.0
132
+ # Not building from source results in an x86_64 argon2, as if
133
+ # npm_config_arch is being ignored.
124
134
npm_config_build_from_source : true
125
135
126
136
steps :
@@ -132,30 +142,25 @@ jobs:
132
142
with :
133
143
node-version : " 18.15.0"
134
144
145
+ - name : Install cross-compiler and system dependencies
146
+ run : |
147
+ dpkg --add-architecture $TARGET_ARCH
148
+ apt-get update && apt-get install -y --no-install-recommends \
149
+ crossbuild-essential-$TARGET_ARCH \
150
+ libx11-dev:$TARGET_ARCH \
151
+ libx11-xcb-dev:$TARGET_ARCH \
152
+ libxkbfile-dev:$TARGET_ARCH \
153
+ libsecret-1-dev:$TARGET_ARCH \
154
+ libkrb5-dev:$TARGET_ARCH \
155
+ ca-certificates \
156
+ curl wget rsync gettext-base
157
+
135
158
- name : Install nfpm
136
159
run : |
137
160
mkdir -p ~/.local/bin
138
161
curl -sSfL https://github.com/goreleaser/nfpm/releases/download/v2.3.1/nfpm_2.3.1_`uname -s`_`uname -m`.tar.gz | tar -C ~/.local/bin -zxv nfpm
139
162
echo "$HOME/.local/bin" >> $GITHUB_PATH
140
163
141
- - name : Install cross-compiler and system dependencies (arm64)
142
- if : ${{ matrix.arch != 'armv7l' }}
143
- run : sudo apt update && sudo apt install -y $PACKAGE libkrb5-dev
144
- env :
145
- PACKAGE : ${{ format('g++-{0}', matrix.prefix) }}
146
-
147
- - name : Install cross-compiler and system dependencies (armv7l)
148
- if : ${{ matrix.arch == 'armv7l' }}
149
- run : |
150
- sudo sed -i "s/^deb/deb [arch=amd64,i386]/g" /etc/apt/sources.list
151
- echo "deb [arch=arm64,armhf] http://ports.ubuntu.com/ $(lsb_release -s -c) main universe multiverse restricted" | sudo tee -a /etc/apt/sources.list
152
- echo "deb [arch=arm64,armhf] http://ports.ubuntu.com/ $(lsb_release -s -c)-updates main universe multiverse restricted" | sudo tee -a /etc/apt/sources.list
153
- sudo dpkg --add-architecture armhf
154
- sudo apt update
155
- sudo apt install -y $PACKAGE libkrb5-dev:armhf
156
- env :
157
- PACKAGE : ${{ format('g++-{0}', matrix.prefix) }}
158
-
159
164
- name : Download npm package
160
165
uses : actions/download-artifact@v3
161
166
with :
@@ -183,7 +188,7 @@ jobs:
183
188
- name : Build packages with nfpm
184
189
env :
185
190
VERSION : ${{ env.VERSION }}
186
- run : yarn package ${npm_config_arch}
191
+ run : npm run package ${npm_config_arch}
187
192
188
193
- uses : softprops/action-gh-release@v1
189
194
with :
@@ -203,7 +208,7 @@ jobs:
203
208
- name : Install Node.js v18
204
209
uses : actions/setup-node@v3
205
210
with :
206
- node-version : " 18"
211
+ node-version : " 18.15.0 "
207
212
208
213
- name : Install nfpm
209
214
run : |
0 commit comments