Skip to content

Merge pull request #3 from LGY07/dependabot/cargo/rustic_core-0.9.0 #37

Merge pull request #3 from LGY07/dependabot/cargo/rustic_core-0.9.0

Merge pull request #3 from LGY07/dependabot/cargo/rustic_core-0.9.0 #37

Workflow file for this run

name: Rust CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
name: Build (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, windows-latest ]
steps:
- uses: actions/checkout@v4
- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache Cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Check formatting
run: cargo fmt --all -- --check
- name: Build release
run: cargo build --release --verbose
- name: Upload binary
uses: actions/upload-artifact@v4
with:
name: PacMine-${{ runner.os }}
path: |
target/release/PacMine${{ runner.os == 'Windows' && '.exe' || '' }}