-
-
Notifications
You must be signed in to change notification settings - Fork 184
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix build for publish report and add arm64
- Loading branch information
Showing
2 changed files
with
17 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,13 +35,13 @@ jobs: | |
actions: write | ||
checks: write | ||
pull-requests: write | ||
name: Build amd64 | ||
name: Build amd64 and arm64 | ||
runs-on: ${{ matrix.runner }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
node: ["18.x", "20.x", "22.x", "23.x"] | ||
runner: ["windows-latest", "ubuntu-latest", "macos-latest"] | ||
runner: ["windows-latest", "ubuntu-latest", "ubuntu-24.04-arm", "macos-latest"] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
|
@@ -56,24 +56,24 @@ jobs: | |
name: Install npm dependencies | ||
- run: npm run lint . | ||
name: Lint | ||
if: matrix.runner == 'ubuntu-latest' | ||
if: startsWith(matrix.runner, 'ubuntu') | ||
- run: npm run typecheck | ||
name: Type check | ||
if: matrix.runner == 'ubuntu-latest' | ||
if: startsWith(matrix.runner, 'ubuntu') | ||
- run: | | ||
set -euo pipefail | ||
sudo apt-get update | ||
sudo apt-get install -y libnss3 | ||
name: Install OS dependencies | ||
if: matrix.runner == 'ubuntu-latest' | ||
if: startsWith(matrix.runner, 'ubuntu') | ||
- run: ./test-driver.sh | ||
name: Verify install | ||
shell: bash | ||
- run: npm run test:ci | ||
name: Run tests | ||
continue-on-error: true | ||
- name: Publish Report | ||
uses: turing85/publish-report@v1 | ||
uses: turing85/publish-report@v2 | ||
if: ${{ always() }} | ||
with: | ||
cancel-workflow-on-error: false | ||
|
@@ -96,57 +96,13 @@ jobs: | |
report-path: junit.xml | ||
report-reporter: jest-junit | ||
|
||
build_arm64: | ||
name: Build arm64 | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
node: ["20", "22", "23"] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: uraimo/[email protected] | ||
name: Verify install | ||
id: build | ||
with: | ||
arch: aarch64 | ||
distro: ubuntu22.04 | ||
env: | # this is just so we can cache each version | ||
GITHUB_WORKFLOW: ${{ github.workflow }}-${{ github.job }}-${{ matrix.node }} | ||
dockerRunArgs: | | ||
--volume "$PWD:/app" | ||
githubToken: ${{ github.token }} | ||
install: | | ||
set -euo pipefail | ||
apt-get update | ||
apt-get -y install xz-utils curl libnss3 | ||
curl -fsSL --output sha https://nodejs.org/dist/latest-v${{ matrix.node }}.x/SHASUMS256.txt | ||
FULL_FILE=`grep 'node-v${{ matrix.node }}.*-linux-arm64.tar.gz' sha | tr -s ' ' | cut -d' ' -f2` | ||
NODE_VERSION=`echo $FULL_FILE | grep --color=never -Eo '[0-9]{2,}\.[0-9]{1,}\.[0-9]{1,}'` | ||
echo "Node version is $NODE_VERSION" | ||
ARCH=arm64 | ||
curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" | ||
tar -xJf "node-v$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local --strip-components=1 --no-same-owner | ||
rm sha | ||
rm "node-v$NODE_VERSION-linux-$ARCH.tar.xz" | ||
run: | | ||
node --version | ||
npm --version | ||
cd /app | ||
npm ci --no-progress | ||
BIN="./lib/chromedriver/chromedriver" | ||
if ! [ -e $BIN ]; then | ||
echo "Binary not found at $BIN" | ||
exit 1 | ||
fi | ||
build_s390x: | ||
name: Build s390x | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
node: ["18", "20", "22", "23"] | ||
node: ["20", "22", "23"] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: uraimo/[email protected] | ||
|
@@ -269,7 +225,7 @@ jobs: | |
id-token: write | ||
name: Publish to npm | ||
runs-on: ubuntu-latest | ||
needs: [build, build_arm64, build_s390x, build_proxy] | ||
needs: [build, build_s390x, build_proxy] | ||
if: success() && startsWith(github.ref, 'refs/tags/') | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters