Skip to content

NEKO v0.9.0

NEKO v0.9.0 #218

Workflow file for this run

name: CI
# Controls when the action will run.
on:
pull_request:
branches: [master]
workflow_dispatch:
env:
FLINT_GLOBAL_MINIMUM: 9.0
FLINT_CHANGED_FILES_MINIMUM: 10.0
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:
flint-global-minimum: ${{ steps.store.outputs.flint-global-minimum }}
flint-changed-minimum: ${{ steps.store.outputs.flint-changed-minimum }}
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:
needs:
- prepare
uses: ./.github/workflows/check_lint.yml
with:
global-minimum-score: ${{ needs.prepare.outputs.flint-global-minimum }}

Check failure on line 54 in .github/workflows/main.yml

View workflow run for this annotation

GitHub Actions / CI

Invalid workflow file

The workflow is not valid. .github/workflows/main.yml (Line: 54, Col: 29): Invalid input, global-minimum-score is not defined in the referenced workflow. .github/workflows/main.yml (Line: 55, Col: 36): Invalid input, changed-files-minimum-score is not defined in the referenced workflow.
changed-files-minimum-score: ${{ needs.prepare.outputs.flint-changed-minimum }}
depend:
name: Make depend
needs:
- prepare
uses: ./.github/workflows/check_depend.yml
with:
json-fortran-version: ${{ needs.prepare.outputs.json-fortran-version }}
GNU:
needs:
- prepare
uses: ./.github/workflows/check_gnu.yml
with:
json-fortran-version: ${{ needs.prepare.outputs.json-fortran-version }}
pfunit-version: ${{ needs.prepare.outputs.pfunit-version }}
Intel:
needs:
- prepare
uses: ./.github/workflows/check_intel.yml
with:
json-fortran-version: ${{ needs.prepare.outputs.json-fortran-version }}
NVIDIA:
needs:
- prepare
uses: ./.github/workflows/check_nvidia.yml
with:
json-fortran-version: ${{ needs.prepare.outputs.json-fortran-version }}
ReFrame:
needs:
- prepare
- GNU
uses: ./.github/workflows/check_reframe.yml
with:
json-fortran-version: ${{ needs.prepare.outputs.json-fortran-version }}
documentation:
needs: [prepare, Intel, GNU, NVIDIA, ReFrame]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup env.
run: |
sudo apt-get update && sudo apt-get install -y git openmpi-bin libopenmpi-dev autoconf automake autotools-dev gfortran libopenblas-dev make git m4 python3 doxygen fonts-freefont-ttf graphviz
git clone https://github.com/ExtremeFLOW/doxygen-awesome-css doc/doxygen-awesome-css
- name: Get JSON-Fortran
id: get-json-fortran
uses: ./.github/actions/setup_json-fortran
with:
version: ${{ needs.prepare.outputs.json-fortran-version }}
os: ${{ runner.os }}
compiler: gfortran
- name: Add JSON-Fortran to environment
env:
JSON_FORTRAN_DIR: ${{ steps.get-json-fortran.outputs.install-dir }}
run: |
echo "PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:$JSON_FORTRAN_DIR/lib/pkgconfig/" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$JSON_FORTRAN_DIR/lib/" >> $GITHUB_ENV
- name: Doxygen
run: |
./regen.sh
./configure FC=gfortran
make html
# Deploy the HTML documentation to GitHub Pages
- name: GH Pages Deployment
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./doc/html/
allow_empty_commit: false
force_orphan: true
publish_branch: gh-pages
destination_dir: docs/release
keep_files: true
enable_jekyll: true
check_complete:
name: Main 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"