Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ci cross compile #141

Merged
merged 3 commits into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,6 @@ jobs:
uses: taiki-e/install-action@56ab7930c591507f833cbaed864d201386d518a8
with:
tool: cargo-nextest
- name: Rust cache
uses: Swatinem/rust-cache@3cf7f8cc28d1b4e7d01e3783be10a97d55d483c8
with:
shared-key: "${{matrix.rust}}-${{matrix.target}}"
Comment on lines -82 to -85
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this just took more time than it saved

- name: cargo build
run: cargo build --target ${{matrix.target}} ${{ matrix.features }}
- name: cargo nextest # reports segfaults in a helpful way
Expand Down Expand Up @@ -121,7 +117,7 @@ jobs:
- uses: actions/checkout@v2
- uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: qemu qemu-user qemu-user-static qemu-system-s390x gcc-s390x-linux-gnu gcc-i686-linux-gnu
packages: qemu-user qemu-user-static qemu-system-s390x gcc-s390x-linux-gnu gcc-i686-linux-gnu g++-s390x-linux-gnu
Comment on lines -124 to +120
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cmake needs the g++ compiler apparently. or it wants it anyway. fine

version: 1.0
- name: Checkout sources
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
Expand All @@ -138,18 +134,14 @@ jobs:
targets: "${{ matrix.target }}"
- name: target
run: "rustc -vV | sed -n 's|host: ||p'"
- name: Rust cache
uses: Swatinem/rust-cache@3cf7f8cc28d1b4e7d01e3783be10a97d55d483c8
with:
shared-key: "${{matrix.rust}}-${{matrix.target}}"
- name: Install cargo-nextest
uses: taiki-e/install-action@56ab7930c591507f833cbaed864d201386d518a8
with:
tool: cargo-nextest
- name: cargo build
run: cargo build --target ${{matrix.target}} ${{ matrix.features }}
- name: cargo nextest # reports segfaults in a helpful way
run: cargo nextest run -p zlib-rs --target ${{matrix.target}} ${{ matrix.features }}
run: cargo nextest run --target ${{matrix.target}} ${{ matrix.features }}
env:
RUST_BACKTRACE: 1
CC: ${{matrix.gcc}}
Expand Down
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@ opt-level = 1 # required for the tail calls in inflate to optimize

[workspace.dependencies]
libloading = "0.8.1"
libz-sys = { version = "1.1.12", default-features = false, features = ["zlib-ng"] } # use libz-ng in libz compat mode
libz-sys = { version = "1.1.19", default-features = false, features = ["zlib-ng"] } # use libz-ng in libz compat mode
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this release fixes a bug with a missing file that caused issues for the s390x target rust-lang/libz-sys#205

arbitrary = { version = "1.0" }
quickcheck = { version = "1.0.3", default-features = false, features = [] }

libz-rs-sys = { version = "0.2.1", path = "./libz-rs-sys", default-features = false }
zlib-rs = { version = "0.2.1", path = "./zlib-rs", default-features = false }
dynamic-libz-sys = { path = "./dynamic-libz-sys" }

2 changes: 1 addition & 1 deletion test-libz-rs-sys/src/inflate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ fn cover_wrap() {
strm.avail_in = 0;
strm.next_in = std::ptr::null_mut();
let mut ret = unsafe { inflateInit2_(&mut strm, -8, VERSION, STREAM_SIZE) };
let mut input = [0x63, 0x00];
let mut input = [0x63u8, 0x00];
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was inferred as i32 which will fail on big endian systems.

strm.avail_in = input.len() as _;
strm.next_in = input.as_mut_ptr().cast();
strm.avail_out = 1;
Expand Down
Loading