File tree 1 file changed +14
-8
lines changed
1 file changed +14
-8
lines changed Original file line number Diff line number Diff line change 9
9
- ' **'
10
10
pull_request :
11
11
jobs :
12
+ get-cmdstan-version :
13
+ name : version check
14
+ runs-on : ubuntu-latest
15
+ steps :
16
+ - name : Get CmdStan version
17
+ id : check-cmdstan
18
+ # get the latest cmdstan version to use as part of the cache key
19
+ run : |
20
+ echo "::set-output name=version::$(python -c 'import requests;print(requests.get("https://api.github.com/repos/stan-dev/cmdstan/releases/latest").json()["tag_name"][1:])')"
21
+ outputs :
22
+ version : ${{ steps.check-cmdstan.outputs.version }}
23
+
12
24
cmdstanpy :
25
+ needs : get-cmdstan-version
13
26
name : tests
14
27
runs-on : ${{ matrix.os }}
15
28
strategy :
@@ -57,18 +70,11 @@ jobs:
57
70
- name : Show libraries
58
71
run : python -m pip freeze
59
72
60
- - name : Get CmdStan version
61
- id : check-cmdstan
62
- # get the latest cmdstan version to use as part of the cache key
63
- run : |
64
- echo "::set-output name=version::$(python -c 'import requests;print(requests.get("https://api.github.com/repos/stan-dev/cmdstan/releases/latest").json()["tag_name"][1:])')"
65
- shell : bash
66
-
67
73
- name : CmdStan installation cacheing
68
74
uses : actions/cache@v2
69
75
with :
70
76
path : ~/.cmdstan
71
- key : ${{ runner.os }}-cmdstan-${{ steps.check -cmdstan.outputs.version }}-${{ hashFiles('**/install_cmdstan.py') }}
77
+ key : ${{ runner.os }}-cmdstan-${{ needs.get -cmdstan-version .outputs.version }}-${{ hashFiles('**/install_cmdstan.py') }}
72
78
73
79
- name : Install CmdStan (Linux, macOS)
74
80
if : matrix.os != 'windows-latest'
You can’t perform that action at this time.
0 commit comments