Skip to content

Commit

Permalink
Cache brew install and build volk from source like SDR++
Browse files Browse the repository at this point in the history
  • Loading branch information
williamyang98 committed Feb 9, 2024
1 parent 803cf19 commit 35b27f8
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:

env:
BUILD_TYPE: Release
OSX_TARGET: "10.15"

jobs:
skip_check:
Expand Down Expand Up @@ -34,18 +35,35 @@ jobs:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Cache brew packages
id: cache-homebrew-packages
uses: actions/cache@v3
env:
cache-name: homebrew-packages
with:
path: $(brew --prefix)
key: ${{ env.cache-name }}-${{ hashFiles('.config/brew/Brewfile') }}

- name: Update brew
run: brew update

- name: Install dependencies
run: brew install pkg-config fftw glfw zstd volk ninja
run: brew install pkg-config fftw glfw zstd cmake ninja

- name: Install python mako
run: pip3 install mako

- name: Install volk from vendor/volk to pkgconfig
run: |
cd vendor/volk
cmake . -B build -DCMAKE_OSX_DEPLOYMENT_TARGET=${{env.OSX_TARGET}} -DCMAKE_BUILD_TYPE=Release
cmake --build build --config ${{env.BUILD_TYPE}}
sudo cmake --build build --config ${{env.BUILD_TYPE}} --target install
cd ..
- name: Configure CMake
run: cmake . -B ${{github.workspace}}/build-macos -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -G Ninja
run: cmake . -B ${{github.workspace}}/build-macos -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -G Ninja -DCMAKE_OSX_DEPLOYMENT_TARGET=${{env.OSX_TARGET}}

- name: Build
run: cmake --build ${{github.workspace}}/build-macos --config ${{env.BUILD_TYPE}} --target dab_plugin
Expand Down

0 comments on commit 35b27f8

Please sign in to comment.