From ce2bca67142969dcc3d09c9c73ac3f11195b05bb Mon Sep 17 00:00:00 2001 From: Alexis Montoison <35051714+amontoison@users.noreply.github.com> Date: Thu, 11 Apr 2024 02:08:14 -0400 Subject: [PATCH] Update CI (#13) --- .github/scripts/install_linux.sh | 23 ------------- .github/scripts/install_macos.sh | 20 ----------- .github/workflows/ci.yml | 58 +++++++++++++++----------------- .github/workflows/meson.yml | 53 +++++++++-------------------- 4 files changed, 44 insertions(+), 110 deletions(-) delete mode 100755 .github/scripts/install_linux.sh delete mode 100755 .github/scripts/install_macos.sh diff --git a/.github/scripts/install_linux.sh b/.github/scripts/install_linux.sh deleted file mode 100755 index c39b0a5..0000000 --- a/.github/scripts/install_linux.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -# SPDX-FileCopyrightText: 2020 Intel Corporation -# -# SPDX-License-Identifier: MIT - -URL=$1 -COMPONENTS=$2 - -curl --output webimage.sh --url "$URL" --retry 5 --retry-delay 5 -chmod +x webimage.sh -./webimage.sh -x -f webimage_extracted --log extract.log -rm -rf webimage.sh -WEBIMAGE_NAME=$(ls -1 webimage_extracted/) -if [ -z "$COMPONENTS" ]; then - sudo webimage_extracted/"$WEBIMAGE_NAME"/bootstrapper -s --action install --eula=accept --log-dir=. - installer_exit_code=$? -else - sudo webimage_extracted/"$WEBIMAGE_NAME"/bootstrapper -s --action install --components="$COMPONENTS" --eula=accept --log-dir=. - installer_exit_code=$? -fi -rm -rf webimage_extracted -exit $installer_exit_code diff --git a/.github/scripts/install_macos.sh b/.github/scripts/install_macos.sh deleted file mode 100755 index 9c24601..0000000 --- a/.github/scripts/install_macos.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -# SPDX-FileCopyrightText: 2022 Intel Corporation -# -# SPDX-License-Identifier: MIT - -URL=$1 -COMPONENTS=$2 - -curl --output webimage.dmg --url "$URL" --retry 5 --retry-delay 5 -hdiutil attach webimage.dmg -if [ -z "$COMPONENTS" ]; then - sudo /Volumes/"$(basename "$URL" .dmg)"/bootstrapper.app/Contents/MacOS/bootstrapper -s --action install --eula=accept --log-dir=. - installer_exit_code=$? -else - sudo /Volumes/"$(basename "$URL" .dmg)"/bootstrapper.app/Contents/MacOS/bootstrapper -s --action install --components="$COMPONENTS" --eula=accept --log-dir=. - installer_exit_code=$? -fi -hdiutil detach /Volumes/"$(basename "$URL" .dmg)" -quiet -exit $installer_exit_code diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4b4dbfa..195fc5c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,37 +1,36 @@ -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: @@ -39,11 +38,8 @@ jobs: 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/release-downloader@v1.5 @@ -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) diff --git a/.github/workflows/meson.yml b/.github/workflows/meson.yml index ce910ab..3b98a88 100644 --- a/.github/workflows/meson.yml +++ b/.github/workflows/meson.yml @@ -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 @@ -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 @@ -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 @@ -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 @@ -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