chore: rustfmt #2
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: CI | |
on: | |
push: | |
pull_request: | |
jobs: | |
fmt: | |
name: rustfmt | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
components: rustfmt | |
- run: cargo fmt -- --check | |
c: | |
name: C | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./examples/c | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install uftrace | |
run: | | |
sudo apt-get update | |
sudo apt-get install uftrace | |
- uses: mkroening/rust-toolchain-toml@main | |
- uses: Swatinem/rust-cache@v2 | |
- name: Build | |
run: make | |
- name: Run | |
run: | | |
mkdir tracedir | |
./test | |
- name: Replay | |
run: uftrace replay --data=tracedir --output-fields=tid | tee ci.snap | |
- name: Compare to snapshot | |
run: diff ci.snap out.snap | |
rust: | |
name: Rust | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./examples/rust | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install uftrace | |
run: | | |
sudo apt-get update | |
sudo apt-get install uftrace | |
- uses: mkroening/rust-toolchain-toml@main | |
- uses: Swatinem/rust-cache@v2 | |
- name: Build | |
run: cargo rustc -- -Zinstrument-mcount -C passes="ee-instrument post-inline-ee-instrument" | |
- name: Run | |
run: | | |
mkdir tracedir | |
../../target/debug/rftrace-rs-test | |
- name: Replay | |
run: uftrace replay --data=tracedir --output-fields=tid | tee ci.snap | |
- name: Compare to snapshot | |
run: diff ci.snap out.snap |