Skip to content

Commit cf44784

Browse files
authored
build: fixes local build failure on macos (#41)
closes #40 --------- Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
1 parent a1bc0b0 commit cf44784

3 files changed

Lines changed: 14 additions & 2 deletions

File tree

.github/workflows/commit.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
jobs:
1010
rust:
11-
name: Rust Build and Test (${{ matrix.platform.arch }})
11+
name: Rust Build and Test (${{ matrix.platform.arch }}, ${{ matrix.platform.os }})
1212
runs-on: ${{ matrix.platform.os }}
1313
defaults:
1414
run:
@@ -21,6 +21,8 @@ jobs:
2121
arch: amd64
2222
- os: ubuntu-22.04-arm
2323
arch: arm64
24+
- os: macos-latest
25+
arch: arm64
2426

2527
steps:
2628
- name: Checkout repository
@@ -62,7 +64,7 @@ jobs:
6264
run: cargo test --verbose
6365

6466
go:
65-
name: Go Build and Test (${{ matrix.platform.arch }})
67+
name: Go Build and Test (${{ matrix.platform.arch }}, ${{ matrix.platform.os }})
6668
runs-on: ${{ matrix.platform.os }}
6769
defaults:
6870
run:
@@ -75,6 +77,8 @@ jobs:
7577
arch: amd64
7678
- os: ubuntu-22.04-arm
7779
arch: arm64
80+
- os: macos-latest
81+
arch: arm64
7882

7983
steps:
8084
- name: Checkout repository

go/gosdk/cgoflags.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
//go:build darwin
2+
3+
package gosdk
4+
5+
// #cgo LDFLAGS: -Wl,-undefined,dynamic_lookup
6+
import "C"

rust/.cargo/config.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[target.'cfg(target_os = "macos")']
2+
rustflags = ["-C", "link-args=-undefined dynamic_lookup"]

0 commit comments

Comments
 (0)