Fix the compilation of C tests with Intel compilers #119
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Meson | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
types: [opened, synchronize, reopened] | |
jobs: | |
build: | |
name: ${{ matrix.os }}/${{ matrix.compiler }}-v${{ matrix.version }}/Mode-${{ matrix.mode }}/Int${{ matrix.int }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [windows-latest, ubuntu-latest, macos-13] | |
arch: ['x64'] | |
version: ['12'] | |
int: ['32', '64'] | |
mode: ['static', 'shared'] | |
include: | |
- compiler: gcc | |
- os: ubuntu-latest | |
compiler: intel-classic | |
version: '2021.10' | |
int: '32' | |
mode: 'static' | |
- os: ubuntu-latest | |
compiler: intel-classic | |
version: '2021.10' | |
int: '32' | |
mode: 'shared' | |
- os: ubuntu-latest | |
compiler: intel-classic | |
version: '2021.10' | |
int: '64' | |
mode: 'static' | |
- os: ubuntu-latest | |
compiler: intel-classic | |
version: '2021.10' | |
int: '64' | |
mode: 'shared' | |
- os: windows-latest | |
compiler: intel | |
version: '2023.2' | |
int: '32' | |
mode: 'static' | |
- os: windows-latest | |
compiler: intel | |
version: '2023.2' | |
int: '64' | |
mode: 'static' | |
- os: ubuntu-latest | |
compiler: intel | |
version: '2023.2' | |
int: '32' | |
mode: 'static' | |
- os: ubuntu-latest | |
compiler: intel | |
version: '2023.2' | |
int: '32' | |
mode: 'shared' | |
- os: ubuntu-latest | |
compiler: intel | |
version: '2023.2' | |
int: '64' | |
mode: 'static' | |
- os: ubuntu-latest | |
compiler: intel | |
version: '2023.2' | |
int: '64' | |
mode: 'shared' | |
- os: macos-latest | |
compiler: gcc | |
version: '13' | |
arch: 'arm64' | |
int: '32' | |
mode: 'static' | |
- os: macos-latest | |
compiler: gcc | |
version: '13' | |
arch: 'arm64' | |
int: '64' | |
mode: 'static' | |
- os: macos-latest | |
compiler: gcc | |
version: '13' | |
arch: 'arm64' | |
int: '32' | |
mode: 'shared' | |
- os: macos-latest | |
compiler: gcc | |
version: '13' | |
arch: 'arm64' | |
int: '64' | |
mode: 'shared' | |
# - os: ubuntu-latest | |
# compiler: nvidia-hpc | |
# version: '24.05' | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Check out CUTEST | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
- name: Install Meson and Ninja | |
shell: bash | |
run: | | |
pip install meson==1.4.1 | |
pip install ninja | |
- name: Set the environment variables CUTEST | |
shell: bash | |
run: echo "CUTEST=$GITHUB_WORKSPACE" >> $GITHUB_ENV | |
- name: Install compilers | |
uses: fortran-lang/setup-fortran@main | |
with: | |
compiler: ${{ matrix.compiler }} | |
version: ${{ matrix.version }} | |
# Uncomment this section to obtain ssh access to VM | |
# - name: Setup tmate session | |
# if: matrix.os == 'macos-13' | |
# uses: mxschmitt/action-tmate@v3 | |
- name: Setup CUTEST | |
shell: bash | |
run: | | |
INT64="false" | |
TESTS="true" | |
if [[ "${{matrix.int}}" == "64" ]]; then | |
INT64="true" | |
TESTS="false" | |
fi | |
if [[ "${{matrix.mode}}" == "static" ]]; then | |
MODE="static" | |
else | |
MODE="shared" | |
TESTS="false" | |
fi | |
QUADRUPLE="true" | |
if [[ "${{ matrix.compiler }}" == "intel-classic" || "${{ matrix.compiler }}" == "intel" ]]; then | |
QUADRUPLE="false" | |
fi | |
meson setup builddir --buildtype=debug \ | |
--prefix=$GITHUB_WORKSPACE/cutest \ | |
-Ddefault_library=${MODE} \ | |
-Dquadruple=${QUADRUPLE} \ | |
-Dint64=${INT64} \ | |
-Dtests=${TESTS} | |
- name: Build CUTEST | |
shell: bash | |
run: | | |
meson compile -C builddir | |
- uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: ${{ matrix.os }}_${{ matrix.compiler }}-v${{ matrix.version }}_Int${{ matrix.int }}_meson-log.txt | |
path: builddir/meson-logs/meson-log.txt | |
- name: Install CUTEST | |
shell: bash | |
run: | | |
meson install -C builddir | |
- uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: ${{ matrix.os }}_${{ matrix.compiler }}-v${{ matrix.version }}_Int${{ matrix.int }}_install-log.txt | |
path: builddir/meson-logs/install-log.txt | |
- name: Test CUTEST | |
shell: bash | |
run: | | |
meson test -C builddir | |
- uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: ${{ matrix.os }}_${{ matrix.compiler }}-v${{ matrix.version }}_Int${{ matrix.int }}_testlog.txt | |
path: builddir/meson-logs/testlog.txt |