Skip to content

Commit

Permalink
ci: Replace exec-with-shell wrapper with "plain bash"
Browse files Browse the repository at this point in the history
Also, promote defaults.run.shell from inside only the primary jobs to
the top level.

The src/ci/exec-with-shell.py wrapper script was formerly used to change
out the shell mid-job by intercepting a CI_OVERRIDE_SHELL environment
variable.  Now, instead, we just set `bash` as the global default across
all jobs, and we also delete the exec-with-shell.py script.

Signed-off-by: Kristofer Rye <[email protected]>
  • Loading branch information
rye committed Jul 17, 2020
1 parent 49f5078 commit 586629c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 44 deletions.
14 changes: 1 addition & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ name: CI
- "**"
defaults:
run:
shell: "python src/ci/exec-with-shell.py {0}"
shell: bash
jobs:
pr:
name: PR
Expand All @@ -51,9 +51,6 @@ jobs:
os: ubuntu-latest-xl
timeout-minutes: 600
runs-on: "${{ matrix.os }}"
defaults:
run:
shell: bash
steps:
- name: disable git crlf conversion
run: git config --global core.autocrlf false
Expand Down Expand Up @@ -153,9 +150,6 @@ jobs:
env: {}
timeout-minutes: 600
runs-on: "${{ matrix.os }}"
defaults:
run:
shell: bash
steps:
- name: disable git crlf conversion
run: git config --global core.autocrlf false
Expand Down Expand Up @@ -473,9 +467,6 @@ jobs:
os: windows-latest-xl
timeout-minutes: 600
runs-on: "${{ matrix.os }}"
defaults:
run:
shell: bash
steps:
- name: disable git crlf conversion
run: git config --global core.autocrlf false
Expand Down Expand Up @@ -601,9 +592,6 @@ jobs:
os: macos-latest
timeout-minutes: 600
runs-on: "${{ matrix.os }}"
defaults:
run:
shell: bash
steps:
- name: disable git crlf conversion
run: git config --global core.autocrlf false
Expand Down
16 changes: 0 additions & 16 deletions src/ci/exec-with-shell.py

This file was deleted.

19 changes: 4 additions & 15 deletions src/ci/github-actions/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,6 @@ x--expand-yaml-anchors--remove:
- &base-ci-job
timeout-minutes: 600
runs-on: "${{ matrix.os }}"
defaults:
run:
shell: bash
env: *shared-ci-variables
steps:
- name: disable git crlf conversion
Expand Down Expand Up @@ -233,18 +230,10 @@ on:

defaults:
run:
# While on Linux and macOS builders it just forwards the arguments to the
# system bash, this wrapper allows switching from the host's bash.exe to
# the one we install along with MSYS2 mid-build on Windows.
#
# Once the step to install MSYS2 is executed, the CI_OVERRIDE_SHELL
# environment variable is set pointing to our MSYS2's bash.exe. From that
# moment the host's bash.exe will not be called anymore.
#
# This is needed because we can't launch our own bash.exe from the host
# bash.exe, as that would load two different cygwin1.dll in memory, causing
# "cygwin heap mismatch" errors.
shell: python src/ci/exec-with-shell.py {0}
# On Linux, macOS, and Windows, use the system-provided bash as the default
# shell. (This should only make a difference on Windows, where the default
# shell is PowerShell.)
shell: bash

jobs:
pr:
Expand Down

0 comments on commit 586629c

Please sign in to comment.