xref: /libCEED/.github/workflows/rust-test-with-style.yml (revision fdf826bb480f6f0c657574035d43bde2679baed8)
1name: Rust
2
3on:
4  push:
5
6jobs:
7  test:
8    strategy:
9      matrix:
10        os: [ubuntu-20.04]
11        compiler: [gcc-9]
12
13    runs-on: ${{ matrix.os }}
14
15    steps:
16    - name: Environment setup
17      uses: actions/checkout@v2
18    - name: Rust setup
19      uses: actions-rs/toolchain@v1
20      with:
21        toolchain: stable
22    - name: Rust test
23      env:
24        CC: ${{ matrix.compiler }}
25        FC: gfortran-9
26      run: |
27        make info
28        make -j2
29        cd rust && cargo build
30        cargo test
31        cd ..
32    - name: Rust style
33      run: |
34        cd rust && cargo fmt -- --check
35