From c29ffd234a2148a88306aaa0a7333f9f6043a009 Mon Sep 17 00:00:00 2001 From: Rohan Singh Date: Fri, 26 Apr 2024 15:46:20 +0000 Subject: [PATCH] Try to fix macOS build It can't find `webp/demux.h` any more for some reason. --- .github/workflows/main.yml | 22 +++++++++++++++++++--- .github/workflows/pull-request.yml | 22 ++++++++++++++++++---- 2 files changed, 37 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0b7dd74cef..c39d32a076 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -80,10 +80,17 @@ jobs: - name: Build frontend run: npm run build - - name: Build + - name: Build Linux run: make build if: matrix.os == 'ubuntu-22.04' || matrix.os == 'macos-latest' + - name: Build macOS + run: make build + if: matrix.os == 'macos-latest' + env: + LIBRARY_PATH: "/opt/homebrew/lib" + CGO_CPPFLAGS: "-I/opt/homebrew/include" + - name: Build Windows shell: msys2 {0} run: | @@ -91,9 +98,16 @@ jobs: make build if: matrix.os == 'windows-latest' - - name: Test + - name: Test Linux run: make test - if: matrix.os == 'ubuntu-22.04' || matrix.os == 'macos-latest' + if: matrix.os == 'ubuntu-22.04' + + - name: Test macOS + run: make test + if: matrix.os == 'macos-latest' + env: + LIBRARY_PATH: "/opt/homebrew/lib" + CGO_CPPFLAGS: "-I/opt/homebrew/include" - name: Test Windows shell: msys2 {0} @@ -126,6 +140,8 @@ jobs: run: make release-macos env: PIXLET_VERSION: ${{ steps.vars.outputs.tag }} + LIBRARY_PATH: "/opt/homebrew/lib" + CGO_CPPFLAGS: "-I/opt/homebrew/include" - name: Build Release Windows if: matrix.os == 'windows-latest' diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 5c3e7c593f..0f22cb3939 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -78,9 +78,16 @@ jobs: - name: Build frontend run: npm run build - - name: Build + - name: Build Linux run: make build - if: matrix.os == 'ubuntu-22.04' || matrix.os == 'macos-latest' + if: matrix.os == 'ubuntu-22.04' + + - name: Build macOS + run: make build + if: matrix.os == 'macos-latest' + env: + LIBRARY_PATH: "/opt/homebrew/lib" + CGO_CPPFLAGS: "-I/opt/homebrew/include" - name: Build Windows shell: msys2 {0} @@ -89,9 +96,16 @@ jobs: make build if: matrix.os == 'windows-latest' - - name: Test + - name: Test Linux + run: make test + if: matrix.os == 'ubuntu-22.04' + + - name: Test macOS run: make test - if: matrix.os == 'ubuntu-22.04' || matrix.os == 'macos-latest' + if: matrix.os == 'macos-latest' + env: + LIBRARY_PATH: "/opt/homebrew/lib" + CGO_CPPFLAGS: "-I/opt/homebrew/include" - name: Test Windows shell: msys2 {0}