chore: toolchain と dependencies の更新 #310
Workflow file for this run
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: build | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
merge_group: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
timeout-minutes: 40 | |
steps: | |
- uses: actions/checkout@v4 | |
- id: parse-toolchain | |
run: cat ./rust-toolchain.toml | awk '/channel = / { print $3 }' | xargs -I% echo spec=% >> $GITHUB_OUTPUT | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ steps.parse-toolchain.outputs.spec }} | |
- uses: Swatinem/rust-cache@v2 | |
- name: install native deps | |
run: sudo apt update && sudo apt install clang llvm pkg-config nettle-dev fontforge | |
- run: cargo install cargo-udeps --locked | |
- run: cargo fmt -- --check | |
- run: ./download_font.sh | |
- run: cargo udeps --no-default-features --features dev | |
- run: cargo udeps --no-default-features --features discord_client,mongo_db,plot_plotters_static | |
- uses: actions-rs/clippy-check@v1 | |
with: | |
name: dev clippy | |
token: ${{ secrets.GITHUB_TOKEN }} | |
args: --no-default-features --features dev | |
- uses: actions-rs/clippy-check@v1 | |
with: | |
name: prod clippy | |
token: ${{ secrets.GITHUB_TOKEN }} | |
args: --no-default-features --features discord_client,mongo_db,plot_plotters_static | |
- name: dev test | |
run: cargo test --no-default-features --features dev | |
- name: prod test | |
run: cargo test --no-default-features --features discord_client,mongo_db,plot_plotters_static |