Skip to content

Commit f0c9738

Browse files
committed
[WIP] matrix build for smoke tests
This lets us smoke test the binaries for every platform instead of just linux x86_64. Signed-off-by: David Thompson <davthomp@redhat.com>
1 parent 9e06486 commit f0c9738

File tree

2 files changed

+47
-11
lines changed

2 files changed

+47
-11
lines changed

.github/workflows/ci.yaml

Lines changed: 40 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,21 @@ jobs:
1717
run: npm run eslint
1818

1919
build-test-native-image:
20-
runs-on: ubuntu-latest
20+
strategy:
21+
matrix:
22+
label: [linux-x86_64, linux-aarch64, osx-x86_64, osx-aarch64]
23+
include:
24+
- label: linux-x86_64
25+
os: ubuntu-latest
26+
opt: -Dgraalvm.static=-H:+StaticExecutableWithDynamicLibC
27+
- label: linux-aarch64
28+
os: ubuntu-24.04-arm
29+
opt: -Dgraalvm.static=-H:+StaticExecutableWithDynamicLibC
30+
- label: osx-x86_64
31+
os: macos-13
32+
- label: osx-aarch64
33+
os: macos-latest
34+
runs-on: ${{ matrix.os }}
2135
steps:
2236
- uses: actions/checkout@v4
2337
with:
@@ -26,33 +40,48 @@ jobs:
2640
with:
2741
distribution: graalvm-community
2842
java-version: 17
29-
- run: ./mvnw -B package -Dnative -DskipTests -Dgraalvm.static=-H:+StaticExecutableWithDynamicLibC -Dcbi.jarsigner.skip=true
30-
- run: mv org.eclipse.lemminx/target/lemminx-* lemminx-linux
43+
- run: ./mvnw -B package -Dnative -DskipTests ${{ matrix.opt }} -Dcbi.jarsigner.skip=true
44+
- run: mv org.eclipse.lemminx/target/lemminx-* lemminx-${{ matrix.label }}
3145
- uses: actions/upload-artifact@v4
3246
with:
33-
name: lemminx-linux
34-
path: lemminx-linux
47+
name: lemminx-${{ matrix.label }}
48+
path: lemminx-${{ matrix.label }}
3549
if-no-files-found: error
3650

3751
smoke-test:
38-
runs-on: ubuntu-latest
52+
strategy:
53+
fail-fast: false
54+
matrix:
55+
label: [linux-x86_64, linux-aarch64, osx-x86_64, osx-aarch64]
56+
include:
57+
- label: linux-x86_64
58+
os: ubuntu-latest
59+
startx: xvfb-run
60+
- label: linux-aarch64
61+
os: ubuntu-24.04-arm
62+
startx: xvfb-run
63+
- label: osx-x86_64
64+
os: macos-13
65+
- label: osx-aarch64
66+
os: macos-latest
67+
runs-on: ${{ matrix.os }}
3968
needs: build-test-native-image
4069
steps:
4170
- uses: actions/checkout@v4
4271
- uses: actions/download-artifact@v4
4372
with:
44-
name: lemminx-linux
73+
name: lemminx-${{ matrix.label }}
4574
path: server
4675
- name: Make lemminx binary executable
47-
run: chmod u+x ./server/lemminx-linux
76+
run: chmod u+x ./server/lemminx-${{ matrix.label }}
4877
- name: Make lemminx binary trusted
49-
run: sha256sum ./server/lemminx-linux > ./server/lemminx-linux.sha256
78+
run: openssl sha256 ./server/lemminx-${{ matrix.label }} | awk '{print $2}' > ./server/lemminx-${{ matrix.label }}.sha256
5079
- name: Install dependencies
5180
run: npm i --also=dev
5281
- name: Run smoke test suite
53-
run: xvfb-run npm test
82+
run: ${{ matrix.startx }} npm test
5483
- name: Delete lemminx binary
5584
if: always()
5685
uses: geekyeggo/delete-artifact@e46cfb9575865f907c2beb2e4170b5f4c7d77c52
5786
with:
58-
name: lemminx-linux
87+
name: lemminx-${{ matrix.label }}

src/server/binary/binaryServerStarter.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,13 @@ function getServerBinaryNameWithoutExtension(): string {
220220
default:
221221
return 'lemminx-osx-x86_64';
222222
}
223+
case 'linux':
224+
switch (os.arch()) {
225+
case 'arm64':
226+
return 'lemminx-linux-aarch64';
227+
default:
228+
return 'lemminx-linux-x86_64';
229+
}
223230
default:
224231
return `lemminx-${os.platform()}`;
225232
}

0 commit comments

Comments
 (0)