-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #43 from ralna/fix-ci
[CI] Modernise tests
- Loading branch information
Showing
3 changed files
with
28 additions
and
82 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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: | ||
|
@@ -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] | ||
|
@@ -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 | ||
|
@@ -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 |