replace hld #738
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Rust | |
on: | |
push: | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
changes: | |
runs-on: ubuntu-latest | |
outputs: | |
trigger: ${{ steps.changes.outputs.triggers }} | |
steps: | |
- name: Clone Project | |
uses: actions/checkout@v4 | |
with: | |
lfs: false | |
- uses: dorny/paths-filter@v2 | |
id: changes | |
with: | |
filters: | | |
triggers: | |
- 'libs/**' | |
- '.github/workflows/rust.yml' | |
lint: | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
needs: changes | |
if: needs.changes.outputs.trigger == 'true' | |
steps: | |
- name: Clone Project | |
uses: actions/checkout@v4 | |
with: | |
lfs: false | |
- name: Setup Rust | |
uses: ./.github/actions/setup-rust | |
- name: Clippy | |
working-directory: . | |
run: cargo make clippy | |
doctest: | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
needs: changes | |
if: needs.changes.outputs.trigger == 'true' | |
steps: | |
- name: Clone Project | |
uses: actions/checkout@v4 | |
with: | |
lfs: false | |
- name: Setup Rust | |
uses: ./.github/actions/setup-rust | |
- name: Doctest | |
working-directory: . | |
run: cargo make test-doc | |
test: | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
needs: changes | |
if: needs.changes.outputs.trigger == 'true' | |
steps: | |
- name: Clone Project | |
uses: actions/checkout@v4 | |
with: | |
lfs: false | |
- name: Setup Rust | |
uses: ./.github/actions/setup-rust | |
- name: Test | |
working-directory: . | |
run: cargo make test | |
docs: | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
needs: changes | |
if: needs.changes.outputs.trigger == 'true' | |
steps: | |
- name: Clone Project | |
uses: actions/checkout@v4 | |
with: | |
lfs: false | |
- name: Setup Rust | |
uses: ./.github/actions/setup-rust | |
- uses: davidB/rust-cargo-make@v1 | |
- name: Run makers docs | |
run: cargo make docs | |
- name: Check that crates.js is surely copied | |
run: test -e target/doc/crates.js | |
- name: Deploy GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: target/doc |