diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 50bd4ce..ebc8f68 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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: | + 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 @@ -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 diff --git a/Makefile b/Makefile index deb9f0f..f94674f 100644 --- a/Makefile +++ b/Makefile @@ -41,7 +41,7 @@ endif # Windows-specific setup ifeq ($(OS),Windows_NT) - CC = cl + CC = cl.exe AR = lib SOEXT = dll LINKSHARED = /DLL