Skip to content

Commit

Permalink
Add Rust CI workflow, run C++ workflow on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
nazar-pc committed Mar 14, 2023
1 parent 57bdca5 commit bf6a20d
Show file tree
Hide file tree
Showing 2 changed files with 89 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/build-test-cplusplus.yml
Expand Up @@ -62,6 +62,21 @@ jobs:
# cmake --build . -- -j 6
# TSAN_OPTIONS="memory_limit_mb=6000" ./RunTests

macos:
name: macOS Latest
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: cmake, RunTests with macOS
run: |
mkdir build-macos
cd build-macos
cmake ..
cmake --build . --config Release -j 6
ctest -C Release -j 6
windows:
name: Windows Latest
runs-on: windows-latest
Expand Down
74 changes: 74 additions & 0 deletions .github/workflows/rust.yml
@@ -0,0 +1,74 @@
name: Rust

on: ["push", "pull_request"]

concurrency:
group: rust-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
# Not needed in CI, should make things a bit faster
CARGO_INCREMENTAL: 0
CARGO_TERM_COLOR: always

jobs:
cargo-fmt:
runs-on: ubuntu-22.04

steps:
- name: Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # @v3.1.0

- name: cargo fmt
uses: actions-rs/cargo@ae10961054e4aa8b4aa7dffede299aaf087aa33b # @v1.0.1
with:
command: fmt
args: --all -- --check

cargo-clippy:
strategy:
matrix:
os:
- ubuntu-22.04
- macos-12
- windows-2022

runs-on: ${{ matrix.os }}

steps:
- name: Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # @v3.1.0

- name: cargo clippy
uses: actions-rs/clippy-check@b5b5f21f4797c02da247df37026fcd0a5024aa4d # @v1.0.7
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --locked --all-targets -- -D warnings

cargo-docs:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # @v3.1.0

- name: Check Documentation
run: cargo doc --locked --all --no-deps --lib

cargo-test:
strategy:
matrix:
os:
- ubuntu-22.04
- macos-12
- windows-2022

runs-on: ${{ matrix.os }}

steps:
- name: Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # @v3.1.0

- name: cargo test --locked
uses: actions-rs/cargo@ae10961054e4aa8b4aa7dffede299aaf087aa33b # @v1.0.1
with:
command: test

0 comments on commit bf6a20d

Please sign in to comment.