Compare commits
7 Commits
a959006935
...
8ef51dc122
Author | SHA1 | Date |
---|---|---|
GroovieGermanikus | 8ef51dc122 | |
GroovieGermanikus | cbb834f13d | |
GroovieGermanikus | 34cfc5876c | |
GroovieGermanikus | 6ec6af4cba | |
GroovieGermanikus | 53daef4cf3 | |
GroovieGermanikus | 7527760481 | |
GroovieGermanikus | 7d2e6ee684 |
|
@ -8,31 +8,55 @@ on:
|
|||
branches:
|
||||
- main
|
||||
|
||||
env:
|
||||
SCCACHE_GHA_ENABLED: true
|
||||
RUSTC_WRAPPER: sccache
|
||||
|
||||
jobs:
|
||||
build_all:
|
||||
name: Rust project - latest
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
sudo apt-get update -y
|
||||
sudo apt-get upgrade -y
|
||||
sudo apt-get install libssl-dev openssl -y
|
||||
|
||||
- name: Install rustfmt
|
||||
run: |
|
||||
rustup component add rustfmt
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
# The toolchain action should definitely be run before the cache action
|
||||
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
with:
|
||||
# use toolchain version from rust-toolchain.toml
|
||||
components: rustfmt, clippy
|
||||
cache: false
|
||||
# avoid the default "-D warnings" which thrashes cache
|
||||
rustflags: ""
|
||||
|
||||
- name: Run sccache-cache
|
||||
uses: mozilla-actions/sccache-action@v0.0.3
|
||||
|
||||
|
||||
# https://github.com/actions/cache/blob/main/examples.md#rust---cargo
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/bin/
|
||||
# ~/.cargo/registry/index/
|
||||
# ~/.cargo/registry/cache/
|
||||
# ~/.cargo/git/db/
|
||||
target/
|
||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||||
|
||||
- name: Early Build
|
||||
run: cargo build --workspace --tests
|
||||
run: |
|
||||
rustc --version
|
||||
echo $RUSTFLAGS
|
||||
cargo build --workspace --tests
|
||||
|
||||
- name: Check Rust Code Format
|
||||
run: cargo fmt -- --check
|
||||
- name: Run fmt+clippy
|
||||
run: |
|
||||
cargo fmt --all --check
|
||||
cargo clippy --workspace --all-targets
|
||||
|
||||
- name: Run Rust Clippy
|
||||
run: cargo clippy --all-targets -- -D warnings
|
||||
|
|
Loading…
Reference in New Issue