diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8d4e874d..5618a7ea 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -81,8 +81,6 @@ jobs: cc: runs-on: ubuntu-22.04 - env: - TARGET_TRIPLE: x86_64-unknown-linux-gnu steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: @@ -90,15 +88,28 @@ jobs: # Ensures --all-features builds correctly, the current logic will mean it # uses stock zlib, not cmake nor cc - run: | - cargo test --target $TARGET_TRIPLE --all-features - cargo run --target $TARGET_TRIPLE --manifest-path systest/Cargo.toml --all-features + cargo test --all-features + cargo run --manifest-path systest/Cargo.toml --all-features # Ensures zlib-ng builds and runs, though zlib-ng _could_ change internally # and not use all optimizations available to the CI runner, we do this here # just for x86_64-unknown-linux-gnu to validate a common target compiles # on a more recent compiler than the incredibly ancient one currently used by cross - run: | - cargo test --target $TARGET_TRIPLE --no-default-features --features zlib-ng-no-cmake-experimental-community-maintained || echo "::warning::failed to build libz-ng with --features zlib-ng-no-cmake-experimental-community-maintained" - cargo run --target $TARGET_TRIPLE --manifest-path systest/Cargo.toml --no-default-features --features zlib-ng-no-cmake-experimental-community-maintained || echo "::warning::failed to run systest with --features zlib-ng-no-cmake-experimental-community-maintained" + cargo test --no-default-features --features zlib-ng-no-cmake-experimental-community-maintained || echo "::warning::failed to build libz-ng with --features zlib-ng-no-cmake-experimental-community-maintained" + cargo run --manifest-path systest/Cargo.toml --no-default-features --features zlib-ng-no-cmake-experimental-community-maintained || echo "::warning::failed to run systest with --features zlib-ng-no-cmake-experimental-community-maintained" + + + # ensures packaging works + package: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + with: + submodules: true + - run: | + cargo package --all-features + cargo package --no-default-features --features zlib-ng-no-cmake-experimental-community-maintained + cargo package --no-default-features --features zlib-ng linux: runs-on: ubuntu-latest @@ -114,6 +125,8 @@ jobs: name: cross-linux-musl path: /tmp/ - run: chmod +x /tmp/cross + - run: echo RUSTFLAGS=${RUSTFLAGS}\ -Zlinker-features=-lld >> $GITHUB_ENV + if: matrix.channel == 'nightly' - run: ci/set_rust_version.bash ${{ matrix.channel }} ${{ matrix.target }} - run: ci/test.bash /tmp/cross ${{ matrix.target }} diff --git a/Cargo.toml b/Cargo.toml index c3f0bdfe..441f3a1b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "libz-sys" -version = "1.1.17" +version = "1.1.18" authors = [ "Alex Crichton ", "Josh Triplett ", @@ -18,10 +18,27 @@ include = [ "LICENSE*", "/README.md", "build.rs", + "zng/cc.rs", + "zng/cmake.rs", "src/*.rs", "src/*.c", "src/zlib/*.[ch]", "src/zlib/*.pc.in", + # zlib-ng + "src/zlib-ng/**.[ch]", + "src/zlib-ng/arch/arm/**.[ch]", + "src/zlib-ng/arch/generic/**.[ch]", + "src/zlib-ng/arch/power/**.[ch]", + "src/zlib-ng/arch/riscv/**.[ch]", + "src/zlib-ng/arch/s390x/**.[ch]", + "src/zlib-ng/arch/x86/**.[ch]", + "src/zlib-ng/*.[ch].in", + "src/zlib-ng/*.pc.in", + "src/zlib-ng/zlib_name_mangling.h.empty", + # zlib-ng cmake + "src/zlib-ng/CMakeLists.txt", + "src/zlib-ng/zlib.pc.cmakein", + "src/zlib-ng/cmake", ] [workspace] @@ -37,7 +54,7 @@ libc = { version = "0.2.43", optional = true } [build-dependencies] pkg-config = "0.3.9" -cc = "1.0.18" +cc = "1.0.98" cmake = { version = "0.1.50", optional = true } vcpkg = "0.2" diff --git a/zng/cc.rs b/zng/cc.rs index 3fe5a5ee..10ec3e65 100644 --- a/zng/cc.rs +++ b/zng/cc.rs @@ -11,7 +11,7 @@ struct Build { impl Build { fn new(cfg: cc::Build) -> Self { - let is_msvc = cfg.get_compiler().is_like_msvc(); + let is_msvc = cfg.try_get_compiler().unwrap().is_like_msvc(); Self { cfg, is_msvc } }