Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Bash for all GitHub Actions CI jobs #2898

Merged
merged 1 commit into from
Feb 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/jobs/baseinstall.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash

. .github/jobs/ci_settings.sh

Expand All @@ -13,7 +13,7 @@ export APP_ENV="${4:-prod}"

MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-root}

set -eux
set -euxo pipefail

if [ -z "$phpversion" ]; then
phpversion=$(php -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION."\n";')
Expand Down
8 changes: 6 additions & 2 deletions .github/jobs/chroot_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
. .github/jobs/ci_settings.sh

if [ -n "$1" ] && [ "$1" != "default" ]; then
export ARCH="$1"
export ARCH_OPTION="-a $1"
else
export ARCH_OPTION=""
fi

function finish() {
Expand All @@ -20,6 +22,8 @@ FAILED=0

trap finish EXIT

set -euo pipefail

DIR=$PWD
section_start "Debug info"
lsb_release -a | tee -a "$ARTIFACTS/debug-info"
Expand All @@ -44,7 +48,7 @@ cd /opt/domjudge/judgehost/bin || exit 1
section_end chroot

section_start "Show minimal chroot"
./dj_make_chroot -a "$ARCH" | tee -a "$ARTIFACTS"/chroot.log
./dj_make_chroot $ARCH_OPTION | tee -a "$ARTIFACTS"/chroot.log
section_end

section_start "Test chroot contents"
Expand Down
4 changes: 2 additions & 2 deletions .github/jobs/composer_setup.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh
#!/bin/bash

set -eux
set -euxo pipefail

. .github/jobs/ci_settings.sh

Expand Down
4 changes: 2 additions & 2 deletions .github/jobs/configure-checks/setup_configure_image.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh
#!/bin/bash

set -eux
set -euxo pipefail

distro_id=$(grep "^ID=" /etc/os-release)

Expand Down
4 changes: 4 additions & 0 deletions .github/jobs/fix_pipelinecomponents_image.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/bin/sh

# We can't convert this script to bash as GHA doesn't have bash installed
#
# The current script doesn't use a piped command so the "benefit" of using
# pipefail is not there over the hassle of maintaining another container.
set -eux

echo "Set plugin config for version detection"
Expand Down
4 changes: 2 additions & 2 deletions .github/jobs/getapi.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh
#!/bin/bash

set -eux
set -euxo pipefail

# Ignore the CLICS API strict mode
sudo sed -i "s/'strict'/'ignore-clics'/g" /opt/domjudge/domserver/webapp/src/Controller/API/AbstractRestController.php
Expand Down
2 changes: 2 additions & 0 deletions .github/jobs/unit-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

. .github/jobs/ci_settings.sh

set -euo pipefail

DIR="$PWD"

export version=$1
Expand Down
2 changes: 2 additions & 0 deletions .github/jobs/webstandard.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

. .github/jobs/ci_settings.sh

set -euo pipefail

DIR="$PWD"

if [ "$#" -ne "2" ]; then
Expand Down
Loading