From 24680a7bfd74c30f0b1abdfde056185026b20d65 Mon Sep 17 00:00:00 2001 From: Andrew Gazelka Date: Sun, 24 Mar 2024 13:58:19 -0500 Subject: [PATCH 1/4] ci: improve speeds --- .cargo/config.toml | 16 +++++++-------- .github/workflows/build.yml | 39 ++++++++++++++----------------------- 2 files changed, 23 insertions(+), 32 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index 9af0179b..b43f87ee 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,14 +1,14 @@ # https://github.com/bevyengine/bevy/blob/main/.cargo/config_fast_builds.toml # https://nnethercote.github.io/perf-book/build-configuration.html -[target.x86_64-unknown-linux-gnu] -linker = "clang" -rustflags = [ - "-Ctarget-cpu=native", - "-Clink-arg=-fuse-ld=lld", - "-Zshare-generics=y", - "-Zthreads=0", -] +#[target.x86_64-unknown-linux-gnu] +#linker = "clang" +#rustflags = [ +# "-Ctarget-cpu=native", +# "-Clink-arg=-fuse-ld=lld", +# "-Zshare-generics=y", +# "-Zthreads=0", +#] [target.x86_64-unknown-linux-musl] linker = "clang" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c5bb5bac..240f8efa 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,13 +20,10 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - - name: Install rust toolchain - uses: dtolnay/rust-toolchain@nightly - - - uses: Swatinem/rust-cache@v2 - - name: Install cargo-machete - run: cargo install cargo-machete + uses: baptiste0928/cargo-install@v3 + with: + crate: cargo-machete - name: Run cargo machete run: | @@ -40,9 +37,8 @@ jobs: with: lfs: true - - uses: dtolnay/rust-toolchain@nightly - - uses: Swatinem/rust-cache@v2 - - uses: taiki-e/install-action@nextest + - name: Setup Rust toolchain and cache + uses: actions-rust-lang/setup-rust-toolchain@v1 - name: Run cargo nextest run: cargo nextest run @@ -54,12 +50,10 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@nightly - - - uses: Swatinem/rust-cache@v2 - - name: Install cargo-deny - run: cargo install cargo-deny + uses: baptiste0928/cargo-install@v3 + with: + crate: cargo-deny - name: Run cargo deny run: | @@ -71,15 +65,12 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 - with: - lfs: true - - - uses: dtolnay/rust-toolchain@nightly + - name: Setup Rust toolchain and cache + uses: actions-rust-lang/setup-rust-toolchain@v1 with: - components: rustfmt - - - uses: Swatinem/rust-cache@v2 + toolchain: nightly + components: clippy - name: Run rustfmt run: | @@ -93,12 +84,12 @@ jobs: with: lfs: true - - uses: dtolnay/rust-toolchain@nightly + - name: Setup Rust toolchain and cache + uses: actions-rust-lang/setup-rust-toolchain@v1 with: + toolchain: nightly components: clippy - - uses: Swatinem/rust-cache@v2 - - name: Clippy check run: cargo clippy --workspace --tests --examples --all-features From cbcc7f62bfc3b597a1e36e60991fb3dfde1b7975 Mon Sep 17 00:00:00 2001 From: Andrew Gazelka Date: Sun, 24 Mar 2024 13:59:13 -0500 Subject: [PATCH 2/4] fix test --- .github/workflows/build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 240f8efa..e2ed5fb9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,6 +28,7 @@ jobs: - name: Run cargo machete run: | cargo machete + test: runs-on: ubuntu-latest @@ -41,7 +42,7 @@ jobs: uses: actions-rust-lang/setup-rust-toolchain@v1 - name: Run cargo nextest - run: cargo nextest run + run: cargo test --workspace --all-features deny: runs-on: ubuntu-latest From 490cb011d986d2b49090bc4399408799b93df950 Mon Sep 17 00:00:00 2001 From: Andrew Gazelka Date: Sun, 24 Mar 2024 13:59:43 -0500 Subject: [PATCH 3/4] fix fmt --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e2ed5fb9..e685cffd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -71,7 +71,7 @@ jobs: uses: actions-rust-lang/setup-rust-toolchain@v1 with: toolchain: nightly - components: clippy + components: rustfmt - name: Run rustfmt run: | From 1936e7ba1bf20458166023f38a00cce0f4be72ee Mon Sep 17 00:00:00 2001 From: Andrew Gazelka Date: Sun, 24 Mar 2024 14:02:41 -0500 Subject: [PATCH 4/4] fix naming --- .cargo/config.toml | 1 + .github/workflows/build.yml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index b43f87ee..b6bbabfe 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,6 +1,7 @@ # https://github.com/bevyengine/bevy/blob/main/.cargo/config_fast_builds.toml # https://nnethercote.github.io/perf-book/build-configuration.html +# this is not ideal but we have to comment out to make GitHub Actions runners work on stable #[target.x86_64-unknown-linux-gnu] #linker = "clang" #rustflags = [ diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e685cffd..56960555 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -41,7 +41,7 @@ jobs: - name: Setup Rust toolchain and cache uses: actions-rust-lang/setup-rust-toolchain@v1 - - name: Run cargo nextest + - name: Run cargo test run: cargo test --workspace --all-features deny: