@@ -109,6 +109,51 @@ jobs:
109109 echo "Binary not found at $BIN"
110110 exit 1
111111 fi
112+
113+ build_s390x :
114+ name : Build s390x
115+ runs-on : ubuntu-latest
116+ strategy :
117+ fail-fast : false
118+ matrix :
119+ node : ["16", "18", "19", "20"]
120+ steps :
121+ - uses : actions/checkout@v2
122+ - uses : uraimo/run-on-arch-action@v2.1.1
123+ name : Verify install
124+ id : build
125+ with :
126+ arch : s390x
127+ distro : ubuntu20.04
128+ env : | # this is just so we can cache each version
129+ GITHUB_WORKFLOW: ${{ github.workflow }}-${{ github.job }}-${{ matrix.node }}
130+ dockerRunArgs : |
131+ --volume "$PWD:/app"
132+ githubToken : ${{ github.token }}
133+ install : |
134+ set -euo pipefail
135+ apt-get update
136+ apt-get -y install xz-utils curl libnss3
137+ curl -fsSL --output sha https://nodejs.org/dist/latest-v${{ matrix.node }}.x/SHASUMS256.txt
138+ FULL_FILE=`grep 'node-v${{ matrix.node }}.*-linux-s390x.tar.gz' sha | tr -s ' ' | cut -d' ' -f2`
139+ NODE_VERSION=`echo $FULL_FILE | grep --color=never -Eo '[0-9]{2,}\.[0-9]{1,}\.[0-9]{1,}'`
140+ echo "Node version is $NODE_VERSION"
141+ ARCH=s390x
142+ curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz"
143+ tar -xJf "node-v$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local --strip-components=1 --no-same-owner
144+ rm sha
145+ rm "node-v$NODE_VERSION-linux-$ARCH.tar.xz"
146+ npm install -g npm@latest
147+ run : |
148+ node --version
149+ npm --version
150+ cd /app
151+ npm ci --no-progress
152+ BIN="./lib/chromedriver/chromedriver"
153+ if ! [ -e $BIN ]; then
154+ echo "Binary not found at $BIN"
155+ exit 1
156+ fi
112157
113158 build_proxy :
114159 name : Build with proxy
@@ -141,7 +186,7 @@ jobs:
141186 publish :
142187 name : Publish to npm
143188 runs-on : ubuntu-latest
144- needs : [build, build_arm64, build_proxy]
189+ needs : [build, build_arm64, build_s390x, build_proxy]
145190 if : success() && startsWith(github.ref, 'refs/tags/')
146191 steps :
147192 - uses : actions/checkout@v2
0 commit comments