File tree Expand file tree Collapse file tree 6 files changed +287
-135
lines changed
Expand file tree Collapse file tree 6 files changed +287
-135
lines changed Original file line number Diff line number Diff line change 1+ name : Quality Checks
2+
3+ on :
4+ workflow_call :
5+
6+ jobs :
7+ check :
8+ name : Quality Checks
9+ runs-on : ubuntu-latest
10+ strategy :
11+ fail-fast : false
12+ matrix :
13+ target :
14+ - x86_64-unknown-linux-gnu
15+ - x86_64-unknown-none
16+ - riscv64gc-unknown-none-elf
17+ - aarch64-unknown-none-softfloat
18+
19+ steps :
20+ - name : Checkout code
21+ uses : actions/checkout@v4
22+
23+ - name : Install Rust toolchain
24+ uses : dtolnay/rust-toolchain@nightly
25+ with :
26+ components : rust-src, clippy, rustfmt
27+ targets : ${{ matrix.target }}
28+
29+ - name : Check rust version
30+ run : rustc --version --verbose
31+
32+ - name : Check code format
33+ run : cargo fmt --all -- --check
34+
35+ - name : Build
36+ run : cargo build --target ${{ matrix.target }} --all-features
37+
38+ - name : Run clippy
39+ run : cargo clippy --target ${{ matrix.target }} --all-features -- -D warnings -A clippy::new_without_default
40+
41+ - name : Build documentation
42+ env :
43+ RUSTDOCFLAGS : -D rustdoc::broken_intra_doc_links -D missing-docs
44+ run : cargo doc --no-deps --target ${{ matrix.target }} --all-features
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name : Deploy
2+
3+ on :
4+ push :
5+ branches :
6+ - ' **'
7+ tags-ignore :
8+ - ' v*'
9+ - ' v*-pre.*'
10+ pull_request :
11+
12+ permissions :
13+ contents : read
14+ pages : write
15+ id-token : write
16+
17+ concurrency :
18+ group : ' pages'
19+ cancel-in-progress : false
20+
21+ env :
22+ CARGO_TERM_COLOR : always
23+ RUST_BACKTRACE : 1
24+
25+ jobs :
26+ quality-check :
27+ uses : ./.github/workflows/check.yml
28+
29+ test :
30+ uses : ./.github/workflows/test.yml
31+
32+ build-doc :
33+ name : Build documentation
34+ runs-on : ubuntu-latest
35+ needs : quality-check
36+ steps :
37+ - name : Checkout code
38+ uses : actions/checkout@v4
39+
40+ - name : Install Rust toolchain
41+ uses : dtolnay/rust-toolchain@nightly
42+
43+ - name : Build docs
44+ env :
45+ RUSTDOCFLAGS : -D rustdoc::broken_intra_doc_links -D missing-docs
46+ run : |
47+ cargo doc --no-deps --all-features
48+ printf '<meta http-equiv="refresh" content="0;url=axdevice_base/index.html">' > target/doc/index.html
49+
50+ - name : Upload artifact
51+ uses : actions/upload-pages-artifact@v3
52+ with :
53+ path : target/doc
54+
55+ deploy-doc :
56+ name : Deploy to GitHub Pages
57+ environment :
58+ name : github-pages
59+ url : ${{ steps.deployment.outputs.page_url }}
60+ runs-on : ubuntu-latest
61+ needs : build-doc
62+ if : github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
63+ steps :
64+ - name : Deploy to GitHub Pages
65+ id : deployment
66+ uses : actions/deploy-pages@v4
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments