Skip to content

Commit 0f7c814

Browse files
committed
wip
1 parent 08c0748 commit 0f7c814

1 file changed

Lines changed: 54 additions & 9 deletions

File tree

.github/workflows/node-s390.yml

Lines changed: 54 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,68 @@ name: 'Tests: node.js on s390x'
33
on: [pull_request, push]
44

55
jobs:
6-
tests:
6+
# Alternative 1: Using docker/setup-qemu-action with manual docker run
7+
tests-qemu-manual:
78
runs-on: ubuntu-latest
89
steps:
910
- uses: actions/checkout@v5
1011

11-
- uses: uraimo/run-on-arch-action@v3
12+
- name: Set up QEMU
13+
uses: docker/setup-qemu-action@v3
14+
with:
15+
platforms: s390x
16+
17+
- name: Run tests on s390x using Docker
18+
run: |
19+
docker run --rm --platform linux/s390x \
20+
-v ${{ github.workspace }}:/workspace \
21+
-w /workspace \
22+
node:18 \
23+
bash -c "
24+
apt-get update -q -y && \
25+
apt-get install -q -y git && \
26+
npm install && \
27+
npm run tests-only
28+
"
29+
30+
# Alternative 2: Using uraimo/run-on-arch-action (original approach)
31+
tests-run-on-arch:
32+
runs-on: ubuntu-latest
33+
steps:
34+
- uses: actions/checkout@v5
35+
36+
- uses: uraimo/run-on-arch-action@v2
37+
name: Run tests on s390x
1238
with:
1339
arch: s390x
14-
distro: ubuntu_latest
40+
distro: ubuntu22.04
41+
githubToken: ${{ github.token }}
42+
setup: |
43+
mkdir -p "${PWD}/artifacts"
44+
dockerRunArgs: |
45+
--volume "${PWD}/artifacts:/artifacts"
1546
install: |
1647
apt-get update -q -y
17-
apt-get install -q -y curl
18-
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
19-
. ~/.nvm/nvm.sh
20-
nvm install node
48+
apt-get install -q -y curl git
49+
curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
50+
apt-get install -y nodejs
51+
run: |
2152
node -v
2253
npm -v
23-
run: |
2454
npm install
25-
npm run tests-only
55+
npm run tests-only
56+
57+
# Alternative 3: Using GitHub's buildjet runners (if available)
58+
tests-buildjet:
59+
runs-on: buildjet-2vcpu-ubuntu-2204-arm
60+
continue-on-error: true # This might not be available for all repos
61+
steps:
62+
- uses: actions/checkout@v5
63+
64+
- name: Setup Node.js via Docker on s390x
65+
run: |
66+
docker run --rm --platform linux/s390x \
67+
-v $PWD:/workspace \
68+
-w /workspace \
69+
node:18 \
70+
bash -c "npm install && npm run tests-only"

0 commit comments

Comments
 (0)