Skip to content

Commit

Permalink
ci: fix windows CI
Browse files Browse the repository at this point in the history
  • Loading branch information
FoamScience committed Nov 10, 2024
1 parent 4bc96ec commit 69617d9
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 13 deletions.
34 changes: 22 additions & 12 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,37 @@ on:
branches:
- master
jobs:
build-and-test-on-ubuntu-and-macos:
build-and-test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
os: [windows-latest]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
- name: Setup MS build tools on Windows
if: ${{ matrix.os == 'windows-latest' }}
uses: microsoft/setup-msbuild@v2
with:
vs-version: 'latest'
- name: Set up Visual Studio Developer Command Prompt
run: |
$vsdevcmd = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat"
if (Test-Path $vsdevcmd) {
& $vsdevcmd x64
} else {
Write-Error "Developer Command Prompt not found"
exit 1
}
- name: Check if cl.exe is available
run: |
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\*\bin\Hostx64\x64\cl.exe
if ($?) { echo "cl.exe is installed and available"; } else { echo "cl.exe is not installed"; exit 1; }
- run: npm install
- run: mv -force test/corpus_windows/* test/corpus/
if: ${{ matrix.os == 'windows-latest' }}
- run: node_modules/.bin/tree-sitter test
- uses: docker-practice/actions-setup-docker@master
- run: node_modules/.bin/tree-sitter build --wasm
Expand All @@ -27,13 +47,3 @@ jobs:
with:
name: wasm-file
path: tree-sitter-foam.wasm
build-and-test-on-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
- run: npm install
- run: mv -force test/corpus_windows/* test/corpus/
- run: node_modules/.bin/tree-sitter test
2 changes: 1 addition & 1 deletion Makefile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 69617d9

Please sign in to comment.