Skip to content

Commit

Permalink
Update CI (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
amontoison authored Apr 11, 2024
1 parent cc8547a commit ce2bca6
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 110 deletions.
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.

58 changes: 28 additions & 30 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,49 +1,45 @@
name: CI
name: ARCHDefs
on:
push:
branches:
- master
- main
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
name: SIFDecode ${{ matrix.os }} ${{ matrix.compiler }}
name: SIFDecode/${{ matrix.os }}/${{ matrix.compiler }}-v${{ matrix.version }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
compiler: gnu
input: '1\n1\nn\n1'
compiler: gcc
version: '12'
input: '1\n1\nN1\nNyy'
arch: 'pc64.lnx.gfo'
- os: macos-latest
compiler: gnu
input: '2\nn\n4'
compiler: gcc
version: '12'
input: '2\nN1\nNyy'
arch: 'mac64.osx.gfo'
- os: ubuntu-latest
compiler: intel
input: '1\n1\nn\n2\nn\ny'
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'
input: '1\n1\nN2\nNyy'
arch: 'pc64.lnx.ifr'
- os: macos-latest
compiler: intel
input: '2\nn\n2\nn\ny'
hpckit: 'https://registrationcenter-download.intel.com/akdlm/irc_nas/18977/m_HPCKit_p_2022.3.1.15344_offline.dmg'
script: 'install_macos.sh'
compiler: intel-classic
version: '2021.10'
input: '2\nN2\nNyy'
arch: 'mac64.osx.ifr'
runs-on: ${{ matrix.os }}
env:
ARCHDEFS: ${{ github.workspace }}/ARCHDefs
SIFDECODE: ${{ 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 SIFDecode
uses: actions/checkout@v4
- name: Download ARCHDefs
id: download-archdefs
uses: robinraju/[email protected]
Expand All @@ -56,25 +52,27 @@ jobs:
run: |
tar zxf ARCHDefs-${{ steps.download-archdefs.outputs.tag_name }}.tar.gz
mv ralna-ARCHDefs-* ARCHDefs
- name: Install GNU C and Fortran compilers
if: matrix.compiler == 'gnu'
- name: Install compilers
uses: fortran-lang/setup-fortran@main
with:
compiler: ${{ matrix.compiler }}
version: ${{ matrix.version }}
- name: Build
run: |
brew update
eval $(brew shellenv)
brew install gcc
- name: Install Intel OneAPI C and Fortran compilers
if: matrix.compiler == 'intel'
cd $SIFDECODE
printf "${{ matrix.input }}" > install_config
./install_sifdecode < install_config
- name: Test
run: |
.github/scripts/${{ matrix.script }} "${{ matrix.hpckit }}" all
$SIFDECODE/bin/sifdecoder --help
$SIFDECO: ${{ matrix.version }}
- name: Build
run: |
[[ "${{ matrix.compiler }}" == "intel" ]] && source /opt/intel/oneapi/setvars.sh
cd $SIFDECODE
printf "${{ matrix.input }}" > install_config
./install_sifdecode < install_config
- name: Test
run: |
[[ "${{ matrix.compiler }}" == "intel" ]] && source /opt/intel/oneapi/setvars.sh
$SIFDECODE/bin/sifdecoder --help
$SIFDECODE/bin/sifdecoder -A ${{ matrix.arch }} ROSENBR.SIF
# check that all output files exist (EXTER.f may not exist)
Expand Down
53 changes: 16 additions & 37 deletions .github/workflows/meson.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,27 @@ on:
types: [opened, synchronize, reopened]
jobs:
build:
name: SIFDecode/${{ matrix.os }}/${{ matrix.fc_cmd }}/${{ matrix.compiler_version }}
name: SIFDecode/${{ matrix.os }}/${{ matrix.compiler }}-v${{ matrix.version }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
compiler_version: [12]
version: ['12']
include:
- compiler: gnu
fc_cmd: gfortran
- compiler: gcc
- os: ubuntu-latest
compiler: intel
compiler_version: 2021.9.0
fc_cmd: ifort
compiler: intel-classic
version: '2021.10'
- os: macos-latest
compiler: intel
compiler_version: 2021.9.0
fc_cmd: ifort
compiler: intel-classic
version: '2021.10'
- os: ubuntu-latest
compiler: intel-llvm
compiler_version: 2023.2.0
fc_cmd: ifx
compiler: intel
version: '2023.2'
runs-on: ${{ matrix.os }}
steps:
- name: Check out SIFDecode
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v4
Expand All @@ -41,26 +37,11 @@ jobs:
- name: Install Meson and Ninja
run: pip install meson ninja

- name: Install GNU compilers
if: matrix.compiler == 'gnu'
uses: awvwgk/setup-fortran@main
with:
compiler: gcc
version: ${{ matrix.compiler_version }}

- name: Install classic Intel compilers
if: matrix.compiler == 'intel'
uses: awvwgk/setup-fortran@main
with:
compiler: intel-classic
version: ${{ matrix.compiler_version }}

- name: Install nextgen Intel compilers
if: matrix.compiler == 'intel-llvm'
uses: awvwgk/setup-fortran@main
- name: Install compilers
uses: fortran-lang/setup-fortran@main
with:
compiler: intel
version: ${{ matrix.compiler_version }}
compiler: ${{ matrix.compiler }}
version: ${{ matrix.version }}

# Uncomment this section to obtain ssh access to VM
# - name: Setup tmate session
Expand All @@ -71,8 +52,6 @@ jobs:
shell: bash
run: |
meson setup builddir --prefix=$GITHUB_WORKSPACE/../meson
env:
FC: ${{ matrix.fc_cmd }}
- name: Build SIFDecode
shell: bash
Expand All @@ -81,7 +60,7 @@ jobs:
- uses: actions/upload-artifact@v3
if: failure()
with:
name: ${{ matrix.os }}_${{ matrix.fc_cmd }}_${{ matrix.compiler_version }}_meson-log.txt
name: ${{ matrix.os }}_${{ matrix.compiler }}-v${{ matrix.version }}_Int${{ matrix.int }}_meson-log.txt
path: builddir/meson-logs/meson-log.txt

- name: Install SIFDecode
Expand All @@ -91,5 +70,5 @@ jobs:
- uses: actions/upload-artifact@v3
if: failure()
with:
name: ${{ matrix.os }}_${{ matrix.fc_cmd }}_${{ matrix.compiler_version }}_install-log.txt
name: ${{ matrix.os }}_${{ matrix.compiler }}-v${{ matrix.version }}_Int${{ matrix.int }}_install-log.txt
path: builddir/meson-logs/install-log.txt

0 comments on commit ce2bca6

Please sign in to comment.