Skip to content

Commit

Permalink
fix: build on aarch64-apple-darwin (#10)
Browse files Browse the repository at this point in the history
* change targets

* update bindgen

* replace depreciated function

* set target

* set linker

* set default

* testing

* testing

* set target

* undo set linker

* set default

* change toolchain

* cleanup
  • Loading branch information
FelixMoelder authored May 6, 2024
1 parent e4f10aa commit 534c463
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 27 deletions.
42 changes: 18 additions & 24 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,29 +117,28 @@ jobs:
strategy:
matrix:
target:
- intel-catalina
- intel-bigsur
- m1-bigsur
- intel-monterey
- intel-ventura
- silicon-sonoma
include:
- target: intel-catalina
os: macOS-10.15
- target: intel-monterey
os: macOS-12.0
toolchain_target: x86_64-apple-darwin
toolchain: stable
aux_args: ""
default: false
- target: intel-bigsur
os: macOS-11.0
aux_args: --target x86_64-apple-darwin
default: true
- target: intel-ventura
os: macOS-13.0
toolchain_target: x86_64-apple-darwin
toolchain: stable
aux_args: --target x86_64-apple-darwin
default: true
- target: silicon-sonoma
os: macOS-14.0
toolchain_target: aarch64-apple-darwin
toolchain: stable
aux_args: ""
default: false
# TODO enable again and try to find out why this fails
# - target: m1-bigsur
# os: macOS-11.0
# toolchain_target: aarch64-apple-darwin
# toolchain: nightly
# aux_args: --target aarch64-apple-darwin
# default: true

steps:
- name: Checkout repository
Expand All @@ -150,19 +149,14 @@ jobs:
- name: Install stable toolchain
uses: actions-rs/[email protected]
with:
toolchain: stable
toolchain: ${{ matrix.toolchain }}
target: ${{ matrix.toolchain_target }}
override: true
default: ${{ matrix.default }}

- name: Install htslib dependencies
run: brew install bzip2 zlib xz curl-openssl

#- uses: actions-rs/[email protected]
# with:
# toolchain: ${{ matrix.toolchain }}
# target: ${{ matrix.toolchain_target }}
# #override: true
# default: ${{ matrix.default }}

- name: Test
uses: actions-rs/[email protected]
with:
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ static = [] # Don't dynamically link to other libraries

[build-dependencies]
fs-utils = "1.1"
bindgen = { version = "0.53.2", default-features = false, features = ["runtime"], optional = true }
bindgen = { version = "0.69.4", default-features = false, features = ["runtime"], optional = true }
cc = { version = "1.0", features = ["parallel"] }
glob = "0.3.0"
4 changes: 2 additions & 2 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,8 @@ fn main() {
bindgen::Builder::default()
.header("wrapper.h")
.generate_comments(false)
.blacklist_function("strtold")
.blacklist_type("max_align_t")
.blocklist_function("strtold")
.blocklist_type("max_align_t")
.generate()
.expect("Unable to generate bindings.")
.write_to_file(out.join("bindings.rs"))
Expand Down

0 comments on commit 534c463

Please sign in to comment.