-
Notifications
You must be signed in to change notification settings - Fork 15
45 lines (40 loc) · 1.33 KB
/
fypp.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
name: fypp-checks
on:
# run on every push - doesn't work on forks
push:
# run on every push (not commit) to a PR, plus open/reopen
pull_request:
types:
- synchronize
- opened
- reopened
jobs:
various:
name: FYPP checks - runs check on fypp and f90 files
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.11"
- run: pip install fypp
- name: Check ftorch.fypp matches ftorch.f90
run: |
fypp src/ftorch.fypp src/temp.f90_temp
if ! diff -q src/ftorch.f90 src/temp.f90_temp; then
echo "Error: The code in ftorch.f90 does not match that expected from ftorch.fypp."
echo "Please re-run fypp on ftorch.fypp to ensure consistency and re-commit."
exit 1
else
exit 0
fi
- name: Check ftorch_test_utils.fypp matches ftorch_test_utils.f90
run: |
fypp src/ftorch_test_utils.fypp src/temp.f90_temp
if ! diff -q src/ftorch_test_utils.f90 src/temp.f90_temp; then
echo "Error: The code in ftorch_test_utils.f90 does not match that expected from ftorch_test_utils.fypp."
echo "Please re-run fypp on ftorch_test_utils.fypp to ensure consistency and re-commit."
exit 1
else
exit 0
fi