2020-11-10 16:29:09 +00:00
|
|
|
name: Rust
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2022-09-24 08:14:53 +00:00
|
|
|
paths-ignore:
|
|
|
|
- '**.md'
|
2020-11-10 16:29:09 +00:00
|
|
|
pull_request:
|
2022-09-24 08:14:53 +00:00
|
|
|
paths-ignore:
|
|
|
|
- '**.md'
|
2020-11-10 16:29:09 +00:00
|
|
|
|
|
|
|
env:
|
|
|
|
CARGO_TERM_COLOR: always
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
windows_stable:
|
2023-01-22 07:47:27 +00:00
|
|
|
# runs-on: windows-latest
|
|
|
|
runs-on: [self-hosted, Windows]
|
2020-11-10 16:29:09 +00:00
|
|
|
steps:
|
2023-01-22 07:47:27 +00:00
|
|
|
# - name: Ninja Install
|
|
|
|
# run: pip install ninja
|
2022-09-24 08:14:53 +00:00
|
|
|
- uses: actions/checkout@v3
|
2023-10-30 03:42:00 +00:00
|
|
|
- name: Build tests
|
2023-10-31 09:44:20 +00:00
|
|
|
run: cargo build --tests --verbose
|
2020-11-10 16:29:09 +00:00
|
|
|
- name: Run tests
|
|
|
|
run: cargo test --verbose
|
2023-10-30 03:42:00 +00:00
|
|
|
- name: Build examples
|
|
|
|
run: |
|
|
|
|
cd examples
|
|
|
|
cargo build --verbose
|
2020-11-10 16:29:09 +00:00
|
|
|
linux_stable:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-09-24 08:14:53 +00:00
|
|
|
- uses: actions/checkout@v3
|
2023-10-30 03:42:00 +00:00
|
|
|
- name: Build tests
|
2023-10-31 09:44:20 +00:00
|
|
|
run: cargo build --tests --verbose
|
2020-11-10 16:29:09 +00:00
|
|
|
- name: Run tests
|
|
|
|
run: cargo test --verbose
|
2023-10-30 03:42:00 +00:00
|
|
|
- name: Build examples
|
|
|
|
run: |
|
|
|
|
cd examples
|
|
|
|
cargo build --verbose
|
2020-11-10 16:29:09 +00:00
|
|
|
macos_stable:
|
|
|
|
runs-on: macos-latest
|
|
|
|
steps:
|
2022-09-24 08:14:53 +00:00
|
|
|
- uses: actions/checkout@v3
|
2023-10-30 03:42:00 +00:00
|
|
|
- name: Build tests
|
2023-10-31 09:44:20 +00:00
|
|
|
run: cargo build --tests --verbose
|
2020-11-10 16:29:09 +00:00
|
|
|
- name: Run tests
|
|
|
|
run: cargo test --verbose
|
2023-10-30 03:42:00 +00:00
|
|
|
- name: Build examples
|
|
|
|
run: |
|
|
|
|
cd examples
|
|
|
|
cargo build --verbose
|
2024-01-05 08:08:36 +00:00
|
|
|
clippy:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Run clippy check
|
|
|
|
run: |
|
|
|
|
rustup component add clippy
|
|
|
|
cargo clippy -- -Dwarnings
|
2024-01-03 08:45:14 +00:00
|
|
|
fmt:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
2024-01-05 08:08:36 +00:00
|
|
|
- name: Run fmt check
|
2024-01-03 08:45:14 +00:00
|
|
|
run: |
|
|
|
|
rustup toolchain install nightly --component rustfmt
|
|
|
|
cargo +nightly fmt --check
|