-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b7f9003
commit b3d51f2
Showing
1 changed file
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: CMake build / 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 19 * * *' | ||
# Trigger the workflow manually | ||
workflow_dispatch: | ||
|
||
jobs: | ||
|
||
test: | ||
name: CMake build with nagfor | ||
runs-on: [self-hosted, nagfor] | ||
continue-on-error: true | ||
|
||
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: | | ||
export PATH=$PATH:"~/local/bin" | ||
source ~/local/bin/nag_licensing || echo "\n\nNAG licensing failed.\n\n" | ||
# 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) % 5)) | ||
FFLAGS=${FFLAGS/O0/g} | ||
FFLAGS=${FFLAGS/O4/fast} | ||
export FFLAGS | ||
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=. -LAH -DCMAKE_C_FLAGS="" -DCMAKE_Fortran_FLAGS="${FFLAGS}" . | ||
cmake --build . --target install --parallel 4 | ||
ctest --output-on-failure -V |