Skip to content

Lint the Fortran code and the MEX gateways with nagfor #668

Lint the Fortran code and the MEX gateways with nagfor

Lint the Fortran code and the MEX gateways with nagfor #668

Workflow file for this run

name: Lint the Fortran code and the MEX gateways with nagfor
on:
# Trigger the workflow on push or pull request
#push:
#pull_request: # DANGEROUS! MUST be disabled for self-hosted runners!
# Trigger the workflow by cron. The default time zone of GitHub Actions is UTC.
schedule:
- cron: '0 17 * * *'
# Trigger the workflow manually
workflow_dispatch:
inputs:
git-ref:
description: Git Ref (Optional)
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}', inputs.git-ref) || '' }}
jobs:
test:
name: Lint the Fortran code and the MEX gateways with nagfor
runs-on: [self-hosted, nagfor]
strategy:
fail-fast: false
matrix:
solver: [newuoa, cobyla, lincoa, bobyqa, uobyqa]
steps:
- name: Clone Repository (Latest)
uses: actions/checkout@v6.0.2
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@v6.0.2
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: Miscellaneous setup
run: bash .github/scripts/misc_setup
- name: Conduct the test
run: |
source ~/.bashrc
export PATH=$PATH:"~/local/bin"
source ~/local/bin/nag_licensing || (echo "\n\nNAG licensing failed.\n\n" && exit 2)
cd "$ROOT_DIR"/fortran/${{ matrix.solver }}
if [[ $(($(date +%-d) % 2)) == 0 ]] ; then
bash ./flint -n --all
else
bash ./mlint -n --all
fi
- name: Remove the test data
if: always() # Always run even if the workflow is canceled manually or due to overtime.
run: rm -rf ${{ env.TEST_DIR }}