From 4abce3b4ec11b11857b1b7c2702d96f1c636b2ab Mon Sep 17 00:00:00 2001 From: Nico Burns Date: Fri, 21 Jun 2024 11:54:03 +1200 Subject: [PATCH 1/4] Speed up CI --- .github/workflows/ci.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ccec2385..6ae91ecd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,6 +30,7 @@ jobs: - uses: dtolnay/rust-toolchain@master with: toolchain: 1.79 + - run: perl -pi.bak -e 's/opt-level = 2/opt-level = 0/g' Cargo.toml - run: sudo apt install libgtk-3-dev libxdo-dev - run: cargo build --workspace @@ -39,6 +40,7 @@ jobs: steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable + - run: perl -pi.bak -e 's/opt-level = 2/opt-level = 0/g' Cargo.toml - run: sudo apt install libgtk-3-dev libxdo-dev - run: cargo build --workspace - run: cargo test --workspace @@ -63,6 +65,7 @@ jobs: with: toolchain: nightly components: clippy + - run: perl -pi.bak -e 's/opt-level = 2/opt-level = 0/g' Cargo.toml - run: sudo apt install libgtk-3-dev libxdo-dev - run: cargo clippy --workspace -- -D warnings @@ -89,7 +92,7 @@ jobs: cross: false, command: "test", args: "--all --tests", - setup: "" + setup: "" #perl -pi.bak -e 's/opt-level = 2/opt-level = 0/g' Cargo.toml } - { target: x86_64-apple-darwin, @@ -97,7 +100,7 @@ jobs: cross: false, command: "test", args: "--all --tests", - setup: "" + setup: perl -pi.bak -e 's/opt-level = 2/opt-level = 0/g' Cargo.toml } - { target: x86_64-unknown-linux-gnu, @@ -111,7 +114,8 @@ jobs: libgtk-3-dev \ libudev-dev \ libpango1.0-dev \ - libxdo-dev" + libxdo-dev; + perl -pi.bak -e 's/opt-level = 2/opt-level = 0/g' Cargo.toml" } steps: From f69b5f8ab5b5df38451789ac7b336d8a302398dd Mon Sep 17 00:00:00 2001 From: Nico Burns Date: Fri, 21 Jun 2024 12:08:09 +1200 Subject: [PATCH 2/4] Use aarch64 target on macos (to match runner architecture) --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6ae91ecd..8f355558 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -95,7 +95,7 @@ jobs: setup: "" #perl -pi.bak -e 's/opt-level = 2/opt-level = 0/g' Cargo.toml } - { - target: x86_64-apple-darwin, + target: aarch64-apple-darwin, os: macos-latest, cross: false, command: "test", From 3aa5f4ded9fb06e8ebff5ecedc22368b5a82098c Mon Sep 17 00:00:00 2001 From: Nico Burns Date: Fri, 21 Jun 2024 12:18:08 +1200 Subject: [PATCH 3/4] Try re-enabling for windows --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8f355558..ffc6f039 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -92,7 +92,7 @@ jobs: cross: false, command: "test", args: "--all --tests", - setup: "" #perl -pi.bak -e 's/opt-level = 2/opt-level = 0/g' Cargo.toml + setup: perl -pi.bak -e 's/opt-level = 2/opt-level = 0/g' Cargo.toml } - { target: aarch64-apple-darwin, @@ -147,6 +147,7 @@ jobs: - name: Setup run: ${{ matrix.platform.setup }} + shell: bash - name: test run: | From 551895a38052c2a0cf17518804ba8766772b193e Mon Sep 17 00:00:00 2001 From: Nico Burns Date: Fri, 21 Jun 2024 12:27:13 +1200 Subject: [PATCH 4/4] Add custom job name for matrix job --- .github/workflows/ci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ffc6f039..428bd746 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -87,6 +87,7 @@ jobs: matrix: platform: - { + name: windows, target: x86_64-pc-windows-msvc, os: windows-latest, cross: false, @@ -95,6 +96,7 @@ jobs: setup: perl -pi.bak -e 's/opt-level = 2/opt-level = 0/g' Cargo.toml } - { + name: macos, target: aarch64-apple-darwin, os: macos-latest, cross: false, @@ -103,6 +105,7 @@ jobs: setup: perl -pi.bak -e 's/opt-level = 2/opt-level = 0/g' Cargo.toml } - { + name: linux, target: x86_64-unknown-linux-gnu, os: ubuntu-latest, cross: false, @@ -118,6 +121,8 @@ jobs: perl -pi.bak -e 's/opt-level = 2/opt-level = 0/g' Cargo.toml" } + name: Test (${{ matrix.platform.name }}) + steps: - uses: actions/checkout@v4 - name: install stable