Skip to content

Test ifx

Test ifx #95

Workflow file for this run

name: Test ifx
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 18 2-31/2 * *'
# Trigger the workflow manually
workflow_dispatch:
jobs:
test:
name: Run ifx tests
runs-on: ${{ matrix.os }}
continue-on-error: true
strategy:
fail-fast: false
matrix:
# Windows does not work. On Windows, the options for ifort/ifx starts with "/" instead of "-".
# As of 202301, ifx is not available on macOS.
#os: [ubuntu-latest, macos-latest]
os: [ubuntu-latest]
ikind: [i2, i8]
solver: [newuoa, cobyla, lincoa, bobyqa, uobyqa]
fflags: [-O1, -O2, -O3, -g, -fast]
testdim: [small, big]
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: Install Intel oneAPI on Linux
if: startsWith(matrix.os, 'ubuntu')
run: bash .github/scripts/install_oneapi_linux.sh
- name: Install Intel oneAPI on macOS
if: startsWith(matrix.os, 'macos')
run: bash .github/scripts/install_oneapi_macos.sh
- name: Miscellaneous setup
shell: bash
run: bash .github/scripts/misc_setup
- name: Conduct the test
shell: bash
run: |
cd "$ROOT_DIR"/fortran/${{ matrix.solver }} && bash ./flint --all && bash ./mlint --all
export FFLAGS=${{ matrix.fflags }}
export TESTDIM=${{ matrix.testdim }}
cd "$ROOT_DIR"/fortran/tests && make xtest_${{ matrix.ikind }}.${{ matrix.solver }}
cd "$ROOT_DIR"/fortran/examples/${{ matrix.solver }} && make xtest
- name: Store artifacts
uses: actions/upload-artifact@v3.1.2
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 }}
# 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_big_test ${{ secrets.GITHUB_TOKEN }} ${{ github.repository }} ${{ github.run_id }}