move to iced 0.10.0 #66
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: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
workflow_dispatch: | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
# todo_to_issue: | |
# name: TODO to Issue | |
# steps: | |
# - uses: alstr/todo-to-issue-action@v4 | |
format: | |
name: Formatting check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
components: rustfmt | |
override: true | |
- uses: mbrobbel/rustfmt-check@master | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
build: | |
name : Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: Swatinem/rust-cache@v1 | |
- run: sudo apt-get install libpulse-dev | |
- name: Build | |
run: cargo build --verbose --release | |
buildnightly: | |
name: Build on nightly toolchain | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install nightly toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
override: true | |
- run: sudo apt-get install libpulse-dev | |
- uses: Swatinem/rust-cache@v1 | |
- name: build | |
run: cargo build --release | |
unittest: | |
name: Unit tests #& integration tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- run: sudo apt-get install libpulse-dev | |
- uses: Swatinem/rust-cache@v1 | |
- name: Unit tests | |
run: cargo test | |
# - name: Integration tests | |
# run: cargo test --test integration | |
unused-dependencies: | |
name: Unused dependencies | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install nightly toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
override: true | |
- name: Run cargo-udeps | |
uses: aig787/cargo-udeps-action@v1 | |
with: | |
version: 'latest' | |
args: '--all-targets' | |
coverage: | |
name: Code coverage | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: Swatinem/rust-cache@v1 | |
- run: sudo apt-get install libpulse-dev | |
- name: Install nightly toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
override: true | |
- name: Install Rust | |
run: rustup toolchain install nightly --component llvm-tools-preview | |
- name: Install cargo-llvm-cov | |
run: curl -LsSf https://github.com/taiki-e/cargo-llvm-cov/releases/latest/download/cargo-llvm-cov-x86_64-unknown-linux-gnu.tar.gz | tar xzf - -C ~/.cargo/bin | |
- uses: Swatinem/rust-cache@v1 | |
- run: cargo llvm-cov clean --workspace | |
- name: Generate code coverage for unit test | |
run: cargo llvm-cov --workspace --no-report | |
# - name: Generate code coverage for integration tests | |
# run: cargo llvm-cov --lcov --no-report --test integration | |
- name: Aggregate reports | |
run: cargo llvm-cov --no-run --lcov --output-path lcov.info | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v1 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos | |
files: lcov.info | |
fail_ci_if_error: true | |
rust-clippy-analyze: | |
name: Clippy analyze | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
security-events: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Install Rust toolchain | |
uses: actions-rs/toolchain@16499b5e05bf2e26879500db0c1d13f7e13fa3af #@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
components: clippy | |
override: true | |
- uses: Swatinem/rust-cache@v1 | |
- name: Install required cargo | |
run: cargo install clippy-sarif sarif-fmt | |
- name: Run rust-clippy | |
run: | |
cargo clippy | |
--all-features | |
--message-format=json | clippy-sarif | tee rust-clippy-results.sarif | sarif-fmt | |
continue-on-error: true | |
- name: Upload analysis results to GitHub | |
uses: github/codeql-action/upload-sarif@v1 | |
with: | |
sarif_file: rust-clippy-results.sarif | |
wait-for-processing: true |