mirror of
https://github.com/danbulant/Portfolio
synced 2026-05-19 12:29:09 +00:00
48 lines
1.1 KiB
YAML
48 lines
1.1 KiB
YAML
name: Rust
|
|
|
|
on:
|
|
push: { branches: [master] }
|
|
pull_request:
|
|
branches: [ "*" ]
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Check out 🚚
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Install latest stable Rust toolchain 🦀
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: stable
|
|
override: true
|
|
default: true
|
|
|
|
- name: Install latest stable Mold linker 🦠
|
|
uses: rui314/setup-mold@v1
|
|
with:
|
|
make-default: true
|
|
|
|
- name: Set up cargo cache 📦
|
|
uses: actions/cache@v3
|
|
continue-on-error: false
|
|
with:
|
|
path: |
|
|
~/.cargo/bin/
|
|
~/.cargo/registry/index/
|
|
~/.cargo/registry/cache/
|
|
~/.cargo/git/db/
|
|
target/
|
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
|
|
- name: Build 🔨
|
|
run: cargo build --verbose
|
|
|
|
- name: Run tests 🚀
|
|
run: cargo test --all --verbose
|