File tree 1 file changed +15
-11
lines changed
1 file changed +15
-11
lines changed Original file line number Diff line number Diff line change 27
27
uses : actions/setup-python@v2
28
28
with :
29
29
python-version : ${{ matrix.python-version }}
30
- - name : Get Cmdstan Version
31
- id : check-cmdstan
32
- run : |
33
- echo "::set-output name=version::$(curl -s 'https://api.github.com/repos/stan-dev/cmdstan/releases/latest' | python -c 'import json,sys;obj=json.load(sys.stdin);print(obj["tag_name"])')"
34
- shell : bash
35
- - name : Cache cmdstan installation
36
- uses : actions/cache@v2
37
- with :
38
- path : ~/.cmdstan
39
- key : ${{ runner.os }}-cmdstan-${{ steps.check-cmdstan.outputs.version }}-${{ hashFiles('**/install_cmdstan.py') }}
30
+
40
31
- name : Install dependencies (python)
41
32
run : |
42
33
pip install --upgrade pip wheel
@@ -61,11 +52,24 @@ jobs:
61
52
if : matrix.os == 'windows-latest'
62
53
run : |
63
54
$whl = Get-ChildItem -Path dist -Filter *.whl | Select-Object -First 1
64
- pip install "$whl"
55
+ pip install "$whl"
65
56
66
57
- name : Show libraries
67
58
run : python -m pip freeze
68
59
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
+ - name : Cmdstan installation cacheing
68
+ uses : actions/cache@v2
69
+ with :
70
+ path : ~/.cmdstan
71
+ key : ${{ runner.os }}-cmdstan-${{ steps.check-cmdstan.outputs.version }}-${{ hashFiles('**/install_cmdstan.py') }}
72
+
69
73
- name : Install CmdStan (Linux, macOS)
70
74
if : matrix.os != 'windows-latest'
71
75
run : |
You can’t perform that action at this time.
0 commit comments