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:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
|
||||||
|
env:
|
||||||
|
SCCACHE_GHA_ENABLED: true
|
||||||
|
RUSTC_WRAPPER: sccache
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build_all:
|
build_all:
|
||||||
name: Rust project - latest
|
name: Rust project - latest
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
|
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update -y
|
sudo apt-get update -y
|
||||||
sudo apt-get upgrade -y
|
sudo apt-get upgrade -y
|
||||||
sudo apt-get install libssl-dev openssl -y
|
sudo apt-get install libssl-dev openssl -y
|
||||||
|
|
||||||
- name: Install rustfmt
|
- uses: actions/checkout@v4
|
||||||
run: |
|
|
||||||
rustup component add rustfmt
|
# 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
|
- name: Early Build
|
||||||
run: cargo build --workspace --tests
|
run: |
|
||||||
|
rustc --version
|
||||||
|
echo $RUSTFLAGS
|
||||||
|
cargo build --workspace --tests
|
||||||
|
|
||||||
- name: Check Rust Code Format
|
- name: Run fmt+clippy
|
||||||
run: cargo fmt -- --check
|
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