diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index de4fd5d0..934c3578 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -1,6 +1,12 @@ name: macOS latest -on: [push, pull_request] +on: + pull_request: + push: + branches: + - 'ign-common[0-9]' + - 'gz-common[0-9]' + - 'main' jobs: build: @@ -8,22 +14,24 @@ jobs: PACKAGE: gz-common5 runs-on: macos-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Homebrew id: set-up-homebrew uses: Homebrew/actions/setup-homebrew@master - run: brew config + - run: brew list # Workaround for https://github.com/actions/setup-python/issues/577 - name: Clean up python binaries run: | - rm -f /usr/local/bin/2to3*; - rm -f /usr/local/bin/idle3*; - rm -f /usr/local/bin/pydoc3*; - rm -f /usr/local/bin/python3*; - rm -f /usr/local/bin/python3*-config; - + rm -f $(brew --prefix)/bin/2to3*; + rm -f $(brew --prefix)/bin/idle3*; + rm -f $(brew --prefix)/bin/pydoc3*; + rm -f $(brew --prefix)/bin/python3*; + rm -f $(brew --prefix)/bin/python3*-config; - name: Install base dependencies + env: + HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1 run: | brew tap osrf/simulation; # check for ci_matching_branch @@ -45,7 +53,7 @@ jobs: - run: mkdir build - name: cmake working-directory: build - run: cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/${PACKAGE}/HEAD + run: cmake .. -DCMAKE_INSTALL_PREFIX=$(brew --prefix)/Cellar/${PACKAGE}/HEAD - run: make working-directory: build # Run make install before make test so that the package will be available to