Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 38 additions & 39 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,43 +16,42 @@ jobs:
- name: Run ESLint
run: npm run eslint

build-test-native-image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
repository: 'eclipse/lemminx'
- uses: graalvm/setup-graalvm@557ffcf459751b4d92319ee255bf3bec9b73964c #v1.2.5
with:
distribution: graalvm-community
java-version: 17
- run: ./mvnw -B package -Dnative -DskipTests -Dgraalvm.static=-H:+StaticExecutableWithDynamicLibC -Dcbi.jarsigner.skip=true
- run: mv org.eclipse.lemminx/target/lemminx-* lemminx-linux
- uses: actions/upload-artifact@v4
with:
name: lemminx-linux
path: lemminx-linux
if-no-files-found: error
matrix-smoke-test:
strategy:
fail-fast: false
matrix:
label: [linux-x86_64, linux-aarch_64, osx-x86_64, osx-aarch_64]
include:
- label: linux-x86_64
os: ubuntu-latest
startx: xvfb-run
graalOpt: -Dgraalvm.static=-H:+StaticExecutableWithDynamicLibC
- label: linux-aarch_64
os: ubuntu-24.04-arm
startx: xvfb-run
graalOpt: -Dgraalvm.static=-H:+StaticExecutableWithDynamicLibC
- label: osx-x86_64
os: macos-15-intel
- label: osx-aarch_64
os: macos-latest
uses: ./.github/workflows/smoke-test.yaml
with:
os: ${{ matrix.os }}
label: ${{ matrix.label }}
graalOpt: ${{ matrix.graalOpt }}
startx: ${{ matrix.startx }}
secrets: inherit

smoke-test:
runs-on: ubuntu-latest
needs: build-test-native-image
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: lemminx-linux
path: server
- name: Make lemminx binary executable
run: chmod u+x ./server/lemminx-linux
- name: Make lemminx binary trusted
run: sha256sum ./server/lemminx-linux > ./server/lemminx-linux.sha256
- name: Install dependencies
run: npm i --also=dev
- name: Run smoke test suite
run: xvfb-run npm test
- name: Delete lemminx binary
if: always()
uses: geekyeggo/delete-artifact@e46cfb9575865f907c2beb2e4170b5f4c7d77c52
with:
name: lemminx-linux
matrix-smoke-test-windows:
strategy:
fail-fast: false
matrix:
label: [win32]
include:
- label: win32
os: windows-latest
uses: ./.github/workflows/smoke-test-windows.yaml
with:
os: ${{ matrix.os }}
label: ${{ matrix.label }}
secrets: inherit
53 changes: 53 additions & 0 deletions .github/workflows/smoke-test-windows.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Smoke test (Windows)

on:
workflow_call:
inputs:
os:
required: true
type: string
label:
required: true
type: string

jobs:
build-test-native-image:
runs-on: ${{ inputs.os }}
steps:
- uses: actions/checkout@v4
with:
repository: 'eclipse/lemminx'
- uses: graalvm/setup-graalvm@557ffcf459751b4d92319ee255bf3bec9b73964c #v1.2.5
with:
distribution: graalvm-community
java-version: 17
- run: .\mvnw.cmd -B package -Dnative -DskipTests -D "cbi.jarsigner.skip=true"
- run: mv org.eclipse.lemminx\target\lemminx-* lemminx-${{ inputs.label }}.exe
- uses: actions/upload-artifact@v4
with:
name: lemminx-${{ inputs.label }}
path: lemminx-${{ inputs.label }}.exe
if-no-files-found: error

smoke-test:
runs-on: ${{ inputs.os }}
needs: build-test-native-image
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: lemminx-${{ inputs.label }}
path: server
- name: Make lemminx binary trusted
run: certUtil -hashfile .\server\lemminx-${{ inputs.label }}.exe SHA256 | findstr /v "hash" > .\server\lemminx-${{ inputs.label }}.sha256
- name: show hash
run: type .\server\lemminx-${{ inputs.label }}.sha256
- name: Install dependencies
run: npm i --also=dev
- name: Run smoke test suite
run: npm test
- name: Delete lemminx binary
if: always()
uses: geekyeggo/delete-artifact@e46cfb9575865f907c2beb2e4170b5f4c7d77c52
with:
name: lemminx-${{ inputs.label }}
59 changes: 59 additions & 0 deletions .github/workflows/smoke-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Smoke test

on:
workflow_call:
inputs:
os:
required: true
type: string
label:
required: true
type: string
graalOpt:
required: false
type: string
startx:
required: false
type: string

jobs:
build-test-native-image:
runs-on: ${{ inputs.os }}
steps:
- uses: actions/checkout@v4
with:
repository: 'eclipse/lemminx'
- uses: graalvm/setup-graalvm@557ffcf459751b4d92319ee255bf3bec9b73964c #v1.2.5
with:
distribution: graalvm-community
java-version: 17
- run: ./mvnw -B package -Dnative -DskipTests ${{ inputs.graalOpt }} -Dcbi.jarsigner.skip=true
- run: mv org.eclipse.lemminx/target/lemminx-* lemminx-${{ inputs.label }}
- uses: actions/upload-artifact@v4
with:
name: lemminx-${{ inputs.label }}
path: lemminx-${{ inputs.label }}
if-no-files-found: error

smoke-test:
runs-on: ${{ inputs.os }}
needs: build-test-native-image
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: lemminx-${{ inputs.label }}
path: server
- name: Make lemminx binary executable
run: chmod u+x ./server/lemminx-${{ inputs.label }}
- name: Make lemminx binary trusted
run: openssl sha256 ./server/lemminx-${{ inputs.label }} | awk '{print $2}' > ./server/lemminx-${{ inputs.label }}.sha256
- name: Install dependencies
run: npm i --also=dev
- name: Run smoke test suite
run: ${{ inputs.startx }} npm test
- name: Delete lemminx binary
if: always()
uses: geekyeggo/delete-artifact@e46cfb9575865f907c2beb2e4170b5f4c7d77c52
with:
name: lemminx-${{ inputs.label }}
7 changes: 7 additions & 0 deletions src/server/binary/binaryServerStarter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,13 @@ function getServerBinaryNameWithoutExtension(): string {
default:
return 'lemminx-osx-x86_64';
}
case 'linux':
switch (os.arch()) {
case 'arm64':
return 'lemminx-linux-aarch_64';
default:
return 'lemminx-linux-x86_64';
}
default:
return `lemminx-${os.platform()}`;
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/smoke.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ suite('Smoke tests', function () {
this.timeout(10_000);

// diagnostics take some time to appear; the language server must be started and respond to file open event
const DIAGNOSTICS_DELAY = 4_000;
const DIAGNOSTICS_DELAY = 6_000;

const SCHEMA = `<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
Expand Down
Loading