Skip to content

Commit 63cbd19

Browse files
committed
[CI] Use login shells for macOS.
To reliably set up the enviroment, use bash as a login shell for all workflow steps on mac. This ensures that settings from ~/.bash_profile are visible in all steps of the workflow.
1 parent 8e34daa commit 63cbd19

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/root-ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@ jobs:
9797
permissions:
9898
contents: read
9999

100+
defaults:
101+
run:
102+
shell: bash -leo pipefail {0} # Use login shell, so profile scripts get sourced
103+
100104
strategy:
101105
fail-fast: false
102106
matrix:
@@ -141,7 +145,6 @@ jobs:
141145
run: 'echo SSL_CERT_FILE=/opt/local/share/curl/curl-ca-bundle.crt >> $GITHUB_ENV'
142146

143147
- name: Pull Request Build
144-
shell: bash -leo pipefail {0}
145148
if: github.event_name == 'pull_request'
146149
env:
147150
HOME: /Users/sftnight
@@ -161,7 +164,6 @@ jobs:
161164
--overrides ${GLOBAL_OVERRIDES} ${OVERRIDES}"
162165

163166
- name: Workflow dispatch
164-
shell: bash -leo pipefail {0}
165167
if: ${{ github.event_name == 'workflow_dispatch' && !matrix.is_special }}
166168
run: ".github/workflows/root-ci-config/build_root.py
167169
--buildtype ${{ inputs.buildtype }}
@@ -173,7 +175,6 @@ jobs:
173175
--repository ${{ github.server_url }}/${{ github.repository }}"
174176

175177
- name: Nightly build
176-
shell: bash -leo pipefail {0}
177178
if: github.event_name == 'schedule'
178179
run: ".github/workflows/root-ci-config/build_root.py
179180
--buildtype Release
@@ -184,7 +185,6 @@ jobs:
184185
--repository ${{ github.server_url }}/${{ github.repository }}"
185186

186187
- name: Update build cache after push to release branch
187-
shell: bash -leo pipefail {0}
188188
if: github.event_name == 'push'
189189
env:
190190
OVERRIDES: ${{ join( matrix.overrides, ' ') }}

0 commit comments

Comments
 (0)