Skip to content

Commit

Permalink
ci: sync; add Intel compiler tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mgates3 committed Aug 5, 2023
1 parent 98f2704 commit de9877e
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 20 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash -x

maker=$1
compiler=$2

mydir=$(dirname $0)
source ${mydir}/setup_env.sh
Expand Down
19 changes: 13 additions & 6 deletions .github/workflows/configure.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash -x

maker=$1
compiler=$2

if [ "${maker}" = "cmake" ]; then
rm -rf build
Expand All @@ -11,18 +12,24 @@ mydir=$(dirname $0)
source ${mydir}/setup_env.sh

print "======================================== Environment"
env
# Show environment variables, excluding functions.
(set -o posix; set)

print "======================================== Modules"
quiet module list -l

print "======================================== Setup build"
export color=no
# Note: set all env variables in setup_env.sh,
# else build.sh and test.sh won't see them.

rm -rf ${top}/install
if [ "${maker}" = "make" ]; then
make distclean
make config CXXFLAGS="-Werror" prefix=${top}/install \
make config prefix=${top}/install \
|| exit 10
fi
if [ "${maker}" = "cmake" ]; then
cmake -Dcolor=no -DCMAKE_CXX_FLAGS="-Werror" \

elif [ "${maker}" = "cmake" ]; then
cmake -Dcolor=no \
-DCMAKE_INSTALL_PREFIX=${top}/install \
.. \
|| exit 12
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,18 @@ on:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
icl_testsweeper:
timeout-minutes: 120
strategy:
matrix:
maker: [make, cmake]
compiler: [gnu, intel]
fail-fast: false
runs-on: self-hosted
steps:
- uses: actions/checkout@v3
- name: Configure
run: .github/workflows/configure.sh ${{matrix.maker}}
run: .github/workflows/configure.sh ${{matrix.maker}} ${{matrix.compiler}}
- name: Build
run: .github/workflows/build.sh ${{matrix.maker}}
run: .github/workflows/build.sh ${{matrix.maker}} ${{matrix.compiler}}
- name: Test
run: .github/workflows/test.sh ${{matrix.maker}}
run: .github/workflows/test.sh ${{matrix.maker}} ${{matrix.compiler}}
31 changes: 24 additions & 7 deletions .github/workflows/setup_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,38 @@ export top=$(pwd)

shopt -s expand_aliases


print "======================================== Load compiler"
quiet module load [email protected]
quiet which g++
g++ --version
quiet module load python
quiet which python
quiet which python3
python --version
python3 --version

quiet module load pkgconf
quiet which pkg-config

export color=no
export CXXFLAGS="-Werror -Wno-unused-command-line-argument"

#----------------------------------------------------------------- Compiler
if [ "${compiler}" = "intel" ]; then
print "======================================== Load Intel oneAPI compiler"
quiet module load intel-oneapi-compilers
else
print "======================================== Load GNU compiler"
quiet module load [email protected]
fi
print "---------------------------------------- Verify compiler"
print "CXX = $CXX"
print "CC = $CC"
print "FC = $FC"
${CXX} --version
${CC} --version
${FC} --version

if [ "${maker}" = "cmake" ]; then
print "======================================== Load cmake"
quiet module load cmake
quiet which cmake
cmake --version
cd build
fi

quiet module list
10 changes: 6 additions & 4 deletions .github/workflows/test.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
#!/bin/bash -x

maker=$1
compiler=$2

mydir=$(dirname $0)
source ${mydir}/setup_env.sh

print "======================================== Tests"

# Instead of exiting on the first failed test (bash -e),
# run all the tests and accumulate failures into $err.
err=0

cd test
export OMP_NUM_THREADS=8
./run_tests.py --xml ${top}/report-${maker}.xml

print "======================================== Tests"
cd test

./run_tests.py
(( err += $? ))

# todo smoke tests
Expand Down

0 comments on commit de9877e

Please sign in to comment.