Skip to content
Closed
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
40 changes: 40 additions & 0 deletions .github/workflows/rust-code-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Run tests

on: [push, pull_request]

jobs:
test-code:

strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2

- name: Checkout submodules
shell: bash
run: |
GIT_PATH=https://github.com/.extraheader
AUTH_HEADER="$(git config --local --get http.$GIT_PATH)"
git submodule sync --recursive
git -c "http.extraheader=$AUTH_HEADER" \
-c protocol.version=2 \
submodule update --init --force --recursive --depth=1

- name: Install Rust stable
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true

- name: Build
run: |
cargo build --all-features --verbose

- name: Run tests
run: |
cargo test --all-features --verbose
2 changes: 1 addition & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ fn build_c(files: Vec<String>, language: &str) {
.opt_level(get_opt_level())
.debug(get_debug())
.warnings(false)
.flag("-std=c99");
.flag_if_supported("-std=c99");
}
build.compile(&format!("tree-sitter-{}-c", language));
}
Expand Down
1 change: 0 additions & 1 deletion tree-sitter-mozcpp/src/scanner.cc

This file was deleted.

1 change: 1 addition & 0 deletions tree-sitter-mozcpp/src/scanner.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "../../tree-sitter-cpp/src/scanner.cc"