13
13
algorithms : ${{ steps.algorithms.outputs.algorithms }}
14
14
steps :
15
15
- uses : actions/checkout@v3
16
+ - name : Set up Python
17
+ id : setup_python
18
+ uses : actions/setup-python@v4
19
+ with :
20
+ python-version : " 3.11"
21
+ cache : ' pip'
22
+ - name : Cache virtualenv
23
+ uses : actions/cache@v3
24
+ with :
25
+ key : venv-${{ runner.os }}-${{ steps.setup_python.outputs.python-version}}-${{ hashFiles('requirements.txt') }}
26
+ path : .venv
27
+ - name : Install dependencies
28
+ run : |
29
+ python -m venv .venv
30
+ source .venv/bin/activate
31
+ python -m pip install --upgrade pip
32
+ python -m pip install -r requirements.txt
33
+ python -m pip install pytest
34
+ echo "$VIRTUAL_ENV/bin" >> $GITHUB_PATH
35
+ echo "VIRTUAL_ENV=$VIRTUAL_ENV" >> $GITHUB_ENV
16
36
- name : Read algorithms
17
37
id : algorithms
18
38
run : |
@@ -42,21 +62,28 @@ jobs:
42
62
with :
43
63
python-version : " 3.11"
44
64
cache : ' pip'
65
+ - name : Cache virtualenv
66
+ uses : actions/cache@v3
67
+ with :
68
+ key : venv-${{ runner.os }}-${{ steps.setup_python.outputs.python-version}}-${{ hashFiles('requirements.txt') }}
69
+ path : .venv
45
70
- name : Install dependencies
46
71
run : |
72
+ python -m venv .venv
73
+ source .venv/bin/activate
47
74
python -m pip install --upgrade pip
48
- pip install -r requirements.txt
75
+ python -m pip install -r requirements.txt
76
+ python -m pip install pytest
49
77
- name : Generate fitting data
50
78
run : |
51
- pip install pytest
52
- python -m pytest -m slow --selectAlgorithm ${{ matrix.algorithm }} --saveFileName test_output.csv --SNR ${{ matrix.SNR }} --fitCount 300 --saveDurationFileName test_duration.csv
79
+ python -m pytest -m slow --selectAlgorithm ${{ matrix.algorithm }} --saveFileName test_output_${{ matrix.algorithm }}_${{ matrix.SNR }}.csv --SNR ${{ matrix.SNR }} --fitCount 300 --saveDurationFileName test_duration_${{ matrix.algorithm }}_${{ matrix.SNR }}.csv
53
80
- name : Upload raw data
54
81
uses : actions/upload-artifact@v3
55
82
with :
56
- name : raw_data_${{ matrix.algorithm }}_${{ matrix.SNR }}
83
+ name : WorkingData
57
84
path : |
58
- test_output .csv
59
- test_duration .csv
85
+ test_output_${{ matrix.algorithm }}_${{ matrix.SNR }} .csv
86
+ test_duration_${{ matrix.algorithm }}_${{ matrix.SNR }} .csv
60
87
61
88
merge :
62
89
runs-on : ubuntu-latest
@@ -68,14 +95,14 @@ jobs:
68
95
path : artifacts
69
96
- name : Merge fitting results
70
97
run : |
71
- cat artifacts/raw_data_*/test_output .csv > test_output.csv
98
+ cat artifacts/WorkingData/test_output_* .csv > test_output.csv
72
99
- name : Merge timing results
73
100
run : |
74
- cat artifacts/raw_data_*/test_duration .csv > test_duration.csv
101
+ cat artifacts/WorkingData/test_duration_* .csv > test_duration.csv
75
102
- name : Upload merged artifacts
76
103
uses : actions/upload-artifact@v3
77
104
with :
78
- name : Raw Data
105
+ name : Combined Data
79
106
path : |
80
107
test_output.csv
81
108
test_duration.csv
84
111
runs-on : ubuntu-latest
85
112
needs : merge
86
113
steps :
114
+ - uses : actions/checkout@v3
87
115
- name : Set up R
88
116
uses : r-lib/actions/setup-r@v2
89
117
with :
0 commit comments