231018.225043.HKT revise README regarding PRIMA.jl
#641
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: CMake build | |
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: '0 0 * * 1' # 0h mondays | |
workflow_dispatch: | |
inputs: | |
git-ref: | |
description: Git Ref (Optional) | |
required: false | |
stress-test: | |
description: Stress Test (Optional, true or false) | |
required: false | |
# Show the git ref in the workflow name if it is invoked manually. | |
run-name: ${{ github.event_name == 'workflow_dispatch' && format('Manual run {0} , {1}', inputs.git-ref, inputs.stress-test) || '' }} | |
permissions: | |
contents: read | |
jobs: | |
cmake-main: | |
runs-on: ${{ matrix.os }} | |
continue-on-error: true | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
toolchain: | |
- {compiler: gcc, version: 11, cflags: '-Wall -Wextra -Werror', fflags: '-Wall -Wextra -Wpedantic -Werror -pedantic -fimplicit-none -frecursive -fcheck=all -fstack-check -Wno-function-elimination'} | |
- {compiler: gcc, version: 12, cflags: '-Wall -Wextra -Werror', fflags: '-Wall -Wextra -Wpedantic -Werror -pedantic -fimplicit-none -frecursive -fcheck=all -fstack-check -Wno-function-elimination'} | |
- {compiler: gcc, version: 13, cflags: '-Wall -Wextra -Werror', fflags: '-Wall -Wextra -Wpedantic -Werror -pedantic -fimplicit-none -frecursive -fcheck=all -fstack-check -Wno-function-elimination'} | |
- {compiler: intel-classic, version: '2021.7', cflags: '-diag-disable=10441', fflags: '-warn all -debug extended -fimplicit-none -standard-semantics -assume recursion'} | |
- {compiler: intel-classic, version: '2021.8', cflags: '-diag-disable=10441', fflags: '-warn all -debug extended -fimplicit-none -standard-semantics -assume recursion'} | |
- {compiler: intel-classic, version: '2021.9', cflags: '-diag-disable=10441', fflags: '-warn all -debug extended -fimplicit-none -standard-semantics -assume recursion'} | |
include: | |
- os: ubuntu-latest | |
toolchain: {compiler: intel, version: '2023.0', cflags: '', fflags: '-warn all -debug extended -fimplicit-none -standard-semantics -assume recursion'} | |
- os: ubuntu-latest | |
toolchain: {compiler: intel, version: '2023.1', cflags: '', fflags: '-warn all -debug extended -fimplicit-none -standard-semantics -assume recursion'} | |
- os: ubuntu-latest | |
toolchain: {compiler: intel, version: '2023.2', cflags: '', fflags: '-warn all -debug extended -fimplicit-none -standard-semantics -assume recursion'} | |
- os: windows-latest | |
toolchain: {compiler: gcc, version: 11, cflags: '-Wall -Wextra -Werror', fflags: '-Wall -Wextra -Wpedantic -Werror -pedantic -fimplicit-none -frecursive -fcheck=all -fstack-check -Wno-function-elimination'} | |
- os: windows-latest | |
toolchain: {compiler: gcc, version: 12, cflags: '-Wall -Wextra -Werror', fflags: '-Wall -Wextra -Wpedantic -Werror -pedantic -fimplicit-none -frecursive -fcheck=all -fstack-check -Wno-function-elimination'} | |
- os: windows-latest | |
toolchain: {compiler: gcc, version: 13, cflags: '-Wall -Wextra -Werror', fflags: '-Wall -Wextra -Wpedantic -Werror -pedantic -fimplicit-none -frecursive -fcheck=all -fstack-check -Wno-function-elimination'} | |
- os: windows-latest | |
toolchain: {compiler: intel, version: '2023.0', cflags: '', fflags: '/warn:all /debug:extended /Z7 /fimplicit-none /standard-semantics /assume:recursion'} | |
- os: windows-latest | |
toolchain: {compiler: intel, version: '2023.1', cflags: '', fflags: '/warn:all /debug:extended /Z7 /fimplicit-none /standard-semantics /assume:recursion'} | |
- os: windows-latest | |
toolchain: {compiler: intel, version: '2023.2', cflags: '', fflags: '/warn:all /debug:extended /Z7 /fimplicit-none /standard-semantics /assume:recursion'} | |
- os: windows-latest | |
toolchain: {compiler: intel-classic, version: '2021.7', cflags: '/Qdiag-disable:10441', fflags: '/warn:all /debug:extended /Z7 /fimplicit-none /standard-semantics /assume:recursion'} | |
- os: windows-latest | |
toolchain: {compiler: intel-classic, version: '2021.8', cflags: '/Qdiag-disable:10441', fflags: '/warn:all /debug:extended /Z7 /fimplicit-none /standard-semantics /assume:recursion'} | |
- os: windows-latest | |
toolchain: {compiler: intel-classic, version: '2021.9', cflags: '/Qdiag-disable:10441', fflags: '/warn:all /debug:extended /Z7 /fimplicit-none /standard-semantics /assume:recursion'} | |
steps: | |
- name: Clone Repository (Latest) | |
uses: actions/checkout@v4 | |
if: github.event.inputs.git-ref == '' | |
with: | |
ssh-key: ${{ secrets.SSH_PRIVATE_KEY_ACT }} # This forces checkout to use SSH, not HTTPS | |
submodules: recursive | |
- name: Clone Repository (Custom Ref) | |
uses: actions/checkout@v4 | |
if: github.event.inputs.git-ref != '' | |
with: | |
ref: ${{ github.event.inputs.git-ref }} | |
ssh-key: ${{ secrets.SSH_PRIVATE_KEY_ACT }} # This forces checkout to use SSH, not HTTPS | |
submodules: recursive | |
- name: Install Ninja / Ubuntu | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
run: sudo apt update && sudo apt install ninja-build | |
- name: Install Ninja / MacOS | |
if: ${{ matrix.os == 'macos-latest' }} | |
run: brew install ninja | |
- uses: fortran-lang/setup-fortran@main | |
id: setup-fortran | |
with: | |
compiler: ${{ matrix.toolchain.compiler }} | |
version: ${{ matrix.toolchain.version }} | |
- name: Build | |
run: | | |
cmake --version | |
cmake -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=. -LAH -DCMAKE_C_FLAGS="${{ matrix.toolchain.cflags }}" -DCMAKE_Fortran_FLAGS="${{ matrix.toolchain.fflags }}" . | |
cmake --build . --target install --parallel 4 | |
cmake --build . --target tests --parallel 4 | |
ctest --output-on-failure -V -j4 -E stress | |
env: | |
FC: ${{ steps.setup-fortran.outputs.fc }} | |
- name: Stress test | |
if: ${{ github.event_name == 'schedule' || github.event.inputs.stress-test == 'true' }} | |
run: | | |
ctest --output-on-failure -V -j4 -R stress | |
cmake-other: | |
runs-on: ubuntu-latest | |
continue-on-error: true | |
strategy: | |
fail-fast: false | |
matrix: | |
toolchain: | |
- {compiler: aflang, cflags: '-Wall', fflags: '-pedantic -Weverything -Wall -Wextra -Minform=warn -Mstandard -Mrecursive'} | |
- {compiler: nvfortran, cflags: '-Wall', fflags: '-C -Wall -Wextra -Minform=warn -Mstandard -Mrecursive -Mbounds -Mchkstk -Mchkptr'} | |
- {compiler: flang, cflags: '-Wall', fflags: '-pedantic -Weverything -Wall -Wextra'} | |
steps: | |
- name: Clone Repository (Latest) | |
uses: actions/checkout@v4 | |
if: github.event.inputs.git-ref == '' | |
with: | |
ssh-key: ${{ secrets.SSH_PRIVATE_KEY_ACT }} # This forces checkout to use SSH, not HTTPS | |
submodules: recursive | |
- name: Clone Repository (Custom Ref) | |
uses: actions/checkout@v4 | |
if: github.event.inputs.git-ref != '' | |
with: | |
ref: ${{ github.event.inputs.git-ref }} | |
ssh-key: ${{ secrets.SSH_PRIVATE_KEY_ACT }} # This forces checkout to use SSH, not HTTPS | |
submodules: recursive | |
- name: Install AOCC | |
if: ${{ matrix.toolchain.compiler == 'aflang' }} | |
run: bash .github/scripts/install_aocc | |
- name: Install nvfortran | |
if: ${{ matrix.toolchain.compiler == 'nvfortran' }} | |
run: bash .github/scripts/install_nvfortran | |
- name: Install Flang | |
if: ${{ matrix.toolchain.compiler == 'flang' }} | |
run: bash .github/scripts/install_flang | |
- name: Build | |
run: | | |
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=. -LAH -DCMAKE_C_FLAGS="${{ matrix.toolchain.cflags }}" -DCMAKE_Fortran_FLAGS="${{ matrix.toolchain.fflags }}" . | |
cmake --build . --target install --parallel 4 | |
cmake --build . --target tests --parallel 4 | |
# cobyla test does not pass on AOCC: https://github.com/libprima/prima/issues/41 | |
ctest --output-on-failure -V -j4 -E "stress|cobyla" | |
env: | |
FC: ${{ matrix.toolchain.compiler }} | |
- name: Stress test | |
if: ${{ github.event_name == 'schedule' || github.event.inputs.stress-test == 'true' }} | |
run: | | |
ctest --output-on-failure -V -j4 -R stress -E cobyla | |
# The following job check whether the tests were successful or cancelled due to timeout. | |
# N.B.: Remember to specify `continue-on-error: true` for the job of the tests. | |
check_success_timeout: | |
runs-on: ubuntu-latest | |
if: ${{ !cancelled() }} | |
needs: [cmake-main, cmake-other] | |
steps: | |
- name: Clone the GitHub actions scripts | |
uses: actions/checkout@v4 | |
with: | |
repository: equipez/github_actions_scripts | |
ssh-key: ${{ secrets.SSH_PRIVATE_KEY_ACT }} # This forces checkout to use SSH, not HTTPS | |
path: scripts | |
- name: Check whether the tests were successful or cancelled due to timeout | |
run: bash scripts/check_success_timeout_big_test ${{ secrets.GITHUB_TOKEN }} ${{ github.repository }} ${{ github.run_id }} |