NEKO v0.9.0 #224
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: CI | |
# Controls when the action will run. | |
on: | |
pull_request: | |
branches: [master] | |
workflow_dispatch: | |
env: | |
PFUNIT_VERSION: v4.4.2 | |
JSON_FORTRAN_VERSION: 8.3.0 | |
# Allow only one concurrent deployment, skipping runs queued between the run | |
# in-progress and latest queued. We do not wish to waste time on old runs if a | |
# newer one is available. | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
prepare: | |
name: Prepare the environment | |
runs-on: ubuntu-latest | |
outputs: | |
pfunit-version: ${{ steps.store.outputs.pfunit-version }} | |
json-fortran-version: ${{ steps.store.outputs.json-fortran-version }} | |
steps: | |
- name: Check if PR is a draft | |
shell: bash | |
run: | | |
if [ "${{ github.event.pull_request.draft }}" == "true" ]; then | |
echo "PR is a draft" >&2 | |
exit 1 | |
fi | |
- name: Store environment variables | |
id: store | |
run: | | |
echo "flint-global-minimum=$FLINT_GLOBAL_MINIMUM" >> $GITHUB_OUTPUT | |
echo "flint-changed-minimum=$FLINT_CHANGED_FILES_MINIMUM" >> $GITHUB_OUTPUT | |
echo "pfunit-version=$PFUNIT_VERSION" >> $GITHUB_OUTPUT | |
echo "json-fortran-version=$JSON_FORTRAN_VERSION" >> $GITHUB_OUTPUT | |
linting: | |
name: Flint | |
needs: | |
- prepare | |
uses: ./.github/workflows/check_lint.yml | |
depend: | |
name: Make depend | |
needs: | |
- prepare | |
uses: ./.github/workflows/check_depend.yml | |
with: | |
json-fortran-version: ${{ needs.prepare.outputs.json-fortran-version }} | |
# ========================================================================== # | |
# Compilation checks | |
GNU: | |
name: GNU | |
needs: | |
- prepare | |
- depend | |
uses: ./.github/workflows/check_gnu.yml | |
with: | |
json-fortran-version: ${{ needs.prepare.outputs.json-fortran-version }} | |
pfunit-version: ${{ needs.prepare.outputs.pfunit-version }} | |
Intel: | |
name: Intel | |
needs: | |
- prepare | |
- depend | |
uses: ./.github/workflows/check_intel.yml | |
with: | |
json-fortran-version: ${{ needs.prepare.outputs.json-fortran-version }} | |
Nvidia: | |
name: Nvidia | |
needs: | |
- prepare | |
- depend | |
uses: ./.github/workflows/check_nvidia.yml | |
with: | |
json-fortran-version: ${{ needs.prepare.outputs.json-fortran-version }} | |
# ========================================================================== # | |
# ReFrame and benchmarks | |
ReFrame: | |
name: ReFrame | |
needs: | |
- prepare | |
- depend | |
- GNU | |
uses: ./.github/workflows/check_reframe.yml | |
with: | |
json-fortran-version: ${{ needs.prepare.outputs.json-fortran-version }} | |
# ========================================================================== # | |
# Documentation | |
Documentation: | |
name: documentation | |
needs: | |
- prepare | |
- depend | |
- GNU | |
- Intel | |
# - Nvidia | |
- ReFrame | |
uses: ./.github/workflows/documentation.yml | |
# # ========================================================================== # | |
# # Upload the badges | |
# upload-badges: | |
# name: "Upload badges" | |
# runs-on: ubuntu-20.04 | |
# needs: | |
# - linting | |
# if: ${{ !cancelled() }} && | |
# ${{ needs.linting.result == 'success' }} && | |
# steps: | |
# - name: Checkout | |
# uses: actions/checkout@v4 | |
# - name: Download artifacts | |
# uses: actions/download-artifact@v4 | |
# with: | |
# pattern: "*-badge" | |
# path: doc/media/ | |
# merge-multiple: true | |
# - name: Push badges | |
# uses: EndBug/add-and-commit@v9 | |
# with: | |
# add: "doc/media/*-badge.svg" | |
# message: "Add badges" | |
# author_name: "GitHub Actions" | |
# default_author: github_actor | |
check_complete: | |
name: Release PR Ready | |
if: ${{ always() }} | |
needs: | |
- prepare | |
- linting | |
- depend | |
- GNU | |
- Intel | |
- Nvidia | |
- ReFrame | |
- documentation | |
runs-on: ubuntu-latest | |
env: | |
draft_status: ${{ needs.prepare.result }} | |
flint_status: ${{ needs.linting.result }} | |
gnu_status: ${{ needs.GNU.result }} | |
inel_status: ${{ needs.Intel.result }} | |
nvidia_status: ${{ needs.Nvidia.result }} | |
reframe_status: ${{ needs.ReFrame.result }} | |
doc_status: ${{ needs.documentation.result }} | |
steps: | |
- name: All checks passed | |
run: | | |
success=true | |
fail=() | |
if [ "$draft_status" != "success" ]; then | |
fail+=("\t- Draft check: $draft_status") | |
success=false | |
fi | |
if [ "$flint_status" != "success" ]; then | |
fail+=("\t- Linting check: $flint_status") | |
success=false | |
fi | |
if [ "$gnu_status" != "success" ]; then | |
fail+=("\t- GNU check: $gnu_status") | |
success=false | |
fi | |
if [ "$inel_status" != "success" ]; then | |
fail+=("\t- Intel check: $inel_status") | |
success=false | |
fi | |
if [ "$nvidia_status" != "success" ]; then | |
fail+=("\t- NVIDIA check: $nvidia_status") | |
success=false | |
fi | |
if [ "$reframe_status" != "success" ]; then | |
fail+=("\t- ReFrame check: $reframe_status") | |
success=false | |
fi | |
if [ "$doc_status" != "success" ]; then | |
fail+=("\t- Documentation check: $doc_status") | |
success=false | |
fi | |
if [ "$success" = false ]; then | |
>&2 echo "The following checks failed:" | |
for i in "${fail[@]}"; do | |
>&2 printf "$i\n" | |
done | |
exit 1 | |
fi | |
echo "All checks passed" |