Updated Samsung and AOSP packages. #1154
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: Continuous Integration | |
on: | |
push: | |
paths: | |
- Cargo.lock | |
- Cargo.toml | |
- resources/assets/*.ttf | |
- resources/assets/uad_lists.json | |
- src/** | |
pull_request: | |
paths: | |
- Cargo.lock | |
- Cargo.toml | |
- resources/assets/*.ttf | |
- resources/assets/uad_lists.json | |
- src/** | |
jobs: | |
lint: | |
name: lint | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macOS-latest] | |
lint: [check, test, clippy, fmt] | |
exclude: # https://github.com/community/community/discussions/7835 | |
- os: windows-latest | |
lint: clippy | |
- os: windows-latest | |
lint: fmt | |
- os: macOS-latest | |
lint: clippy | |
- os: macOS-latest | |
lint: fmt | |
include: | |
- lint: check | |
args: " --all-features" | |
- lint: test | |
args: "" | |
- lint: clippy | |
args: " --all --all-features" | |
- lint: fmt | |
args: " --all -- --check" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: rui314/setup-mold@v1 # faster linker | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target | |
key: ${{ runner.os }}-${{ matrix.lint }}-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: ${{ runner.OS }}-${{ matrix.lint }}- | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: clippy,rustfmt | |
- run: cargo ${{ matrix.lint }}${{ matrix.args }} | |
coverage: | |
name: coverage | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
- name: Download grcov | |
run: | | |
mkdir -p "${HOME}/.local/bin" | |
curl -sL https://github.com/mozilla/grcov/releases/download/v0.8.19/grcov-x86_64-unknown-linux-gnu.tar.bz2 | tar jxf - -C "${HOME}/.local/bin" | |
echo "$HOME/.local/bin" >> $GITHUB_PATH | |
- name: Install LLVM-profdata | |
run: rustup component add llvm-tools-preview | |
- name: Run tests | |
run: CARGO_INCREMENTAL=0 RUSTFLAGS='-Cinstrument-coverage' LLVM_PROFILE_FILE='cargo-test-%p-%m.profraw' cargo test | |
- name: make coverage directory | |
run: mkdir ./target/coverage | |
- name: Run GRCOV | |
run: grcov . --binary-path ./target/debug/ -s . -t lcov --branch --ignore-not-existing --ignore '../*' --ignore "/*" -o ./target/coverage/tests.lcov |