Skip to content

Commit

Permalink
set macos include/lib paths to all possible values
Browse files Browse the repository at this point in the history
  • Loading branch information
spezifisch committed Aug 7, 2024
1 parent bf5ea3c commit a467711
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 33 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ jobs:
strategy:
fail-fast: false
matrix:
go: ["1.19", "1.20", "1.21"]
go:
- "1.19"
- "1.20"
- "1.21"
- "1.22"

runs-on: ubuntu-latest

Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/build-macos-arm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Build macOS

on:
push:
paths-ignore:
- "*.md"

jobs:
build:
strategy:
fail-fast: true
matrix:
go:
- "1.21"
- "1.22"

runs-on: macos-latest

steps:
- name: Library dependencies
run: brew install mpv

- uses: actions/checkout@v4

- name: Install Go ${{ matrix.go }}
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}

- name: Get Go deps
run: go get .

- name: Setup path
run: export C_INCLUDE_PATH=/usr/local/include:/opt/homebrew/include:$C_INCLUDE_PATH && export LIBRARY_PATH=/usr/local/lib:/opt/homebrew/lib:$LIBRARY_PATH

- name: Compile
run: CGO_CFLAGS="-I/usr/local/include -I/opt/homebrew/include" CGO_LDFLAGS="-L/usr/local/lib -L/opt/homebrew/lib" go build
37 changes: 37 additions & 0 deletions .github/workflows/build-macos-intel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Build macOS Intel

on:
push:
paths-ignore:
- "*.md"

jobs:
build:
strategy:
fail-fast: true
matrix:
go:
- "1.21"
- "1.22"

runs-on: macos-13

steps:
- name: Library dependencies
run: brew install mpv

- uses: actions/checkout@v4

- name: Install Go ${{ matrix.go }}
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}

- name: Get Go deps
run: go get .

- name: Setup path
run: export C_INCLUDE_PATH=/usr/local/include:/opt/homebrew/include:$C_INCLUDE_PATH && export LIBRARY_PATH=/usr/local/lib:/opt/homebrew/lib:$LIBRARY_PATH

- name: Compile
run: CGO_CFLAGS="-I/usr/local/include -I/opt/homebrew/include" CGO_LDFLAGS="-L/usr/local/lib -L/opt/homebrew/lib" go build
32 changes: 0 additions & 32 deletions .github/workflows/build-macos.yml

This file was deleted.

0 comments on commit a467711

Please sign in to comment.