Moved windows build out into separate job
@@ -15,7 +15,7 @@ env:
CARGO_INCREMENTAL: 0
jobs:
- tests:
+ unix-tests:
name: Unix tests
runs-on: ${{ matrix.os }}
strategy:
@@ -24,7 +24,6 @@ jobs:
os:
- macos-latest
- ubuntu-latest
- - windows-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
@@ -36,7 +35,6 @@ jobs:
echo PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH" >> $GITHUB_ENV
- name: Read Emscripten version
- shell: bash
run: |
printf 'EMSCRIPTEN_VERSION=%s\n' "$(cat cli/emscripten-version)" >> $GITHUB_ENV
@@ -107,3 +105,41 @@ jobs:
lib/binding_web/tree-sitter.wasm
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
+ windows-tests:
+ name: Windows tests
+ runs-on: windows-latest
+ steps:
+ - name: Checkout repo
+ uses: actions/checkout@v2
+
+ - name: Cache artifacts
+ id: cache
+ uses: actions/cache@v2
+ with:
+ path: |
+ ~/.cargo/registry
+ ~/.cargo/git
+ target
+ key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}
+
+ - name: Install rust
+ if: steps.cache.outputs.cache-hit != 'true'
+ uses: actions-rs/toolchain@v1
+ with:
+ toolchain: stable
+ profile: minimal
+
+ - name: Check Rust code formatting
+ run: cargo fmt -- --check
+
+ - name: Build CLI
+ run: RUSTFLAGS="-D warnings" cargo build --release
+
+ - name: Set up fixture parsers
+ run: |
+ script/fetch-fixtures.cmd
+ script/generate-fixtures.cmd
+
+ - name: Run main tests
+ run: script/test
