Skip to content

Commit

Permalink
ci: also build and test with the Intel compiler
Browse files Browse the repository at this point in the history
Signed-off-by: Adrian Reber <[email protected]>
  • Loading branch information
adrianreber committed Oct 10, 2023
1 parent ee436b5 commit e408542
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 16 deletions.
4 changes: 2 additions & 2 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
41 changes: 33 additions & 8 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
- 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'
Expand All @@ -95,6 +103,9 @@ jobs:
/tmp/empty
test_on_rhel:
strategy:
matrix:
compiler: [gnu12, intel]
runs-on: ubuntu-latest
name: Test on RHEL
env:
Expand All @@ -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/[email protected]
- uses: actions/download-artifact@v3
Expand All @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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"
Expand Down
13 changes: 10 additions & 3 deletions tests/ci/prepare-ci-environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"

Expand Down Expand Up @@ -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() {
Expand All @@ -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
9 changes: 7 additions & 2 deletions tests/ci/setup_slurm_and_run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ set -e
USER=$1
shift

COMPILER_FAMILY=$1
shift

PKG=("dnf" "-y")

if hash zypper > /dev/null 2>&1; then
Expand All @@ -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 \
Expand Down Expand Up @@ -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";
Expand Down
2 changes: 1 addition & 1 deletion tests/rms-harness/ohpc-tests/test_mpi_families
Original file line number Diff line number Diff line change
Expand Up @@ -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 " "
Expand Down

0 comments on commit e408542

Please sign in to comment.