Avoid repeatedly specifying bash as the command shell in CI (#1926)

This commit is contained in:
Eldred Habert
2026-04-11 04:04:16 +02:00
committed by GitHub
parent 422e8eec20
commit 123201ecc6
4 changed files with 5 additions and 25 deletions
-1
View File
@@ -10,7 +10,6 @@ jobs:
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@v6 uses: actions/checkout@v6
- name: Install deps - name: Install deps
shell: bash
run: | run: |
./.github/scripts/install_deps.sh ubuntu-latest ./.github/scripts/install_deps.sh ubuntu-latest
- name: Static analysis - name: Static analysis
-2
View File
@@ -10,14 +10,12 @@ jobs:
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@v6 uses: actions/checkout@v6
- name: Install deps - name: Install deps
shell: bash
run: | run: |
./.github/scripts/install_deps.sh ubuntu ./.github/scripts/install_deps.sh ubuntu
- name: Install LCOV - name: Install LCOV
run: | run: |
sudo apt-get install lcov sudo apt-get install lcov
- name: Install test dependency dependencies - name: Install test dependency dependencies
shell: bash
run: | run: |
test/fetch-test-deps.sh --get-deps ubuntu test/fetch-test-deps.sh --get-deps ubuntu
- name: Generate coverage report - name: Generate coverage report
@@ -32,7 +32,6 @@ jobs:
run: | run: |
bash .github/scripts/install_deps.sh windows bash .github/scripts/install_deps.sh windows
- name: Build Windows binaries - name: Build Windows binaries
shell: bash
run: | run: |
cmake -S . -B build --preset msvc${{ matrix.bits }} -DFETCHCONTENT_BASE_DIR="${{ env.DEPS_ROOT_DIR }}" cmake -S . -B build --preset msvc${{ matrix.bits }} -DFETCHCONTENT_BASE_DIR="${{ env.DEPS_ROOT_DIR }}"
cmake --build build --config Release cmake --build build --config Release
@@ -53,7 +52,6 @@ jobs:
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@v6 uses: actions/checkout@v6
- name: Install deps - name: Install deps
shell: bash
run: | run: |
./.github/scripts/install_deps.sh macos ./.github/scripts/install_deps.sh macos
- name: Build libpng - name: Build libpng
@@ -80,7 +78,6 @@ jobs:
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@v6 uses: actions/checkout@v6
- name: Install deps - name: Install deps
shell: bash
run: | run: |
./.github/scripts/install_deps.sh ubuntu-22.04 ./.github/scripts/install_deps.sh ubuntu-22.04
- name: Build binaries - name: Build binaries
+5 -19
View File
@@ -20,6 +20,11 @@ env:
# otherwise they can trigger `-Werror=dev` (from the `develop` preset). # otherwise they can trigger `-Werror=dev` (from the `develop` preset).
DEPS_ROOT_DIR: ~/_deps # Note that this needs to be used in a position where Bash will trigger tilde expansion! DEPS_ROOT_DIR: ~/_deps # Note that this needs to be used in a position where Bash will trigger tilde expansion!
# We use bash syntax across OSes for consistency unless otherwise specified
defaults:
run:
shell: bash
jobs: jobs:
unix: unix:
strategy: strategy:
@@ -35,7 +40,6 @@ jobs:
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@v6 uses: actions/checkout@v6
- name: Install deps - name: Install deps
shell: bash
run: | run: |
./.github/scripts/install_deps.sh ${{ matrix.os }} ./.github/scripts/install_deps.sh ${{ matrix.os }}
- name: Build & install using Make - name: Build & install using Make
@@ -66,7 +70,6 @@ jobs:
if-no-files-found: error if-no-files-found: error
- name: Compute test dependency cache params - name: Compute test dependency cache params
id: test-deps-cache-params id: test-deps-cache-params
shell: bash
run: | run: |
paths=$(test/fetch-test-deps.sh --get-paths) paths=$(test/fetch-test-deps.sh --get-paths)
hash=$(test/fetch-test-deps.sh --get-hash) hash=$(test/fetch-test-deps.sh --get-hash)
@@ -84,12 +87,10 @@ jobs:
run: | run: |
test/fetch-test-deps.sh test/fetch-test-deps.sh
- name: Install test dependency dependencies - name: Install test dependency dependencies
shell: bash
run: | run: |
test/fetch-test-deps.sh --get-deps ${{ matrix.os }} test/fetch-test-deps.sh --get-deps ${{ matrix.os }}
- name: Run tests using our script - name: Run tests using our script
if: matrix.buildsys == 'make' if: matrix.buildsys == 'make'
shell: bash
run: | run: |
CXX=${{ matrix.cxx }} test/run-tests.sh --os ${{ matrix.os }} CXX=${{ matrix.cxx }} test/run-tests.sh --os ${{ matrix.os }}
- name: Run tests using CTest - name: Run tests using CTest
@@ -103,7 +104,6 @@ jobs:
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@v6 uses: actions/checkout@v6
- name: Install deps - name: Install deps
shell: bash
run: | run: |
./.github/scripts/install_deps.sh macos ./.github/scripts/install_deps.sh macos
- name: Build libpng - name: Build libpng
@@ -124,7 +124,6 @@ jobs:
if-no-files-found: error if-no-files-found: error
- name: Compute test dependency cache params - name: Compute test dependency cache params
id: test-deps-cache-params id: test-deps-cache-params
shell: bash
run: | run: |
paths=$(test/fetch-test-deps.sh --get-paths) paths=$(test/fetch-test-deps.sh --get-paths)
hash=$(test/fetch-test-deps.sh --get-hash) hash=$(test/fetch-test-deps.sh --get-hash)
@@ -142,11 +141,9 @@ jobs:
run: | run: |
test/fetch-test-deps.sh test/fetch-test-deps.sh
- name: Install test dependency dependencies - name: Install test dependency dependencies
shell: bash
run: | run: |
test/fetch-test-deps.sh --get-deps macos test/fetch-test-deps.sh --get-deps macos
- name: Run tests - name: Run tests
shell: bash
run: | run: |
test/run-tests.sh --os macos test/run-tests.sh --os macos
@@ -175,7 +172,6 @@ jobs:
cmake --build build cmake --build build
- name: Package binaries - name: Package binaries
working-directory: build working-directory: build
shell: bash
run: | run: |
cpack -DCPACK_PACKAGE_FILE_NAME=rgbds-win${{ matrix.bits }} -G ZIP -C Debug --verbose cpack -DCPACK_PACKAGE_FILE_NAME=rgbds-win${{ matrix.bits }} -G ZIP -C Debug --verbose
- name: Upload Windows binaries - name: Upload Windows binaries
@@ -186,7 +182,6 @@ jobs:
if-no-files-found: error if-no-files-found: error
- name: Compute test dependency cache params - name: Compute test dependency cache params
id: test-deps-cache-params id: test-deps-cache-params
shell: bash
run: | run: |
paths=$(test/fetch-test-deps.sh --get-paths) paths=$(test/fetch-test-deps.sh --get-paths)
hash=$(test/fetch-test-deps.sh --get-hash) hash=$(test/fetch-test-deps.sh --get-hash)
@@ -200,16 +195,13 @@ jobs:
key: ${{ matrix.os }}-${{ matrix.bits }}-${{ steps.test-deps-cache-params.outputs.hash }} key: ${{ matrix.os }}-${{ matrix.bits }}-${{ steps.test-deps-cache-params.outputs.hash }}
- name: Fetch test dependency repositories - name: Fetch test dependency repositories
if: steps.test-deps-cache.outputs.cache-hit != 'true' if: steps.test-deps-cache.outputs.cache-hit != 'true'
shell: bash
continue-on-error: true continue-on-error: true
run: | run: |
test/fetch-test-deps.sh test/fetch-test-deps.sh
- name: Install test dependency dependencies - name: Install test dependency dependencies
shell: bash
run: | run: |
test/fetch-test-deps.sh --get-deps ${{ matrix.os }} test/fetch-test-deps.sh --get-deps ${{ matrix.os }}
- name: Run tests - name: Run tests
shell: bash
run: | run: |
test/run-tests.sh --os ${{ matrix.os }} test/run-tests.sh --os ${{ matrix.os }}
@@ -232,7 +224,6 @@ jobs:
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@v6 uses: actions/checkout@v6
- name: Install deps - name: Install deps
shell: bash
run: | run: |
./.github/scripts/install_deps.sh ubuntu ./.github/scripts/install_deps.sh ubuntu
- name: Install MinGW - name: Install MinGW
@@ -289,13 +280,11 @@ jobs:
name: testing-programs-mingw-win${{ matrix.bits }} name: testing-programs-mingw-win${{ matrix.bits }}
path: test/gfx path: test/gfx
- name: Extract binaries - name: Extract binaries
shell: bash
run: | run: |
cp bins/* . cp bins/* .
cp bins/*.dll test/gfx cp bins/*.dll test/gfx
- name: Compute test dependency cache params - name: Compute test dependency cache params
id: test-deps-cache-params id: test-deps-cache-params
shell: bash
run: | run: |
paths=$(test/fetch-test-deps.sh --get-paths) paths=$(test/fetch-test-deps.sh --get-paths)
hash=$(test/fetch-test-deps.sh --get-hash) hash=$(test/fetch-test-deps.sh --get-hash)
@@ -309,16 +298,13 @@ jobs:
key: mingw-${{ matrix.bits }}-${{ steps.test-deps-cache-params.outputs.hash }} key: mingw-${{ matrix.bits }}-${{ steps.test-deps-cache-params.outputs.hash }}
- name: Fetch test dependency repositories - name: Fetch test dependency repositories
if: steps.test-deps-cache.outputs.cache-hit != 'true' if: steps.test-deps-cache.outputs.cache-hit != 'true'
shell: bash
continue-on-error: true continue-on-error: true
run: | run: |
test/fetch-test-deps.sh test/fetch-test-deps.sh
- name: Install test dependency dependencies - name: Install test dependency dependencies
shell: bash
run: | run: |
test/fetch-test-deps.sh --get-deps ${{ matrix.os }} test/fetch-test-deps.sh --get-deps ${{ matrix.os }}
- name: Run tests - name: Run tests
shell: bash
run: | run: |
test/run-tests.sh --os ${{ matrix.os }} test/run-tests.sh --os ${{ matrix.os }}