Skip to content

feat: filter questions #27

feat: filter questions

feat: filter questions #27

Workflow file for this run

name: CI
on:
push:
branches: ["dev", "master"]
pull_request:
branches: [master]
env:
CARGO_TERM_COLOR: always
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
rust: [stable, "1.70"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Restore cargo cache
uses: actions/cache@v3
env:
cache-name: ci
with:
path: |
~/.cargo/registry
~/.cargo/git
~/.cargo/bin
target
key: ${{ matrix.os }}-${{ env.cache-name }}-${{ matrix.rust }}-${{ hashFiles('Cargo.lock') }}
- name: MacOS Workaround
if: matrix.os == 'macos-latest'
run: cargo clean -p serde_derive -p thiserror
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
default: true
override: true
profile: minimal
components: clippy
- name: Build Debug
run: |
cargo build
- name: Run tests
run: cargo test
- name: Run clippy
run: |
cargo clippy --workspace --all-features
- name: Build Release
run: cargo build --release
- name: Test Install
run: cargo install --path "." --force
- name: Binary Size (unix)
if: matrix.os != 'windows-latest'
run: |
ls -l ./target/release/leetui
- name: Binary Size (win)
if: matrix.os == 'windows-latest'
run: |
ls -l ./target/release/leetui.exe
- name: Binary dependencies (mac)
if: matrix.os == 'macos-latest'
run: |
otool -L ./target/release/leetui
linting:
name: Lints
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
override: true
components: rustfmt
- run: cargo fmt -- --check
- name: cargo-sort
run: |
cargo install cargo-sort --force
cargo sort -c -w
- name: cargo-deny install
run: |
cargo install --locked cargo-deny
- name: cargo-deny bans
run: |
cargo deny check bans
udeps:
name: udeps
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly
override: true
- name: cargo-udeps
run: |
cargo install --git https://github.com/est31/cargo-udeps --locked
cargo +nightly udeps --all-targets
log-test:
name: Changelog Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Extract release notes
id: extract_release_notes
uses: ffurrer2/extract-release-notes@v1
with:
release_notes_file: ./release-notes.txt
- uses: actions/upload-artifact@v1
with:
name: release-notes.txt
path: ./release-notes.txt