Skip to content

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

Lint the Fortran code and the MEX gateways with nagfor

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

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:
jobs:
test:
name: Lint the Fortran code and the MEX gateways with nagfor
runs-on: [self-hosted, nagfor]
continue-on-error: true
strategy:
fail-fast: false
matrix:
solver: [newuoa, cobyla, lincoa, bobyqa, uobyqa]
steps:
- name: Checkout repository
uses: actions/checkout@v3.5.3
with:
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
# 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: test
steps:
- name: Clone the GitHub actions scripts
uses: actions/checkout@v3.5.3
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 ${{ secrets.GITHUB_TOKEN }} ${{ github.repository }} ${{ github.run_id }}