diff --git a/.github/jobs/configure-checks/all.bats b/.github/jobs/configure-checks/all.bats index 207650895f..9fd6ebf2bc 100755 --- a/.github/jobs/configure-checks/all.bats +++ b/.github/jobs/configure-checks/all.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bats +#!/usr/bin/env bats --trace load 'assert' @@ -46,13 +46,13 @@ run_configure () { repo-install () { args=$(translate $@) - ${cmd} install $args -y >/dev/null + ${cmd} install $args -y } repo-remove () { args=$(translate $@) ${cmd} remove $args -y #>/dev/null if [ "$distro_id" != "ID=fedora" ]; then - apt-get autoremove -y 2>/dev/null + apt-get autoremove -y fi } @@ -178,6 +178,8 @@ compile_assertions_finished () { groupdel ${www_group} || true done repo-install httpd + grep -E 'nginx|apache' /etc/passwd || true + grep -E 'nginx|apache' /etc/group || true run ./configure --with-domjudge-user=$u assert_line "checking webserver-group... apache (detected)" assert_line " * webserver group.....: apache" @@ -210,7 +212,7 @@ compile_assertions_finished () { @test "cgroup library needed" { cgroup_init_find="checking for cgroup_init in -lcgroup... no" cgroup_init_error="configure: error: Linux cgroup library not found." - setup_user + setup repo-install gcc g++ repo-remove libcgroup-dev run run_configure diff --git a/.github/jobs/configure-checks/setup_configure_image.sh b/.github/jobs/configure-checks/setup_configure_image.sh index 6be3f188ef..a1d10e6274 100755 --- a/.github/jobs/configure-checks/setup_configure_image.sh +++ b/.github/jobs/configure-checks/setup_configure_image.sh @@ -7,17 +7,30 @@ distro_id=$(grep "^ID=" /etc/os-release) # Install everything for configure and testing case $distro_id in "ID=fedora") - dnf install pkg-config make bats autoconf automake util-linux -y ;; + grep -E 'nginx|apache' /etc/passwd || true + grep -E 'nginx|apache' /etc/group || true + + dnf install -y pkg-config make bats autoconf automake util-linux \ + httpd php-fpm + + grep -E 'nginx|apache' /etc/passwd || true + grep -E 'nginx|apache' /etc/group || true + ;; *) apt-get update; apt-get full-upgrade -y - apt-get install pkg-config make bats autoconf -y ;; + apt-get install -y pkg-config make bats autoconf composer \ + php-fpm php-gd php-cli php-intl php-mbstring php-mysql \ + php-curl php-json php-xml php-zip + ;; esac -# Build the configure file +# Start from a configured, distribution-ready source tree. Ideally, +# we'd like to call `make dist` but that depends on LaTeX for building +# the documentation, so take a shortcut. make configure -# Install extra assert statements for bots +# Install extra assert statements for bats cp submit/assert.bash .github/jobs/configure-checks/ # Run the configure tests for this usecase -test_path="/__w/domjudge/domjudge" bats .github/jobs/configure-checks/all.bats +test_path="/__w/domjudge/domjudge" bats --trace .github/jobs/configure-checks/all.bats