From 89e402221d7cf9756b2e32e8a82ddb8f9873759b Mon Sep 17 00:00:00 2001 From: Joshua Thijssen Date: Mon, 1 Jul 2024 10:20:08 +0200 Subject: [PATCH 1/5] Added different platforms to matrix --- .../{bench.yaml => bench.yaml.disabled} | 0 .github/workflows/ci.yaml | 27 ++++++++++--------- 2 files changed, 15 insertions(+), 12 deletions(-) rename .github/workflows/{bench.yaml => bench.yaml.disabled} (100%) diff --git a/.github/workflows/bench.yaml b/.github/workflows/bench.yaml.disabled similarity index 100% rename from .github/workflows/bench.yaml rename to .github/workflows/bench.yaml.disabled diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 79157c948..7e6a474e0 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -16,6 +16,7 @@ jobs: fail-fast: false matrix: rust_version: [ stable, beta, nightly, 1.73.0, "stable minus 1 release", "stable minus 2 releases" ] + os: [ ubuntu-latest, windows-latest, macos-latest ] steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@master @@ -25,16 +26,16 @@ jobs: uses: actions/cache@v4 with: path: ~/.cargo/ - key: ${{ runner.os }}-cargo-registry-${{ matrix.rust_version }}-${{ hashFiles('**/Cargo.lock') }} + key: ${{ matrix.os }}-cargo-registry-${{ matrix.rust_version }}-${{ hashFiles('**/Cargo.lock') }} restore-keys: | - ${{ runner.os }}-cargo-registry-${{ matrix.rust_version }}- + ${{ matrix.os }}-cargo-registry-${{ matrix.rust_version }}- - name: Cache cargo build uses: actions/cache@v3 with: path: ~/work/gosub-engine/gosub-engine/target - key: ${{ runner.os }}-cargo-target-${{ matrix.rust_version }}-${{ hashFiles('**/Cargo.lock') }} + key: ${{ matrix.os }}-cargo-target-${{ matrix.rust_version }}-${{ hashFiles('**/Cargo.lock') }} restore-keys: | - ${{ runner.os }}-cargo-target-${{ matrix.rust_version }}- + ${{ matrix.os }}-cargo-target-${{ matrix.rust_version }}- - name: Build run: cargo build --verbose --all --all-features - name: Clean @@ -49,6 +50,7 @@ jobs: fail-fast: false matrix: rust_version: [ stable, beta, nightly, 1.73.0, "stable minus 1 release", "stable minus 2 releases" ] + os: [ ubuntu-latest, windows-latest, macos-latest ] steps: - name: Print CPU info run: lscpu @@ -60,16 +62,16 @@ jobs: uses: actions/cache@v4 with: path: ~/.cargo - key: ${{ runner.os }}-cargo-registry-${{ matrix.rust_version }}-${{ hashFiles('**/Cargo.lock') }} + key: ${{ matrix.os }}-cargo-registry-${{ matrix.rust_version }}-${{ hashFiles('**/Cargo.lock') }} restore-keys: | - ${{ runner.os }}-cargo-registry-${{ matrix.rust_version }}- + ${{ matrix.os }}-cargo-registry-${{ matrix.rust_version }}- - name: Cache cargo build uses: actions/cache@v3 with: path: ~/work/gosub-engine/gosub-engine/target - key: ${{ runner.os }}-cargo-target-${{ matrix.rust_version }}-${{ hashFiles('**/Cargo.lock') }} + key: ${{ matrix.os }}-cargo-target-${{ matrix.rust_version }}-${{ hashFiles('**/Cargo.lock') }} restore-keys: | - ${{ runner.os }}-cargo-target-${{ matrix.rust_version }}- + ${{ matrix.os }}-cargo-target-${{ matrix.rust_version }}- - name: Run tests run: cargo test --verbose --all --no-fail-fast --all-features --all-targets @@ -79,6 +81,7 @@ jobs: fail-fast: false matrix: rust_version: [ stable, beta, nightly, 1.73.0, "stable minus 1 release", "stable minus 2 releases" ] + os: [ ubuntu-latest, windows-latest, macos-latest ] steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@master @@ -88,16 +91,16 @@ jobs: uses: actions/cache@v4 with: path: ~/.cargo - key: ${{ runner.os }}-cargo-registry-${{ matrix.rust_version }}-${{ hashFiles('**/Cargo.lock') }} + key: ${{ matrix.os }}-cargo-registry-${{ matrix.rust_version }}-${{ hashFiles('**/Cargo.lock') }} restore-keys: | - ${{ runner.os }}-cargo-registry-${{ matrix.rust_version }}- + ${{ matrix.os }}-cargo-registry-${{ matrix.rust_version }}- - name: Cache cargo build uses: actions/cache@v3 with: path: ~/work/gosub-engine/gosub-engine/target - key: ${{ runner.os }}-cargo-target-${{ matrix.rust_version }}-${{ hashFiles('**/Cargo.lock') }} + key: ${{ matrix.os }}-cargo-target-${{ matrix.rust_version }}-${{ hashFiles('**/Cargo.lock') }} restore-keys: | - ${{ runner.os }}-cargo-target-${{ matrix.rust_version }}- + ${{ matrix.os }}-cargo-target-${{ matrix.rust_version }}- - name: Run Clippy run: cargo clippy --all --tests -- -D warnings From 3133826dcc4955aaab8b76de590d316659214a4a Mon Sep 17 00:00:00 2001 From: Joshua Thijssen Date: Mon, 1 Jul 2024 10:38:33 +0200 Subject: [PATCH 2/5] using newest github action to fix warning --- .github/workflows/ci.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 7e6a474e0..c2a31aa75 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -30,7 +30,7 @@ jobs: restore-keys: | ${{ matrix.os }}-cargo-registry-${{ matrix.rust_version }}- - name: Cache cargo build - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/work/gosub-engine/gosub-engine/target key: ${{ matrix.os }}-cargo-target-${{ matrix.rust_version }}-${{ hashFiles('**/Cargo.lock') }} @@ -66,7 +66,7 @@ jobs: restore-keys: | ${{ matrix.os }}-cargo-registry-${{ matrix.rust_version }}- - name: Cache cargo build - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/work/gosub-engine/gosub-engine/target key: ${{ matrix.os }}-cargo-target-${{ matrix.rust_version }}-${{ hashFiles('**/Cargo.lock') }} @@ -95,7 +95,7 @@ jobs: restore-keys: | ${{ matrix.os }}-cargo-registry-${{ matrix.rust_version }}- - name: Cache cargo build - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/work/gosub-engine/gosub-engine/target key: ${{ matrix.os }}-cargo-target-${{ matrix.rust_version }}-${{ hashFiles('**/Cargo.lock') }} @@ -117,7 +117,7 @@ jobs: restore-keys: | ${{ runner.os }}-cargo-registry-${{ matrix.rust_version }}- - name: Cache cargo build - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/work/gosub-engine/gosub-engine/target key: ${{ runner.os }}-cargo-target-${{ matrix.rust_version }}-${{ hashFiles('**/Cargo.lock') }} From 2f87d8610ab6d40c755c92ad36e6f7c107f0d84d Mon Sep 17 00:00:00 2001 From: Joshua Thijssen Date: Wed, 3 Jul 2024 11:25:47 +0200 Subject: [PATCH 3/5] Removed a lot of checks to make sure we keep below the action/minutes threshold --- .github/workflows/ci.yaml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c2a31aa75..42ce83e5f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -15,8 +15,10 @@ jobs: strategy: fail-fast: false matrix: - rust_version: [ stable, beta, nightly, 1.73.0, "stable minus 1 release", "stable minus 2 releases" ] - os: [ ubuntu-latest, windows-latest, macos-latest ] + rust_version: [ stable, nightly, 1.73.0 ] + os: [ ubuntu-latest ] +# rust_version: [ stable, beta, nightly, 1.73.0, "stable minus 1 release", "stable minus 2 releases" ] +# os: [ ubuntu-latest, windows-latest, macos-latest ] steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@master @@ -49,8 +51,10 @@ jobs: strategy: fail-fast: false matrix: - rust_version: [ stable, beta, nightly, 1.73.0, "stable minus 1 release", "stable minus 2 releases" ] - os: [ ubuntu-latest, windows-latest, macos-latest ] + rust_version: [ stable, nightly, 1.73.0 ] + os: [ ubuntu-latest ] +# rust_version: [ stable, beta, nightly, 1.73.0, "stable minus 1 release", "stable minus 2 releases" ] +# os: [ ubuntu-latest, windows-latest, macos-latest ] steps: - name: Print CPU info run: lscpu @@ -80,8 +84,10 @@ jobs: strategy: fail-fast: false matrix: - rust_version: [ stable, beta, nightly, 1.73.0, "stable minus 1 release", "stable minus 2 releases" ] - os: [ ubuntu-latest, windows-latest, macos-latest ] + rust_version: [ stable, nightly, 1.73.0 ] + os: [ ubuntu-latest ] +# rust_version: [ stable, beta, nightly, 1.73.0, "stable minus 1 release", "stable minus 2 releases" ] +# os: [ ubuntu-latest, windows-latest, macos-latest ] steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@master From 6fe2a9c6e3aa70aaac6c830c32612c9dc15d96f1 Mon Sep 17 00:00:00 2001 From: Joshua Thijssen Date: Wed, 3 Jul 2024 11:28:10 +0200 Subject: [PATCH 4/5] updated version of action script --- .github/workflows/pr-author-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-author-check.yml b/.github/workflows/pr-author-check.yml index 53c4a09a4..2763e6d7e 100644 --- a/.github/workflows/pr-author-check.yml +++ b/.github/workflows/pr-author-check.yml @@ -27,7 +27,7 @@ jobs: sh .github/workflows/check_authors.sh ${{ env.PR_FETCH_DEPTH }} || exit_status=$? echo "found=${exit_status:-0}" >> $GITHUB_OUTPUT - name: Find Comment - uses: peter-evans/find-comment@v2 + uses: peter-evans/find-comment@v3 id: fc with: issue-number: ${{ github.event.pull_request.number }} From 340b73a147cf2ae57343299b574e771b9e6aa17d Mon Sep 17 00:00:00 2001 From: Joshua Thijssen Date: Wed, 3 Jul 2024 11:30:02 +0200 Subject: [PATCH 5/5] removing 1.73.0 from clippy --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 42ce83e5f..30d90ef08 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -84,7 +84,7 @@ jobs: strategy: fail-fast: false matrix: - rust_version: [ stable, nightly, 1.73.0 ] + rust_version: [ stable, nightly ] os: [ ubuntu-latest ] # rust_version: [ stable, beta, nightly, 1.73.0, "stable minus 1 release", "stable minus 2 releases" ] # os: [ ubuntu-latest, windows-latest, macos-latest ]