-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat: Support running under Node.js (#111)
Signed-off-by: Slavomir Kucera <[email protected]>
- Loading branch information
1 parent
8d70f11
commit dc0c47b
Showing
135 changed files
with
3,189 additions
and
1,269 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 |
---|---|---|
|
@@ -26,108 +26,168 @@ on: | |
- development | ||
|
||
jobs: | ||
win-server: | ||
win-server-build: | ||
name: Windows language server | ||
runs-on: windows-2019 | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Configure | ||
shell: cmd | ||
run: mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release ../ | ||
run: mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_VSIX=Off ../ | ||
- name: Build | ||
shell: cmd | ||
run: cd build && cmake --build . --parallel --config Release | ||
- name: Server Test | ||
shell: cmd | ||
run: cd build\bin && library_test.exe && server_test.exe | ||
- name: Extension Test | ||
shell: cmd | ||
run: npm --prefix .\clients\vscode-hlasmplugin run test | ||
- name: Extension Test Insiders | ||
shell: cmd | ||
run: npm --prefix .\clients\vscode-hlasmplugin run test:insiders | ||
- name: Actions artifact | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: language_server_win | ||
name: language_server_win32 | ||
path: build/bin/language_server.exe | ||
|
||
linux-server: | ||
linux-server-build: | ||
name: Linux language server | ||
runs-on: ubuntu-18.04 | ||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Requirements install | ||
run: sudo apt-get update && sudo apt-get install uuid-dev g++-8 ninja-build | ||
run: sudo apt-get update && sudo apt-get install -y uuid-dev ninja-build | ||
- name: Configure | ||
run: mkdir build && cd build && cmake -G Ninja -DCMAKE_C_COMPILER=gcc-8 -DCMAKE_CXX_COMPILER=g++-8 ../ | ||
run: mkdir build && cd build && cmake -G Ninja -DCMAKE_C_COMPILER=gcc-10 -DCMAKE_CXX_COMPILER=g++-10 -DBUILD_VSIX=Off ../ | ||
- name: Build | ||
run: cd build && cmake --build . | ||
- name: Server Test | ||
run: cd build/bin && ./server_test && ./library_test | ||
- name: Extension Test | ||
uses: GabrielBB/[email protected] | ||
with: | ||
run: npm --prefix clients/vscode-hlasmplugin run test | ||
- name: Extension Test Insiders | ||
uses: GabrielBB/[email protected] | ||
with: | ||
run: npm --prefix clients/vscode-hlasmplugin run test:insiders | ||
- name: Actions artifact | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: language_server_linux | ||
path: build/bin/language_server | ||
|
||
macos-server: | ||
wasm-server-build: | ||
name: WASM language server | ||
runs-on: ubuntu-20.04 | ||
container: emscripten/emsdk:2.0.12 | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Requirements install | ||
run: sudo apt-get update && sudo apt-get install -y ninja-build maven | ||
- name: Configure | ||
run: > | ||
mkdir build && cd build && emcmake cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DDISCOVER_TESTS=Off | ||
-DWITH_LIBCXX=Off -DWITH_STATIC_CRT=Off -DCMAKE_EXE_LINKER_FLAGS="-s NODERAWFS=1" | ||
-DCMAKE_CXX_FLAGS="-s USE_PTHREADS=1 -s PTHREAD_POOL_SIZE=8 -s TOTAL_MEMORY=268435456 -s PROXY_TO_PTHREAD=1 -fexceptions -s NODERAWFS=1 -s EXIT_RUNTIME=1 --bind" | ||
-DCMAKE_CROSSCOMPILING_EMULATOR="node;--experimental-wasm-threads;--experimental-wasm-bulk-memory" | ||
-Dgtest_disable_pthreads=On -DBUILD_VSIX=Off ../ | ||
- name: Build | ||
run: cd build && cmake --build . | ||
- name: Server Test | ||
run: cd build/bin && node --experimental-wasm-threads --experimental-wasm-bulk-memory ./server_test.js && node --experimental-wasm-threads --experimental-wasm-bulk-memory ./library_test.js | ||
- name: Actions artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: language_server_wasm | ||
path: build/bin/language_server.* | ||
|
||
macos-server-build: | ||
name: MacOS language server | ||
runs-on: macos-10.15 | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Requirements install | ||
run: | | ||
brew install ninja llvm@8 | ||
export PATH=~/usr/local/opt/llvm\@8/bin:$PATH | ||
run: brew install ninja | ||
- name: Configure | ||
run: mkdir build && cd build && cmake -G Ninja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DLLVM_PATH=/usr/local/opt/llvm\@8 ../ | ||
run: > | ||
mkdir build && cd build && cmake -G Ninja | ||
-DCMAKE_C_COMPILER=$(brew --prefix llvm)/bin/clang -DCMAKE_CXX_COMPILER=$(brew --prefix llvm)/bin/clang++ | ||
-DLLVM_PATH=$(brew --prefix llvm) -DBUILD_VSIX=Off ../ | ||
- name: Build | ||
run: cd build && cmake --build . -- -v | ||
- name: Server Test | ||
run: cd build/bin && ./server_test && ./library_test | ||
- name: Extension Test | ||
run: npm --prefix clients/vscode-hlasmplugin run test | ||
# Remove the insiders test until it is clear where is the problem with freezing of the test | ||
# - name: Extension Test Insiders | ||
# run: npm --prefix clients/vscode-hlasmplugin run test:insiders | ||
- name: Actions artifact | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: language_server_macos | ||
name: language_server_darwin | ||
path: build/bin/language_server | ||
|
||
test-matrix: | ||
name: Test | ||
runs-on: ${{ matrix.os }} | ||
needs: [win-server-build, linux-server-build, wasm-server-build, macos-server-build] | ||
strategy: | ||
matrix: | ||
include: | ||
- os: ubuntu-20.04 | ||
native: linux | ||
chmod: true | ||
- os: windows-2019 | ||
native: win32 | ||
chmod: false | ||
- os: macos-10.15 | ||
native: darwin | ||
chmod: true | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Download native language server | ||
uses: actions/download-artifact@v1 | ||
with: | ||
name: language_server_${{ matrix.native }} | ||
path: clients/vscode-hlasmplugin/bin/${{ matrix.native }}/ | ||
- name: Run chmod | ||
if: ${{ matrix.chmod }} | ||
run: chmod +x clients/vscode-hlasmplugin/bin/${{ matrix.native }}/language_server | ||
- name: Download wasm language server | ||
uses: actions/download-artifact@v1 | ||
with: | ||
name: language_server_wasm | ||
path: clients/vscode-hlasmplugin/bin/wasm/ | ||
- name: NPM CI | ||
run: npm --prefix clients/vscode-hlasmplugin ci | ||
- name: Extension Test | ||
uses: GabrielBB/[email protected] | ||
with: | ||
run: npm --prefix clients/vscode-hlasmplugin run test | ||
- name: Extension Test WASM | ||
uses: GabrielBB/[email protected] | ||
with: | ||
run: npm --prefix clients/vscode-hlasmplugin run test:wasm | ||
- name: Extension Test Insiders | ||
uses: GabrielBB/[email protected] | ||
with: | ||
run: npm --prefix clients/vscode-hlasmplugin run test:insiders | ||
|
||
VSIX: | ||
runs-on: ubuntu-18.04 | ||
needs: [win-server, linux-server, macos-server] | ||
runs-on: ubuntu-20.04 | ||
needs: [test-matrix] | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Download windows language server | ||
uses: actions/download-artifact@v1 | ||
with: | ||
name: language_server_win | ||
name: language_server_win32 | ||
path: clients/vscode-hlasmplugin/bin/win32/ | ||
- name: Download linux language server | ||
uses: actions/download-artifact@v1 | ||
with: | ||
name: language_server_linux | ||
path: clients/vscode-hlasmplugin/bin/linux/ | ||
- name: Download wasm language server | ||
uses: actions/download-artifact@v1 | ||
with: | ||
name: language_server_wasm | ||
path: clients/vscode-hlasmplugin/bin/wasm/ | ||
- name: Download MacOS language server | ||
uses: actions/download-artifact@v1 | ||
with: | ||
name: language_server_macos | ||
name: language_server_darwin | ||
path: clients/vscode-hlasmplugin/bin/darwin/ | ||
- name: Set executable flag | ||
run: | | ||
|
@@ -154,7 +214,7 @@ jobs: | |
|
||
alpine-VSIX: | ||
name: Alpine VSIX | ||
runs-on: ubuntu-18.04 | ||
runs-on: ubuntu-20.04 | ||
container: | ||
image: alpine:3.10 | ||
|
||
|
@@ -191,7 +251,7 @@ jobs: | |
|
||
release: | ||
name: Release VSIXs | ||
runs-on: ubuntu-18.04 | ||
runs-on: ubuntu-20.04 | ||
if: (github.event_name == 'push' && github.ref == 'refs/heads/master') || (github.event_name == 'push' && startsWith(github.ref, 'refs/heads/release')) | ||
needs: [alpine-VSIX, VSIX] | ||
|
||
|
@@ -265,7 +325,7 @@ jobs: | |
|
||
theia-test: | ||
name: Theia Integration Test | ||
runs-on: ubuntu-18.04 | ||
runs-on: ubuntu-20.04 | ||
needs: alpine-VSIX | ||
strategy: | ||
matrix: | ||
|
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
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
Oops, something went wrong.