xref: /libCEED/.github/workflows/rust-test-with-style.yml (revision 1d0137909cd290d677dbca28a6953e6505c9d054)
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        export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/lib
30        cd rust && cargo build
31        cargo test
32        cd ..
33    - name: Rust style
34      run: |
35        cd rust && cargo fmt -- --check
36