Skip to content

Commit 3a995f2

Browse files
committed
Try new workflow
1 parent f16cfe2 commit 3a995f2

File tree

3 files changed

+44
-73
lines changed

3 files changed

+44
-73
lines changed

.github/workflows/clippy.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

.github/workflows/fmt.yml

Lines changed: 0 additions & 14 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 44 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -8,63 +8,66 @@ on:
88

99
env:
1010
RUST_LOG: debug,j4rs=warn
11+
CARGO_INCREMENTAL: 0
12+
RUSTFLAGS: "-C debuginfo=0"
1113

1214
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+
1522
steps:
1623
- uses: actions/checkout@v2
17-
- uses: actions/setup-node@v2
24+
- name: Install Rust
25+
uses: actions-rs/toolchain@v1
1826
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+
2049
- name: Install depedencies
50+
if: matrix.os == 'ubuntu-latest'
2151
run: |
2252
sudo apt update -y
2353
sudo apt install -y check valgrind # required for make plugin
2454
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
2657
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
2961
with:
3062
dotnet-version: "5.0.x"
3163
- 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"
3268
run: |
3369
Rscript -e 'install.packages(c("testthat", "jsonlite", "R.utils"))'
3470
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
3971
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
6972
- name: Run tests
70-
run: cargo test --verbose --no-fail-fast
73+
run: cargo test --no-fail-fast

0 commit comments

Comments
 (0)