Skip to content

Commit

Permalink
Improve CI workflows
Browse files Browse the repository at this point in the history
- only build documentation on new release
- run clippy + rustfmt in addition to tests on each push / pull request
  • Loading branch information
mthh committed Nov 1, 2024
1 parent 93e5b60 commit 5e23012
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 5 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/build_doc.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
on:
push:
tags:
- '*'
pull_request:
- "v*.*.*"

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

name: Build documentation on new release
jobs:
doc:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- run: |
Expand Down
31 changes: 29 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ on:
name: Build and run tests
jobs:
test:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3

- run: |
sudo apt-get install -y libboost1.74-all-dev libmpfr-dev libgmp-dev cmake wget unzip clang libstdc++-11-dev
wget https://github.com/CGAL/cgal/releases/download/v5.6.1/CGAL-5.6.1-library.tar.xz
Expand All @@ -18,4 +19,30 @@ jobs:
unzip SFCGAL-v1.5.0.zip
cd CGAL-5.6.1 && cmake . && sudo make install && cd ..
cd $(ls -d */ | grep SFC) && cmake -DCMAKE_INSTALL_PREFIX=/usr . && make && sudo make install && cd ..
- run: cargo test --all-features
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
components: rustfmt, clippy

- uses: actions-rs/cargo@v1
with:
command: build
args: --all-features

- uses: actions-rs/cargo@v1
with:
command: test
args: --all-features

- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check

- uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings

0 comments on commit 5e23012

Please sign in to comment.