@@ -28,26 +28,21 @@ jobs:
28
28
29
29
steps :
30
30
- uses : actions/checkout@v1
31
- - name : Set defaults
32
- run : |
33
- export GCC_VERSION=$(echo ${{ matrix.compiler }} | cut -d'-' -f2)
34
- echo "FC=gfortran-${GCC_VERSION}" >> $GITHUB_ENV
35
- echo "TEST_FORTRAN=OFF" >> $GITHUB_ENV # default will be overwritten in the next step
36
31
- name : Enable Fortran
37
- if : startsWith(matrix.compiler, 'clang') == 'false'
32
+ if : startsWith(matrix.compiler, 'gcc')
38
33
run : echo "TEST_FORTRAN=ON" >> $GITHUB_ENV
39
34
- name : Install python modules
40
35
run : pip3 install --user nose-py3 numpy
41
36
- name : Cache pFUnit
42
37
id : cache-pfunit
43
- uses : actions/cache@v1
38
+ uses : actions/cache@v3.2.4
44
39
with :
45
40
path : pfunit
46
41
key : ${{ matrix.compiler }}-pfunit
47
42
- name : Install pFUnit
48
43
if : startsWith(matrix.compiler, 'gcc') && steps.cache-pfunit.outputs.cache-hit != 'true'
49
44
env :
50
- PFUNIT_VERSION : 4.4.1
45
+ PFUNIT_VERSION : 4.6.3
51
46
run : |
52
47
apt-get update && apt-get -y install m4
53
48
git clone --branch v${PFUNIT_VERSION} --depth 1 https://github.com/Goddard-Fortran-Ecosystem/pFUnit.git
59
54
id : ccache_cache_timestamp
60
55
shell : cmake -P {0}
61
56
run : |
62
- string(TIMESTAMP current_date "%Y-%m-%d-%H;%M; %S" UTC)
63
- message("::set-output name= timestamp:: ${current_date}")
57
+ string(TIMESTAMP current_date "%Y-%m-%d-%H-%M- %S" UTC)
58
+ message("echo \" timestamp= ${current_date}\" >> $GITHUB_OUTPUT ")
64
59
- name : Set ccache environment
65
60
run : |
66
61
echo "CCACHE_MAXSIZE=400M" >> $GITHUB_ENV
@@ -69,10 +64,10 @@ jobs:
69
64
echo "CCACHE_COMPRESS=true" >> $GITHUB_ENV
70
65
echo "CCACHE_COMPRESSLEVEL=6" >> $GITHUB_ENV
71
66
- name : ccache cache files
72
- uses : actions/cache@v1
67
+ uses : actions/cache@v3.2.4
73
68
with :
74
69
path : .ccache
75
- key : ${{ matrix.compiler }}-${{ matrix.build_type }}-ccache-${ { steps.ccache_cache_timestamp.outputs.timestamp } }
70
+ key : ${{ matrix.compiler }}-${{ matrix.build_type }}-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
76
71
restore-keys : |
77
72
${{ matrix.compiler }}-${{ matrix.build_type }}-ccache-
78
73
- name : Configure
93
88
run : cmake --build build --parallel 2
94
89
- name : Execute tests
95
90
run : cd build && ctest --output-on-failure
96
-
97
- build-python :
98
- strategy :
99
- matrix :
100
- os : [ubuntu-latest, macos-latest]
101
- python-version : ["3.10"]
102
- runs-on : ${{ matrix.os }}
103
- steps :
104
- - uses : actions/checkout@v3
105
- - name : install boost on macos
106
- if : ${{ matrix.os == 'macos-latest'}}
107
- run : |
108
- brew install boost
109
- - name : install boost for ubuntu
110
- if : ${{ matrix.os == 'ubuntu-latest'}}
111
- run : |
112
- sudo apt-get update
113
- sudo apt-get install libboost-all-dev
114
-
115
- - name : Set up Python ${{ matrix.python-version }}
116
- uses : actions/setup-python@v4
117
- with :
118
- python-version : ${{ matrix.python-version }}
119
- cache : " pip"
120
-
121
- - name : upgrade python tools
122
- run : python -m pip install --upgrade pip setuptools wheel
123
-
124
- - name : install dependencies
125
- run : pip install -r src/serialbox-python/requirements.txt
126
-
127
- - name : build
128
- run : pip install src/serialbox-python
129
-
130
- - name : run tests
131
- run : pytest -v test/serialbox-python/serialbox >> $GITHUB_STEP_SUMMARY
0 commit comments