3838 - name : Install Node.js v18
3939 uses : actions/setup-node@v3
4040 with :
41- node-version : " 18"
41+ node-version : " 18.15.0 "
4242
4343 - name : Install development tools
4444 run : |
@@ -100,27 +100,37 @@ jobs:
100100 discussion_category_name : " 📣 Announcements"
101101 files : ./release-packages/*
102102
103- # TODO: We should use the same CentOS image to cross-compile if possible?
104103 package-linux-cross :
105104 name : Linux cross-compile builds
106- runs-on : ubuntu-20.04
105+ runs-on : ubuntu-latest
107106 timeout-minutes : 15
108107 needs : npm-version
108+ container : " debian:buster"
109109 strategy :
110110 matrix :
111111 include :
112112 - prefix : aarch64-linux-gnu
113- arch : arm64
113+ npm_arch : arm64
114+ apt_arch : arm64
114115 - prefix : arm-linux-gnueabihf
115- arch : armv7l
116+ npm_arch : armv7l
117+ apt_arch : armhf
116118
117119 env :
118120 AR : ${{ format('{0}-ar', matrix.prefix) }}
121+ AS : ${{ format('{0}-as', matrix.prefix) }}
119122 CC : ${{ format('{0}-gcc', matrix.prefix) }}
123+ CPP : ${{ format('{0}-cpp', matrix.prefix) }}
120124 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 }}
123131 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.
124134 npm_config_build_from_source : true
125135
126136 steps :
@@ -132,30 +142,25 @@ jobs:
132142 with :
133143 node-version : " 18.15.0"
134144
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+
135158 - name : Install nfpm
136159 run : |
137160 mkdir -p ~/.local/bin
138161 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
139162 echo "$HOME/.local/bin" >> $GITHUB_PATH
140163
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-
159164 - name : Download npm package
160165 uses : actions/download-artifact@v3
161166 with :
@@ -183,7 +188,7 @@ jobs:
183188 - name : Build packages with nfpm
184189 env :
185190 VERSION : ${{ env.VERSION }}
186- run : yarn package ${npm_config_arch}
191+ run : npm run package ${npm_config_arch}
187192
188193 - uses : softprops/action-gh-release@v1
189194 with :
@@ -203,7 +208,7 @@ jobs:
203208 - name : Install Node.js v18
204209 uses : actions/setup-node@v3
205210 with :
206- node-version : " 18"
211+ node-version : " 18.15.0 "
207212
208213 - name : Install nfpm
209214 run : |
0 commit comments