Fix red CI #763
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
# Replace this line with the commented one to actually run the action in your repo(s) | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- "*" | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
name: CI | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-20.04-16core | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: clippy, rustfmt | |
targets: wasm32-unknown-unknown | |
- name: Install packages (Linux) | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt-get update | |
sudo apt-get -yq --no-install-suggests --no-install-recommends install libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libasound2-dev libxkbcommon-dev # egui_glium dependencies | |
sudo apt-get install libgtk-3-dev # rfd dependencies | |
# make sure all code has been formatted with rustfmt | |
- name: rustfmt | |
run: cargo fmt -- --check --color always | |
- run: cargo fetch | |
- name: cargo clippy | |
run: cargo clippy --all-targets -- -D warnings | |
- name: cargo clippy wasm32-unknown-unknown WITHOUT web feature | |
run: cargo clippy -p puffin --target wasm32-unknown-unknown --no-default-features -- -D warnings | |
- name: cargo clippy wasm32 | |
run: cargo clippy -p puffin_viewer --target wasm32-unknown-unknown --all-features --lib | |
test: | |
name: Test | |
strategy: | |
matrix: | |
os: [ubuntu-20.04-16core, windows-2022-16core, macOS-latest-xl] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@stable | |
- run: cargo fetch | |
- name: Install packages (Linux) | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt-get update | |
sudo apt-get -yq --no-install-suggests --no-install-recommends install libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libasound2-dev libxkbcommon-dev # egui_glium dependencies | |
sudo apt-get install libgtk-3-dev # rfd dependencies | |
- name: cargo test build default features | |
run: cargo build --tests --release | |
- name: cargo test build | |
run: cargo build --tests --release --all-features | |
- name: cargo test | |
run: cargo test -p puffin -p puffin_egui -p puffin_http --release --all-features | |
- name: cargo test --doc | |
run: cargo test --workspace --doc | |
- name: cargo doc | |
run: cargo doc -p puffin -p puffin_egui -p puffin_http -p --lib --no-deps --all-features | |
cargo-vet: | |
name: Vet Dependencies | |
runs-on: ubuntu-20.04-16core | |
env: | |
CARGO_VET_VERSION: 0.9.1 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: actions/cache@v3 | |
with: | |
path: ${{ runner.tool_cache }}/cargo-vet | |
key: cargo-vet-bin-${{ env.CARGO_VET_VERSION }} | |
- name: Add the tool cache directory to the search path | |
run: echo "${{ runner.tool_cache }}/cargo-vet/bin" >> $GITHUB_PATH | |
- name: Ensure that the tool cache is populated with the cargo-vet binary | |
# build from source, as are not published binaries yet :( | |
# tracked in https://github.com/mozilla/cargo-vet/issues/484 | |
run: cargo install --root ${{ runner.tool_cache }}/cargo-vet --version ${{ env.CARGO_VET_VERSION }} cargo-vet | |
- name: Invoke cargo-vet | |
run: | | |
cargo vet --locked | |
cargo vet --locked >> $GITHUB_STEP_SUMMARY |