mirror of
https://github.com/Universal-Debloater-Alliance/universal-android-debloater-next-generation.git
synced 2026-08-27 15:51:34 +02:00
- Big refactoring using the new reusable workflow feature - Better use of caching - Replace lld linker on MacOS/Linux by a better one: https://github.com/rui314/mold - Automatically create a `dev-build` release whenever a commit changing the software code lands into the main branch - Replace unmaintained Github Action `actions-rs/toolchain` by `dtolnay/rust-toolchain` - Update all others Github Actions (I now watch all the repositories to be notified on new release) - Use the new `automatically generated release notes` feature from Github
61 lines
1.6 KiB
YAML
61 lines
1.6 KiB
YAML
name: Continuous Integration
|
|
on:
|
|
push:
|
|
paths:
|
|
- '**.rs'
|
|
- 'Cargo.lock'
|
|
- 'Cargo.toml'
|
|
- '**.json'
|
|
tags-ignore:
|
|
- '*'
|
|
pull_request:
|
|
paths:
|
|
- '**.rs'
|
|
- 'Cargo.lock'
|
|
- 'Cargo.toml'
|
|
- '**.json'
|
|
|
|
jobs:
|
|
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 -- -D warnings"
|
|
- lint: fmt
|
|
args: " --all -- --check"
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: rui314/setup-mold@v1 # faster linker
|
|
with:
|
|
make-default: false
|
|
- uses: actions/cache@v3
|
|
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@nightly
|
|
with:
|
|
components: clippy,rustfmt
|
|
- run: cargo ${{ matrix.lint }}${{ matrix.args }}
|