From eb5ec7f07335494e2c88cae05172d07e5ec59251 Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Sun, 7 Jan 2024 15:08:24 +0900 Subject: [PATCH 1/4] ci: Use cargo-hack's --rust-version flag for msrv check This respects rust-version field in Cargo.toml, so it removes the need to manage MSRV in both the CI file and Cargo.toml. --- .github/workflows/ci.yml | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 713f346..1570d10 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -127,21 +127,14 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, windows-latest] - # When updating this, the reminder to update the minimum supported - # Rust version in Cargo.toml. - rust: ['1.63'] steps: - uses: actions/checkout@v4 - - name: Install Rust - # --no-self-update is necessary because the windows environment cannot self-update rustup.exe. - run: rustup update ${{ matrix.rust }} --no-self-update && rustup default ${{ matrix.rust }} - - run: cargo build - - name: Install Other Targets - if: startsWith(matrix.os, 'ubuntu') - run: rustup target add x86_64-unknown-freebsd x86_64-unknown-netbsd - - run: cargo build --target x86_64-unknown-freebsd + - name: Install cargo-hack + uses: taiki-e/install-action@cargo-hack + - run: cargo hack build --no-dev-deps --rust-version + - run: cargo hack build --no-dev-deps --rust-version --target x86_64-unknown-freebsd if: startsWith(matrix.os, 'ubuntu') - - run: cargo build --target x86_64-unknown-netbsd + - run: cargo hack build --no-dev-deps --rust-version --target x86_64-unknown-netbsd if: startsWith(matrix.os, 'ubuntu') clippy: From 2ba5562d1bba37db8d37f42f55b6c02a26933c87 Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Sun, 7 Jan 2024 15:10:09 +0900 Subject: [PATCH 2/4] ci: Update FreeBSD image to 13.2 ``` pkg install -y git Updating FreeBSD repository catalogue... pkg: http://pkgmir.geo.freebsd.org/FreeBSD:12:amd64/quarterly/meta.txz: Not Found repository FreeBSD has no meta file, using default settings pkg: http://pkgmir.geo.freebsd.org/FreeBSD:12:amd64/quarterly/packagesite.pkg: Not Found pkg: http://pkgmir.geo.freebsd.org/FreeBSD:12:amd64/quarterly/packagesite.txz: Not Found Unable to update repository FreeBSD Error updating repositories! ``` --- .cirrus.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index f34e6ab..7628f40 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -14,7 +14,7 @@ env: freebsd_task: name: test ($TARGET) freebsd_instance: - image_family: freebsd-12-4 + image_family: freebsd-13-2 matrix: - env: TARGET: x86_64-unknown-freebsd From d23d6def7e031557a50f6ccad23840d4fea4430d Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Sun, 7 Jan 2024 15:15:04 +0900 Subject: [PATCH 3/4] ci: Temporarily disable riscv32imc-esp-espidf build --- .github/workflows/ci.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1570d10..8e1407e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -65,9 +65,10 @@ jobs: - name: Add rust-src if: startsWith(matrix.rust, 'nightly') run: rustup component add rust-src - - name: Check selected Tier 3 targets - if: startsWith(matrix.rust, 'nightly') && matrix.os == 'ubuntu-latest' - run: cargo check -Z build-std --target=riscv32imc-esp-espidf + # TODO: broken due to https://github.com/rust-lang/rust/pull/119026. + # - name: Check selected Tier 3 targets + # if: startsWith(matrix.rust, 'nightly') && matrix.os == 'ubuntu-latest' + # run: cargo check -Z build-std --target=riscv32imc-esp-espidf - name: Check haiku if: startsWith(matrix.rust, 'nightly') && matrix.os == 'ubuntu-latest' run: cargo check -Z build-std --target x86_64-unknown-haiku From 6a8517ebae4f5f5dd2bd8ba0117ec74be68de283 Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Sun, 7 Jan 2024 15:44:43 +0900 Subject: [PATCH 4/4] Ignore dead_code warning for tuple struct This lint does not take into account destructors. ``` error: field `0` is never read --> src\iocp\mod.rs:1155:13 | 1155 | Waiting(WaitHandle), | ------- ^^^^^^^^^^ | | | field in this variant | = note: `-D dead-code` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(dead_code)]` help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field | 1155 | Waiting(()), | ~~ ``` --- src/iocp/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/iocp/mod.rs b/src/iocp/mod.rs index 16f9d6f..3800a2c 100644 --- a/src/iocp/mod.rs +++ b/src/iocp/mod.rs @@ -1152,7 +1152,7 @@ enum WaitableStatus { Idle, /// We are waiting on this handle to become signaled. - Waiting(WaitHandle), + Waiting(#[allow(dead_code)] WaitHandle), /// This handle has been cancelled. Cancelled,