Skip to content

Commit

Permalink
Update github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Lupus committed Nov 5, 2024
1 parent 29cf735 commit d5ccfed
Showing 1 changed file with 9 additions and 16 deletions.
25 changes: 9 additions & 16 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ jobs:
run:
name: Build
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
fail-fast: true
matrix:
Expand All @@ -25,28 +26,20 @@ jobs:
uses: actions/checkout@v2

- name: OCaml/Opam cache
id: ocaml-rs-smartptr-opam-cache
uses: actions/cache@v2
id: ocaml-rs-opam-cache
uses: actions/cache@v4
with:
path: "~/.opam"
key: ocaml-rs-smartptr-opam-${{ matrix.ocaml-compiler }}-${{ matrix.os }}
key: ocaml-rs-opam-${{ matrix.ocaml-compiler }}-${{ matrix.os }}

- name: Use OCaml ${{ matrix.ocaml-compiler }}
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}

- name: Set Opam env
run: opam env | tr '\n' ' ' >> $GITHUB_ENV
- run: cargo fmt --all -- --check
- run: opam exec -- cargo clippy --all -- -D warnings

- name: Add Opam switch to PATH
run: opam var bin >> $GITHUB_PATH

- name: Cargo fmt
run: cargo fmt --all -- --check

- name: Cargo clippy
run: cargo clippy --all -- -D warnings

- name: Cargo build
run: cargo build --verbose
- run: opam install . --deps-only --with-test
- run: opam exec -- dune build
- run: opam exec -- dune runtest

0 comments on commit d5ccfed

Please sign in to comment.