Skip to content

Test Absoft

Test Absoft #323

Workflow file for this run

name: Test Absoft
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 20 * * *'
# Trigger the workflow manually
workflow_dispatch:
jobs:
test:
name: Run Absoft tests
runs-on: [self-hosted, absoft]
strategy:
fail-fast: false
matrix:
ikind: [i2]
solver: [newuoa, cobyla, lincoa, bobyqa, uobyqa]
steps:
- name: Checkout repository
uses: actions/[email protected]
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: |
LOCAL="$HOME/local"
AFDIR="$(find "$LOCAL" -maxdepth 2 -name "absoft[0-9]*" -type d -print | sort | tail -n 1)"
source "$AFDIR"/bin/absvars.sh
export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/:$LD_LIBRARY_PATH
# Use $(( )) rather than $(expr ). See https://unix.stackexchange.com/questions/63166/bash-e-exits-when-let-or-expr-evaluates-to-0
FFLAGS=-O$(($(date +%d) % 4))
FFLAGS=${FFLAGS/O0/g}
export FFLAGS
cd "$ROOT_DIR"/fortran/tests && make atest_${{ matrix.ikind }}.${{ matrix.solver }}
# af95 cannot handle allocatable characters.
# cd "$ROOT_DIR"/fortran/examples/${{ matrix.solver }} && make atest
- name: Store artifacts
uses: actions/[email protected]
if: always() # Always run even if the workflow is canceled manually or due to overtime.
with:
path: ${{ env.TEST_DIR }}/prima/fortran/tests/test.${{ matrix.solver }}/log/*.log
- name: Remove the test data
run: rm -rf ${{ env.TEST_DIR }}