From 5e3810de9ab4afdd7c5c48d44466dcaabf81ea49 Mon Sep 17 00:00:00 2001 From: messense Date: Mon, 22 Apr 2024 20:51:32 +0800 Subject: [PATCH 1/4] Test zig 0.12.0 on CI --- .github/workflows/CI.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 7c1a1c5..e661835 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -33,8 +33,7 @@ jobs: matrix: os: [ubuntu-latest, macos-13, windows-latest] toolchain: [1.70.0, stable, nightly] - # Ideally we should also test against 0.9.0, but it is too unusable to test from CI - zig: [0.10.1, 0.11.0, master] + zig: [0.10.1, 0.11.0, 0.12.0, master] exclude: # Only test MSRV with zig stable version - toolchain: 1.70.0 From 0a8271a03bbabff62d7b55dded30e9c0b8f0edad Mon Sep 17 00:00:00 2001 From: messense Date: Tue, 23 Apr 2024 20:23:46 +0800 Subject: [PATCH 2/4] -D_LIBCPP_PSTL_CPU_BACKEND_SERIAL --- src/zig.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/zig.rs b/src/zig.rs index b6b73d0..d4e2336 100644 --- a/src/zig.rs +++ b/src/zig.rs @@ -721,6 +721,7 @@ impl Zig { args.push("-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS".to_owned()); args.push("-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS".to_owned()); args.push("-D_LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS".to_owned()); + args.push("-D_LIBCPP_PSTL_CPU_BACKEND_SERIAL".to_owned()); args.push("-D_LIBCPP_ABI_VERSION=1".to_owned()); args.push("-D_LIBCPP_ABI_NAMESPACE=__1".to_owned()); if let Some(ver) = c_opts.glibc_minor_ver { From 3608cdcfde5b81ede2973fd969aea4c6d32b58f3 Mon Sep 17 00:00:00 2001 From: messense Date: Tue, 23 Apr 2024 20:49:40 +0800 Subject: [PATCH 3/4] Skip Windows gnu tests on zig 0.12.0 --- .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 e661835..ef89b27 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -155,6 +155,7 @@ jobs: cargo run zigbuild --target aarch64-unknown-linux-musl cargo run zigbuild --target aarch64-unknown-linux-musl --manifest-path tests/hello-rustls/Cargo.toml - name: Windows - Test gnu build + if: matrix.zig != '0.12.0' run: | cargo run zigbuild --target x86_64-pc-windows-gnu cargo run zigbuild --target x86_64-pc-windows-gnu --manifest-path tests/hello-windows/Cargo.toml @@ -165,7 +166,7 @@ jobs: run: | cargo run zigbuild --target aarch64-unknown-linux-gnu --manifest-path tests/hello-rustls/Cargo.toml --features curl - name: Windows - Test run - if: matrix.os == 'windows-latest' + if: ${{ matrix.os == 'windows-latest' && matrix.zig != '0.12.0' }} run: | ./target/x86_64-pc-windows-gnu/debug/cargo-zigbuild.exe zigbuild --help ./tests/hello-windows/target/x86_64-pc-windows-gnu/debug/hello-windows.exe From abca06124f7a0c91a84badce6df82ae98f7d0fd9 Mon Sep 17 00:00:00 2001 From: messense Date: Tue, 23 Apr 2024 20:50:30 +0800 Subject: [PATCH 4/4] Drop zig 0.11.0 tests on CI --- .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 ef89b27..20378d8 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -33,7 +33,7 @@ jobs: matrix: os: [ubuntu-latest, macos-13, windows-latest] toolchain: [1.70.0, stable, nightly] - zig: [0.10.1, 0.11.0, 0.12.0, master] + zig: [0.10.1, 0.12.0, master] exclude: # Only test MSRV with zig stable version - toolchain: 1.70.0