|
8 | 8 |
|
9 | 9 | env: |
10 | 10 | RUST_LOG: debug,j4rs=warn |
| 11 | + CARGO_INCREMENTAL: 0 |
| 12 | + RUSTFLAGS: "-C debuginfo=0" |
11 | 13 |
|
12 | 14 | jobs: |
13 | | - linux: |
14 | | - runs-on: ubuntu-latest |
| 15 | + test: |
| 16 | + strategy: |
| 17 | + matrix: |
| 18 | + os: [ubuntu-latest, windows-latest, macos-latest] |
| 19 | + fail-fast: false |
| 20 | + runs-on: ${{ matrix.os }} |
| 21 | + |
15 | 22 | steps: |
16 | 23 | - uses: actions/checkout@v2 |
17 | | - - uses: actions/setup-node@v2 |
| 24 | + - name: Install Rust |
| 25 | + uses: actions-rs/toolchain@v1 |
18 | 26 | with: |
19 | | - node-version: '16' |
| 27 | + profile: minimal |
| 28 | + toolchain: stable |
| 29 | + components: rustfmt, clippy |
| 30 | + - uses: Swatinem/rust-cache@v1 |
| 31 | + |
| 32 | + - name: Diagnostics on Windows |
| 33 | + if: matrix.os == 'windows-latest' |
| 34 | + run: "gci env:" |
| 35 | + |
| 36 | + - name: Rustfmt |
| 37 | + uses: actions/checkout@v2 |
| 38 | + run: cargo fmt -- --check |
| 39 | + |
| 40 | + - name: Clippy |
| 41 | + uses: actions-rs/clippy-check@v1 |
| 42 | + with: |
| 43 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 44 | + args: --all-features |
| 45 | + |
| 46 | + - name: Build test binary |
| 47 | + run: cargo test --no-run |
| 48 | + |
20 | 49 | - name: Install depedencies |
| 50 | + if: matrix.os == 'ubuntu-latest' |
21 | 51 | run: | |
22 | 52 | sudo apt update -y |
23 | 53 | sudo apt install -y check valgrind # required for make plugin |
24 | 54 | sudo apt install -y libcurl4-gnutls-dev libgit2-dev # required for R |
25 | | - - uses: r-lib/actions/setup-r@v1 |
| 55 | + - name: Install Node |
| 56 | + uses: actions/setup-node@v2 |
26 | 57 | with: |
27 | | - r-version: "3.5.3" |
28 | | - - uses: actions/setup-dotnet@v1 |
| 58 | + node-version: "16" |
| 59 | + - name: Install C# |
| 60 | + uses: actions/setup-dotnet@v1 |
29 | 61 | with: |
30 | 62 | dotnet-version: "5.0.x" |
31 | 63 | - name: Install tmc-r-tester |
| 64 | + if: matrix.os == 'ubuntu-latest' |
| 65 | + uses: r-lib/actions/setup-r@v1 |
| 66 | + with: |
| 67 | + r-version: "3.5.3" |
32 | 68 | run: | |
33 | 69 | Rscript -e 'install.packages(c("testthat", "jsonlite", "R.utils"))' |
34 | 70 | Rscript -e 'install.packages("plugins/r/tests/tmcRtestrunner", repos=NULL, type="source")' |
35 | | - - name: Build test binary |
36 | | - run: cargo test --no-run --verbose |
37 | | - - name: Run tests |
38 | | - run: cargo test --verbose --no-fail-fast |
39 | 71 |
|
40 | | - windows: |
41 | | - runs-on: windows-latest |
42 | | - steps: # TODO: install missing dependencies and run all tests on windows |
43 | | - - uses: actions/checkout@v2 |
44 | | - - uses: actions/setup-node@v2 |
45 | | - with: |
46 | | - node-version: '16' |
47 | | - - uses: actions/setup-dotnet@v1 |
48 | | - with: |
49 | | - dotnet-version: "5.0.x" |
50 | | - - name: Diagnostics |
51 | | - run: "gci env:" |
52 | | - - name: Build test binary |
53 | | - run: cargo test --no-run --verbose |
54 | | - - name: Run tests |
55 | | - run: cargo test --verbose --no-fail-fast |
56 | | - |
57 | | - macos: |
58 | | - runs-on: macos-latest |
59 | | - steps: # TODO: install missing dependencies and run all tests on macos |
60 | | - - uses: actions/checkout@v2 |
61 | | - - uses: actions/setup-node@v2 |
62 | | - with: |
63 | | - node-version: '16' |
64 | | - - uses: actions/setup-dotnet@v1 |
65 | | - with: |
66 | | - dotnet-version: "5.0.x" |
67 | | - - name: Build test binary |
68 | | - run: cargo test --no-run --verbose |
69 | 72 | - name: Run tests |
70 | | - run: cargo test --verbose --no-fail-fast |
| 73 | + run: cargo test --no-fail-fast |
0 commit comments