Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] Modernise tests #43

Merged
merged 3 commits into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 0 additions & 23 deletions .github/scripts/install_linux.sh

This file was deleted.

20 changes: 0 additions & 20 deletions .github/scripts/install_macos.sh

This file was deleted.

67 changes: 28 additions & 39 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,40 @@
name: CI
name: ARCHDefs
on:
push:
branches:
- master
- main
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
name: CUTEst ${{ matrix.os }} ${{ matrix.compiler }}
name: CUTEst/${{ matrix.os }}/${{ matrix.compiler }}-v${{ matrix.version }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
compiler: gnu
sifdecode_input: '1\n1\nn\n1'
cutest_input: '1\n1\nn\n1\n2\n2\nn\nn\ny\nd\ny\n'
compiler: gcc
version: '12'
sifdecode_input: '1\n1\nN1\nNyy'
cutest_input: '1\n1\nN1\n2\n2\nNNyDyN'
arch: 'pc64.lnx.gfo'
- os: macos-latest
compiler: gnu
sifdecode_input: '2\nn\n4'
cutest_input: '2\nn\n4\n2\n2\nn\nn\ny\nd\ny\n'
compiler: gcc
version: '12'
sifdecode_input: '2\nN1\nNyy'
cutest_input: '2\nN1\n2\n2\nNNyDyN'
arch: 'mac64.osx.gfo'
- os: ubuntu-latest
compiler: intel
sifdecode_input: '1\n1\nn\n2\nn\ny'
cutest_input: '1\n1\nn\n2\nn\ny\n2\n8\nn\nn\ny\nd\ny\n'
hpckit: 'https://registrationcenter-download.intel.com/akdlm/irc_nas/18975/l_HPCKit_p_2022.3.1.16997_offline.sh'
script: 'install_linux.sh'
compiler: intel-classic
version: '2021.10'
sifdecode_input: '1\n1\nN2\nNyy'
cutest_input: '1\n1\nN2\n2\n8\nNNyDyN'
arch: 'pc64.lnx.ifr'
- os: macos-latest
compiler: intel
sifdecode_input: '2\nn\n2\nn\ny'
cutest_input: '2\nn\n5\n2\n4\nn\nn\ny\nd\ny\n'
# hpckit: 'https://registrationcenter-download.intel.com/akdlm/irc_nas/18977/m_HPCKit_p_2022.3.1.15344_offline.dmg'
hpckit: 'https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18681/m_HPCKit_p_2022.2.0.158_offline.dmg'
script: 'install_macos.sh'
compiler: intel-classic
version: '2021.10'
sifdecode_input: '2\nN2\nNyy'
cutest_input: '2\nN2\n2\n4\nNNyDyN'
arch: 'mac64.osx.ifr'
runs-on: ${{ matrix.os }}
env:
Expand All @@ -45,11 +43,8 @@ jobs:
CUTEST: ${{ github.workspace }}
MASTSIF: ${{ github.workspace }}/sif
steps:
- name: Set up Homebrew
if: matrix.compiler == 'gnu'
uses: Homebrew/actions/setup-homebrew@master
- name: Check out
uses: actions/checkout@v3
- name: Checkout CUTEst
uses: actions/checkout@v4
- name: Download ARCHDefs
id: download-archdefs
uses: robinraju/[email protected]
Expand All @@ -74,31 +69,25 @@ jobs:
run: |
tar zxf SIFDecode-${{ steps.download-sifdecode.outputs.tag_name }}.tar.gz
mv ralna-SIFDecode-* SIFDecode
- name: Install GNU C and Fortran compilers
if: matrix.compiler == 'gnu'
run: |
brew update
eval $(brew shellenv)
brew install gcc
- name: Install Intel OneAPI C and Fortran compilers
if: matrix.compiler == 'intel'
run: |
.github/scripts/${{ matrix.script }} "${{ matrix.hpckit }}" all
- name: Install compilers
uses: fortran-lang/setup-fortran@main
with:
compiler: ${{ matrix.compiler }}
version: ${{ matrix.version }}
- name: Install SIFDecode
run: |
[[ "${{ matrix.compiler }}" == "intel" ]] && source /opt/intel/oneapi/setvars.sh
export TERM=xterm
cd $SIFDECODE
printf "${{ matrix.sifdecode_input }}" > install_sifdecode_config
./install_sifdecode < install_sifdecode_config
- name: Build
run: |
[[ "${{ matrix.compiler }}" == "intel" ]] && source /opt/intel/oneapi/setvars.sh
cd $CUTEST
printf "${{ matrix.cutest_input }}" > install_config
./install_cutest < install_config
- name: Test double precision
run: |
[[ "${{ matrix.compiler }}" == "intel" ]] && source /opt/intel/oneapi/setvars.sh
export TERM=xterm
$CUTEST/bin/runcutest --help
$SIFDECODE/bin/sifdecoder -A ${{ matrix.arch }} ROSENBR
$CUTEST/bin/runcutest -A ${{ matrix.arch }} -p genc
Expand All @@ -107,7 +96,7 @@ jobs:
$CUTEST/bin/runcutest -A ${{ matrix.arch }} -p stats
- name: Test single precision
run: |
[[ "${{ matrix.compiler }}" == "intel" ]] && source /opt/intel/oneapi/setvars.sh
export TERM=xterm
$SIFDECODE/bin/sifdecoder -A ${{ matrix.arch }} ROSENBR
$CUTEST/bin/runcutest -A ${{ matrix.arch }} --single -p gen77
$CUTEST/bin/runcutest -A ${{ matrix.arch }} --single -p gen90
Loading