Skip to content

Commit 27ee4d6

Browse files
authored
Fix macOS workflow and update on-push branches (#602)
Signed-off-by: Addisu Z. Taddese <[email protected]>
1 parent 84df370 commit 27ee4d6

File tree

1 file changed

+17
-9
lines changed

1 file changed

+17
-9
lines changed

.github/workflows/macos.yml

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,37 @@
11
name: macOS latest
22

3-
on: [push, pull_request]
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- 'ign-common[0-9]'
8+
- 'gz-common[0-9]'
9+
- 'main'
410

511
jobs:
612
build:
713
env:
814
PACKAGE: gz-common5
915
runs-on: macos-latest
1016
steps:
11-
- uses: actions/checkout@v2
17+
- uses: actions/checkout@v4
1218
- name: Set up Homebrew
1319
id: set-up-homebrew
1420
uses: Homebrew/actions/setup-homebrew@master
1521
- run: brew config
22+
- run: brew list
1623

1724
# Workaround for https://github.com/actions/setup-python/issues/577
1825
- name: Clean up python binaries
1926
run: |
20-
rm -f /usr/local/bin/2to3*;
21-
rm -f /usr/local/bin/idle3*;
22-
rm -f /usr/local/bin/pydoc3*;
23-
rm -f /usr/local/bin/python3*;
24-
rm -f /usr/local/bin/python3*-config;
25-
27+
rm -f $(brew --prefix)/bin/2to3*;
28+
rm -f $(brew --prefix)/bin/idle3*;
29+
rm -f $(brew --prefix)/bin/pydoc3*;
30+
rm -f $(brew --prefix)/bin/python3*;
31+
rm -f $(brew --prefix)/bin/python3*-config;
2632
- name: Install base dependencies
33+
env:
34+
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1
2735
run: |
2836
brew tap osrf/simulation;
2937
# check for ci_matching_branch
@@ -45,7 +53,7 @@ jobs:
4553
- run: mkdir build
4654
- name: cmake
4755
working-directory: build
48-
run: cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/${PACKAGE}/HEAD
56+
run: cmake .. -DCMAKE_INSTALL_PREFIX=$(brew --prefix)/Cellar/${PACKAGE}/HEAD
4957
- run: make
5058
working-directory: build
5159
# Run make install before make test so that the package will be available to

0 commit comments

Comments
 (0)