Skip to content

Commit

Permalink
Improve CI (#57)
Browse files Browse the repository at this point in the history
* Improve CI

* Test caching

* Fix cache

* No tests for now

* Test cache
  • Loading branch information
ArthurBrussee authored Dec 5, 2024
1 parent 1b978b9 commit ae23aa2
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 23 deletions.
42 changes: 21 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,39 +6,39 @@ on:
branches: ["main"]
env:
CARGO_TERM_COLOR: always
# These few env vars help reduce disk usage without complexity
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-C debuginfo=0"

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends libatk1.0-dev libgtk-3-dev build-essential

# selecting a toolchain either by action or manual `rustup` calls should happen
# before the plugin, as the cache uses the current rustc version as its cache key
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
targets: wasm32-unknown-unknown, aarch64-linux-android
components: rustfmt, clippy
- name: Build and run checks

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends libatk1.0-dev libgtk-3-dev build-essential
- name: Cache
uses: Swatinem/rust-cache@v2

# Split into separate jobs for parallelization
- name: Build
run: |
cargo build --all-features --verbose
cargo build --target wasm32-unknown-unknown --verbose
cargo clippy --all-targets --all-features -- -D warnings
cargo test --all-features --verbose
- name: Check formatting
run: cargo fmt -- --check
- name: Lint
run: cargo clippy --all-targets --all-features -- -D warnings

- name: Check format
run: cargo fmt -- --check
1 change: 1 addition & 0 deletions crates/brush-render/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,5 @@ pub trait AutodiffBackend:
Backend + burn::tensor::backend::AutodiffBackend<InnerBackend: Backend>
{
}

type InnerWgpu = JitBackend<WgpuRuntime, f32, i32, u32>;
3 changes: 1 addition & 2 deletions crates/brush-train/src/scene.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use std::sync::Arc;

use brush_render::{bounding_box::BoundingBox, camera::Camera};
use glam::Vec3;
use std::sync::Arc;

#[derive(Debug, PartialEq, Eq, Clone, Copy)]
pub enum ViewType {
Expand Down

0 comments on commit ae23aa2

Please sign in to comment.