Skip to content

Commit

Permalink
CI: test with more compilers and platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
MehdiChinoune committed Apr 1, 2024
1 parent 3d04a95 commit bdb8785
Showing 1 changed file with 149 additions and 12 deletions.
161 changes: 149 additions & 12 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,167 @@ on:
- cron: '0 2 * * 1'

jobs:
Build:

name: build

Debian:
name: Debian
runs-on: ubuntu-latest
container: ghcr.io/mehdichinoune/debian-gfortran-testing:${{ matrix.image_type }}
strategy:
fail-fast: false
matrix:
image_type: [old, stable, trunk]
build_type: [Debug, Release]

runs-on: ubuntu-latest

container: ghcr.io/mehdichinoune/debian-gfortran-testing:${{ matrix.image_type }}

steps:
- uses: actions/checkout@v4
- name: Configuring
run: |
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DPFUNIT_DIR=/opt/pfunit/PFUNIT-4.2/cmake
cmake .. \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DPFUNIT_DIR=/opt/pfunit/PFUNIT-4.9/cmake \
-B build \
-S .
- name: Building
run: make -C build -j$(nproc)
run: cmake --build build -j5
- name: Testing
run: |
cd build
ctest -j $(nproc) --output-on-failure
Ubuntu:
name: Ubuntu gcc-${{ matrix.gnu_ver }}-${{ matrix.build_type }}
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
gnu_ver: [12, 13]
build_type: [Debug, Release]

steps:
- uses: actions/checkout@v4
- name: Install gfortran
run: |
sudo apt update
sudo apt install --no-install-recommends -y \
gfortran-${{ matrix.gnu_ver }} \
make
- name: Configuring
run: |
cmake \
-DCMAKE_Fortran_COMPILER=gfortran-${{ matrix.gnu_ver }} \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-B build \
-S .
- name: Building
run: cmake --build build -j5
- name: Testing
run: |
cd build
ctest -j $(nproc) --output-on-failure
MSYS2:
name: MSYS2-${{ matrix.msystem }}-${{ matrix.build_type }}
runs-on: windows-2022
strategy:
fail-fast: false
matrix:
msystem: [UCRT64, CLANG64]
build_type: [Debug, Release]
defaults:
run:
shell: msys2 {0}

steps:
- uses: actions/checkout@v4
- name: Install compiler
uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.msystem }}
release: false
update: true
install: make
pacboy: fc:p cc:p openblas:p cmake:p
- name: Configuring
run: |
cmake \
-G"Unix Makefiles" \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-B build \
-S .
- name: Building
run: cmake --build build -j5
- name: Testing
run: |
cd build
ctest -j $(nproc) --output-on-failure
Intel:
name: Intel ${{ matrix.compiler }}-${{ matrix.build_type }}
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
build_type: [Debug, Release]
compiler: [ifort, ifx]

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Intel compilers
run: |
wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \
| gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
sudo apt update
sudo apt install --no-install-recommends -y \
intel-oneapi-compiler-fortran \
make
source /opt/intel/oneapi/setvars.sh
printenv >> $GITHUB_ENV
- name: Configuring
run: |
cmake \
-DCMAKE_Fortran_COMPILER=${{ matrix.compiler }} \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-B build \
-S .
- name: Building
run: cmake --build build -j5
- name: Testing
run: |
cd build
ctest -j $(nproc) --output-on-failure
Nvidia:
name: Nvidia-${{ matrix.build_type }}
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
build_type: [Debug, Release]

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Nvidia HPC Compiler
run: |
curl https://developer.download.nvidia.com/hpc-sdk/ubuntu/DEB-GPG-KEY-NVIDIA-HPC-SDK | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-hpcsdk-archive-keyring.gpg
echo 'deb [signed-by=/usr/share/keyrings/nvidia-hpcsdk-archive-keyring.gpg] https://developer.download.nvidia.com/hpc-sdk/ubuntu/amd64 /' | sudo tee /etc/apt/sources.list.d/nvhpc.list
sudo apt-get update
sudo apt install --no-install-recommends -y \
nvhpc-24-3 \
make
echo "/opt/nvidia/hpc_sdk/Linux_x86_64/24.3/compilers/bin" >> $GITHUB_PATH
echo "LD_LIBRARY_PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/24.3/compilers/lib" >> $GITHUB_ENV
- name: Configuring
run: |
cmake \
-DCMAKE_Fortran_COMPILER=nvfortran \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-B build \
-S .
- name: Building
run: cmake --build build -j5
- name: Testing
run: |
cd build
ctest -j $(nproc) --output-on-failure

0 comments on commit bdb8785

Please sign in to comment.