Compare commits

...

7 Commits

Author SHA1 Message Date
GroovieGermanikus 8ef51dc122 experiment with sccache 2023-09-13 21:14:09 +02:00
GroovieGermanikus cbb834f13d debug version 2023-09-13 21:08:51 +02:00
GroovieGermanikus 34cfc5876c remove -D warnings 2023-09-13 16:49:45 +02:00
GroovieGermanikus 6ec6af4cba ping 2023-09-13 16:30:03 +02:00
GroovieGermanikus 53daef4cf3 add -D warnings to clippy 2023-09-13 16:25:30 +02:00
GroovieGermanikus 7527760481 pick up rust-toolchain.toml for CI§ 2023-09-13 16:16:20 +02:00
GroovieGermanikus 7d2e6ee684 rework github action 2023-09-13 15:29:42 +02:00
1 changed files with 37 additions and 13 deletions

View File

@ -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