Skip to content

Commit 7e85484

Browse files
authored
some bindgen wrapper.c objects fail with htslib 1.11 upgrade (#275)
* Fix for OSX compilation (without MUSL for now since it fails on wrapper.c).
1 parent b008afe commit 7e85484

File tree

4 files changed

+8627
-8587
lines changed

4 files changed

+8627
-8587
lines changed

.github/workflows/rust.yml

Lines changed: 58 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,19 +92,74 @@ jobs:
9292
uses: actions-rs/cargo@v1
9393
with:
9494
use-cross: true
95-
command: build
95+
command: test
9696
args: --release --target x86_64-unknown-linux-musl --no-default-features
9797

9898
- name: Test musl build with all features
9999
uses: actions-rs/cargo@v1
100100
with:
101101
use-cross: true
102-
command: build
102+
command: test
103103
args: --release --target x86_64-unknown-linux-musl --all-features --verbose
104104

105105
- name: Test musl build with all features and debug symbols (non --release)
106106
uses: actions-rs/cargo@v1
107107
with:
108108
use-cross: true
109-
command: build
109+
command: test
110110
args: --target x86_64-unknown-linux-musl --all-features --verbose
111+
112+
Testing-OSX:
113+
needs: Formatting
114+
runs-on: macOS-latest
115+
steps:
116+
- name: Checkout repository
117+
uses: actions/[email protected]
118+
with:
119+
submodules: true
120+
121+
- name: Install htslib dependencies
122+
run: brew install bzip2 zlib xz curl-openssl
123+
124+
# Test for Intel OSX
125+
- uses: actions-rs/toolchain@v1
126+
with:
127+
toolchain: stable
128+
target: x86_64-apple-darwin
129+
override: true
130+
131+
- name: Test build without default features for the default x86_64 OSX target
132+
uses: actions-rs/[email protected]
133+
with:
134+
use-cross: false # cross is not supported on GHA OSX runner, see: https://github.community/t/why-is-docker-not-installed-on-macos/17017
135+
command: test
136+
args: --release --all-features --verbose
137+
138+
# Test MUSL builds on OSX
139+
#
140+
# - uses: actions-rs/toolchain@v1
141+
# with:
142+
# toolchain: stable
143+
# target: x86_64-unknown-linux-musl
144+
# override: true
145+
146+
# - name: Install OSX musl-cross
147+
# run: brew install FiloSottile/musl-cross/musl-cross
148+
149+
# # https://github.com/FiloSottile/homebrew-musl-cross/issues/16
150+
# - name: Provide musl-gcc symlink for the right musl arch
151+
# run: ln -sf /usr/local/opt/musl-cross/libexec/bin/x86_64-linux-musl-gcc /usr/local/bin/musl-gcc
152+
153+
# - name: Test musl build without default features
154+
# uses: actions-rs/cargo@v1
155+
# with:
156+
# use-cross: false # cross is not supported on GHA OSX runner, see: https://github.community/t/why-is-docker-not-installed-on-macos/17017
157+
# command: test
158+
# args: --release --target x86_64-unknown-linux-musl --no-default-features
159+
160+
# - name: Test musl build with all features and debug symbols (non --release) on OSX
161+
# uses: actions-rs/[email protected]
162+
# with:
163+
# use-cross: false
164+
# command: test
165+
# args: --target x86_64-unknown-linux-musl --all-features --verbose

hts-sys/build.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ fn main() {
8383
let want_static = cfg!(feature = "static") || env::var("HTS_STATIC").is_ok();
8484

8585
if want_static {
86-
cfg.warnings(true).static_flag(true).pic(true);
86+
cfg.warnings(false).static_flag(true).pic(true);
8787
} else {
88-
cfg.warnings(true).static_flag(false).pic(true);
88+
cfg.warnings(false).static_flag(false).pic(true);
8989
}
9090

9191
if let Ok(z_inc) = env::var("DEP_Z_INCLUDE") {
@@ -252,4 +252,4 @@ fn main() {
252252
// Note: config.h is a function of the cargo features. Any feature change will
253253
// cause build.rs to re-run, so don't re-run on that change.
254254
//println!("cargo:rerun-if-changed=htslib/config.h");
255-
}
255+
}

0 commit comments

Comments
 (0)