forked from libprima/prima
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (50 loc) · 1.98 KB
/
test_flang_pi.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Test Flang on Raspberry Pi
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 4 2-31/3 * *'
# Trigger the workflow manually
workflow_dispatch:
jobs:
test:
name: Run Flang tests
runs-on: [self-hosted, ARM64, pi64]
strategy:
fail-fast: false
matrix:
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 Flang
run: bash .github/scripts/install_flang
- name: Miscellaneous setup
run: bash .github/scripts/misc_setup
- name: Conduct the test
run: |
#cd "$ROOT_DIR"/fortran/${{ matrix.solver }} && bash ./flint --all && bash ./mlint --all
cd "$ROOT_DIR"/fortran/tests
if [[ -f "test_cobyla.f90" ]] ; then
$SEDI 's|bign = 120|bign = 80|g' test_cobyla.f90
fi
if [[ -f "test_lincoa.f90" ]] ; then
$SEDI 's|bign = 400|bign = 380|g' test_lincoa.f90
fi
export FFLAGS=${{ matrix.fflags }} && export TESTDIM=${{ matrix.testdim }} && make ftest_${{ matrix.ikind }}.${{ matrix.solver }}
cd "$ROOT_DIR"/fortran/examples/${{ matrix.solver }} && make ftest
- 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 }}