diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3edbb7d..22dd9d9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -82,12 +82,15 @@ jobs: - uses: actions/checkout@v4 with: submodules: recursive + - name: Set up Homebrew + uses: Homebrew/actions/setup-homebrew@master - uses: actions-rust-lang/setup-rust-toolchain@v1 with: target: ${{ matrix.target }} rustflags: "" - name: Build run: | + brew install molten-vk cargo build --release -v --target=${{ matrix.target }} - name: Upload file uses: actions/upload-artifact@v4 diff --git a/build.rs b/build.rs index 7141145..807dcd3 100644 --- a/build.rs +++ b/build.rs @@ -158,4 +158,12 @@ fn main() { simd_build.include("."); simd_build.compile("simd"); } + + if os == "macos" { + // Add Homebrew lib path for Apple Silicon Macs + println!("cargo:rustc-link-search=native=/opt/homebrew/lib"); + // Add Homebrew lib path for Intel Macs + println!("cargo:rustc-link-search=native=/usr/local/lib"); + println!("cargo:rustc-link-lib=static=MoltenVK"); + } }