Skip to content

Commit d2531f8

Browse files
committed
fixup! [CI] Draft a homebrew-based macCI.
1 parent 835fabf commit d2531f8

File tree

1 file changed

+20
-11
lines changed

1 file changed

+20
-11
lines changed

.github/workflows/root-ci.yml

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,10 @@ jobs:
9595
# Use login shells to have brew and java available
9696
defaults:
9797
run:
98-
shell: bash -le {0}
98+
shell: bash -leo pipefail {0}
99+
100+
env:
101+
VENV_DIR: ${{ github.workspace }}/ROOT_CI_VENV
99102

100103
strategy:
101104
fail-fast: false
@@ -131,7 +134,7 @@ jobs:
131134
132135
steps:
133136
- name: Cleanup
134-
run: rm -rf ${{ github.workspace }}/{src,build}
137+
run: rm -rf ${{ github.workspace }}/build
135138

136139
- name: Checkout
137140
uses: actions/checkout@v4
@@ -143,22 +146,23 @@ jobs:
143146
if: ${{ matrix.platform == 'experimental-brew-ci' }}
144147
run: |
145148
brew update
146-
echo "Installing deps: $(brew deps --direct --include-build root)"
147-
brew install ccache googletest pyenv $(brew deps --direct --include-build root)
148-
brew upgrade
149+
brew install ccache googletest openjdk pyenv
150+
echo "Installing official brew deps: $(brew deps --direct --include-build root)"
151+
brew install $(brew deps --direct --include-build root)
152+
java --version
149153
150154
- name: Set up python venv
151155
if: ${{ matrix.platform == 'experimental-brew-ci' }}
152156
run: |
153-
$(brew --prefix python)/bin/python3 -m venv ROOT_CI
154-
source ROOT_CI/bin/activate
157+
$(brew --prefix python)/bin/python3 -m venv ${VENV_DIR}
158+
source ${VENV_DIR}/bin/activate
155159
pip install --upgrade pip
156160
cat ${{ github.workspace }}/src/requirements.txt | while read PACKAGE; do
157161
if [ -n "${PACKAGE%%#*}" ]; then
158162
pip install -U "${PACKAGE%%#*}";
159163
fi; done || true
160164
pip install openstacksdk # TODO: Remove?
161-
echo $(pwd)/ROOT_CI/bin >> $GITHUB_PATH
165+
echo ${VENV_DIR}/bin >> $GITHUB_PATH
162166
163167
- name: Apply option overrides from matrix for this job for non-release builds
164168
if: ${{ github.event_name != 'schedule' && github.event_name != 'workflow_dispatch' && matrix.overrides != NaN }}
@@ -173,7 +177,12 @@ jobs:
173177
build-directory: /Users/sftnight/ROOT-CI/src/
174178

175179
- name: Set up curl CA bundle for Davix to work with https
176-
run: 'echo SSL_CERT_FILE=/opt/local/share/curl/curl-ca-bundle.crt >> $GITHUB_ENV'
180+
run: |
181+
for cert in /opt/homebrew/opt/ca-certificates/share/ca-certificates/cacert.pem /opt/local/share/curl/curl-ca-bundle.crt; do
182+
if [ -f ${cert} ]; then
183+
echo "SSL_CERT_FILE=${cert}" >> $GITHUB_ENV
184+
fi
185+
done
177186
178187
- name: Pull Request Build
179188
if: github.event_name == 'pull_request'
@@ -184,7 +193,7 @@ jobs:
184193
OVERRIDES: ${{ join( matrix.overrides, ' ') }}
185194
run: |
186195
echo $PATH
187-
if [ -f ROOT_CI/bin/activate ]; then source ROOT_CI/bin/activate; fi
196+
if [ -f ${VENV_DIR}/bin/activate ]; then source ${VENV_DIR}/bin/activate; fi
188197
src/.github/workflows/root-ci-config/build_root.py \
189198
--buildtype RelWithDebInfo \
190199
--incremental $INCREMENTAL \
@@ -194,7 +203,7 @@ jobs:
194203
--head_ref refs/pull/${{ github.event.pull_request.number }}/head:${{ github.event.pull_request.head.ref }} \
195204
--head_sha ${{ github.event.pull_request.head.sha }} \
196205
--repository ${{ github.server_url }}/${{ github.repository }} \
197-
--platform ${{ matrix.platform == 'experimental-brew-ci' && 'mac15' || matrix.platform }}
206+
--platform ${{ matrix.platform == 'experimental-brew-ci' && 'mac15' || matrix.platform }} \
198207
--overrides $GLOBAL_OVERRIDES $OVERRIDES
199208
200209
- name: Workflow dispatch

0 commit comments

Comments
 (0)