chore(backup): current progress #37
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: | |
branches: [master] | |
paths: [ "**/src/**", '.github/workflows/ci.yml' ] | |
jobs: | |
fmt-clippy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Rust Toolchain and Cache | |
uses: actions-rust-lang/[email protected] | |
with: | |
toolchain: nightly | |
components: rustfmt, clippy | |
- name: Cargo fmt | |
run: | | |
cargo fmt --all -- --check | |
- name: Cargo clippy | |
run: | | |
cargo clippy --workspace -- -D warnings | |
tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Rust Toolchain and Cache | |
uses: actions-rust-lang/[email protected] | |
with: | |
toolchain: nightly | |
- name: Run tests | |
run: | | |
cargo test --workspace --profile ci | |
artifact: | |
strategy: | |
matrix: | |
build: [ linux, windows ] | |
include: | |
- target: windows | |
os: windows-latest | |
extra: '.exe' | |
- target: linux | |
os: ubuntu-latest | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Rust Toolchain and Cache | |
uses: actions-rust-lang/[email protected] | |
with: | |
toolchain: nightly | |
- name: Run | |
run: | | |
cargo build --workspace --release | |
- uses: actions/[email protected] | |
with: | |
name: tools-${{ matrix.os }} | |
path: target/release/backup${{ matrix.extra }} |