Skip to content

Commit

Permalink
Merge pull request #195 from EmbarkStudios/main
Browse files Browse the repository at this point in the history
Add missing package files
  • Loading branch information
Byron authored May 24, 2024
2 parents d9dde9d + e3d7095 commit 414ca0a
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 9 deletions.
25 changes: 19 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,24 +81,35 @@ jobs:

cc:
runs-on: ubuntu-22.04
env:
TARGET_TRIPLE: x86_64-unknown-linux-gnu
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
submodules: true
# 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
Expand All @@ -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 }}

Expand Down
21 changes: 19 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "libz-sys"
version = "1.1.17"
version = "1.1.18"
authors = [
"Alex Crichton <[email protected]>",
"Josh Triplett <[email protected]>",
Expand All @@ -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]
Expand All @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion zng/cc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
}

Expand Down

0 comments on commit 414ca0a

Please sign in to comment.