From e408542549505a0723cde8a8e8a2e5c89aca158e Mon Sep 17 00:00:00 2001 From: Adrian Reber Date: Thu, 28 Sep 2023 09:00:04 +0000 Subject: [PATCH] ci: also build and test with the Intel compiler Signed-off-by: Adrian Reber --- .cirrus.yml | 4 +- .github/workflows/validate.yml | 41 +++++++++++++++---- tests/ci/prepare-ci-environment.sh | 13 ++++-- tests/ci/setup_slurm_and_run_tests.sh | 9 +++- .../rms-harness/ohpc-tests/test_mpi_families | 2 +- 5 files changed, 53 insertions(+), 16 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 7581783ea6..fb970ed6e8 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -24,7 +24,7 @@ task: test_script: | export SKIP_CI_SPECS="${SKIP_CI_SPECS}${JOB_SKIP_CI_SPECS}" chown ohpc -R tests - tests/ci/setup_slurm_and_run_tests.sh ohpc $(tests/ci/cirrus_get_changed_files.sh) + tests/ci/setup_slurm_and_run_tests.sh ohpc gnu12 $(tests/ci/cirrus_get_changed_files.sh) openeuler_task: name: openEuler on aarch64 @@ -46,4 +46,4 @@ openeuler_task: test_script: | export SKIP_CI_SPECS="${SKIP_CI_SPECS}${JOB_SKIP_CI_SPECS}" chown ohpc -R tests - tests/ci/setup_slurm_and_run_tests.sh ohpc $(tests/ci/cirrus_get_changed_files.sh) + tests/ci/setup_slurm_and_run_tests.sh ohpc gnu12 $(tests/ci/cirrus_get_changed_files.sh) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 23df93edfb..b96fba5904 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -66,23 +66,31 @@ jobs: build_on_rhel: strategy: matrix: - compiler: [gnu12, gnu13] + compiler: [gnu12, gnu13, intel] runs-on: ubuntu-latest name: Build on RHEL (${{ matrix.compiler}}) container: image: docker.io/library/rockylinux:9 + volumes: + - /usr:/host/usr + - /opt:/host/opt steps: + - name: Delete unneeded tools on the host + run: | + df -h + rm -rf /host/usr/share/dotnet /host/usr/local/lib/android /host/opt/ghc + df -h - name: Install git run: dnf -y install git - uses: actions/checkout@v3 - name: Setup - run: tests/ci/prepare-ci-environment.sh + run: tests/ci/prepare-ci-environment.sh ${{ matrix.compiler }} - id: files uses: Ana06/get-changed-files@v2.2.0 - name: Validate Build run: | . /etc/profile.d/lmod.sh - tests/ci/run_build.py ohpc ${{ steps.files.outputs.added_modified }} --compiler-family ${{ matrix.compiler}} + tests/ci/run_build.py ohpc ${{ steps.files.outputs.added_modified }} --compiler-family ${{ matrix.compiler }} touch /tmp/empty - uses: actions/upload-artifact@v3 if: matrix.compiler == 'gnu12' @@ -95,6 +103,9 @@ jobs: /tmp/empty test_on_rhel: + strategy: + matrix: + compiler: [gnu12, intel] runs-on: ubuntu-latest name: Test on RHEL env: @@ -103,13 +114,21 @@ jobs: container: image: docker.io/library/rockylinux:9 options: --privileged + volumes: + - /usr:/host/usr + - /opt:/host/opt needs: build_on_rhel steps: + - name: Delete unneeded tools on the host + run: | + df -h + rm -rf /host/usr/share/dotnet /host/usr/local/lib/android /host/opt/ghc + df -h - name: Install git run: dnf -y install git - uses: actions/checkout@v3 - name: Setup - run: tests/ci/prepare-ci-environment.sh + run: tests/ci/prepare-ci-environment.sh ${{ matrix.compiler }} - id: files uses: Ana06/get-changed-files@v2.2.0 - uses: actions/download-artifact@v3 @@ -121,14 +140,14 @@ jobs: export SKIP_CI_SPECS="${{ env.SKIP_CI_SPECS }}${{ env.JOB_SKIP_CI_SPECS }}" . /etc/profile.d/lmod.sh chown ohpc -R tests - tests/ci/setup_slurm_and_run_tests.sh ohpc ${{ steps.files.outputs.added_modified }} + tests/ci/setup_slurm_and_run_tests.sh ohpc ${{ matrix.compiler }} ${{ steps.files.outputs.added_modified }} - name: Upload Test Results # To display test results from forked repositories they need to # be uploaded and then analyzed. if: always() uses: actions/upload-artifact@v3 with: - name: test-results + name: test-results-${{ matrix.compiler }} retention-days: 1 path: tests/**/*.log.xml @@ -162,6 +181,9 @@ jobs: /tmp/empty test_on_openEuler: + strategy: + matrix: + compiler: [gnu12] env: JOB_SKIP_CI_SPECS: | components/runtimes/charliecloud/SPECS/charliecloud.spec @@ -190,7 +212,7 @@ jobs: export SKIP_CI_SPECS="${{ env.SKIP_CI_SPECS }}${{ env.JOB_SKIP_CI_SPECS }}" . /etc/profile.d/lmod.sh chown ohpc -R tests - tests/ci/setup_slurm_and_run_tests.sh ohpc ${{ steps.files.outputs.added_modified }} + tests/ci/setup_slurm_and_run_tests.sh ohpc ${{ matrix.compiler }} ${{ steps.files.outputs.added_modified }} build_on_leap: runs-on: ubuntu-latest @@ -220,6 +242,9 @@ jobs: /tmp/empty test_on_leap: + strategy: + matrix: + compiler: [gnu12] env: JOB_SKIP_CI_SPECS: | components/runtimes/charliecloud/SPECS/charliecloud.spec @@ -246,7 +271,7 @@ jobs: export SKIP_CI_SPECS="${{ env.SKIP_CI_SPECS }}${{ env.JOB_SKIP_CI_SPECS }}" . /etc/profile.d/lmod.sh chown ohpc -R tests - tests/ci/setup_slurm_and_run_tests.sh ohpc ${{ steps.files.outputs.added_modified }} + tests/ci/setup_slurm_and_run_tests.sh ohpc ${{ matrix.compiler }} ${{ steps.files.outputs.added_modified }} event_file: name: "Event File" diff --git a/tests/ci/prepare-ci-environment.sh b/tests/ci/prepare-ci-environment.sh index a1d22a6d87..fd2455c5ef 100755 --- a/tests/ci/prepare-ci-environment.sh +++ b/tests/ci/prepare-ci-environment.sh @@ -5,6 +5,13 @@ set -x set -e +ENABLE_ONEAPI="" +if [ $# -eq 1 ]; then + if [ "${1}" = "intel" ]; then + ENABLE_ONEAPI="intel-oneapi-toolkit-release-ohpc" + fi +fi + FACTORY_VERSION=3.0 if [ ! -e /etc/os-release ]; then @@ -16,7 +23,7 @@ fi . /etc/os-release PKG_MANAGER=zypper -COMMON_PKGS="wget python3 jq" +COMMON_PKGS="wget python3 jq man" UNAME_M=$(uname -m) YES="-n" @@ -95,7 +102,7 @@ dnf_rhel() { if [ "${FACTORY_VERSION}" != "" ]; then loop_command wget "${FACTORY_REPOSITORY}" -O "${FACTORY_REPOSITORY_DESTINATION}" fi - loop_command "${PKG_MANAGER}" "${YES}" install lmod-ohpc + loop_command "${PKG_MANAGER}" "${YES}" install lmod-ohpc "${ENABLE_ONEAPI}" } dnf_openeuler() { @@ -118,6 +125,6 @@ else if [ "${FACTORY_VERSION}" != "" ]; then loop_command wget "${FACTORY_REPOSITORY}" -O "${FACTORY_REPOSITORY_DESTINATION}" fi - loop_command "${PKG_MANAGER}" "${YES}" --no-gpg-checks install lmod-ohpc + loop_command "${PKG_MANAGER}" "${YES}" --no-gpg-checks install lmod-ohpc "${ENABLE_ONEAPI}" useradd -m ohpc fi diff --git a/tests/ci/setup_slurm_and_run_tests.sh b/tests/ci/setup_slurm_and_run_tests.sh index bc52f59aeb..69e0ed24ef 100755 --- a/tests/ci/setup_slurm_and_run_tests.sh +++ b/tests/ci/setup_slurm_and_run_tests.sh @@ -6,6 +6,9 @@ set -e USER=$1 shift +COMPILER_FAMILY=$1 +shift + PKG=("dnf" "-y") if hash zypper > /dev/null 2>&1; then @@ -22,8 +25,8 @@ fi which \ sudo \ prun-ohpc \ - openmpi4-gnu12-ohpc \ - mpich-gnu12-ohpc \ + openmpi4-"${COMPILER_FAMILY}"-ohpc \ + mpich-"${COMPILER_FAMILY}"-ohpc \ slurm-slurmd-ohpc \ slurm-slurmctld-ohpc \ slurm-example-configs-ohpc \ @@ -136,6 +139,8 @@ if sudo \ --disable-all \ --enable-modules \ --enable-rms-harness \ + --enable-compilers \ + --with-compiler-families='${COMPILER_FAMILY}' \ --with-mpi-families='openmpi4 mpich' \ ${TESTS[*]}; \ make check"; diff --git a/tests/rms-harness/ohpc-tests/test_mpi_families b/tests/rms-harness/ohpc-tests/test_mpi_families index 0b33c1d412..7b9fb21a4a 100755 --- a/tests/rms-harness/ohpc-tests/test_mpi_families +++ b/tests/rms-harness/ohpc-tests/test_mpi_families @@ -15,7 +15,7 @@ export BATS_JUNIT_CLASS=rms-harness ./bootstrap || exit 1 -for compiler in ${GCC_DEFAULT} ; do +for compiler in ${$COMPILER_FAMILIES} ; do for mpi in $MPI_FAMILIES ; do echo " "