4
4
push :
5
5
branches :
6
6
- main
7
+ pull_request :
8
+ branches :
9
+ - ' *'
10
+ workflow_dispatch : # allows to trigger manually
7
11
schedule :
8
12
- cron : " 0 5 * * 4" # Once a week at 0500 on Thursday
9
13
37
41
with :
38
42
repository : deshaw/versioned-hdf5
39
43
path : ./versioned-hdf5/
40
- fetch-depth : 0 # Needed for asv to be able to run benchmarks on old commits
44
+ fetch-depth : 0 # Needed for asv to be able to run benchmarks on old commits
45
+
46
+ - name : Get commit hash
47
+ working-directory : ./versioned-hdf5
48
+ run : echo "PROJECT_SHA=$(git rev-parse HEAD)" >> $GITHUB_ENV
41
49
42
50
- uses : actions/checkout@v4
43
51
with :
@@ -46,17 +54,30 @@ jobs:
46
54
- name : Setup python with miniconda
47
55
uses : conda-incubator/setup-miniconda@v3
48
56
with :
49
- python-version : 3.11
50
- channels : conda-forge
57
+ miniforge-variant : Mambaforge
58
+ miniforge-version : latest
59
+ use-mamba : true
60
+ environment-file : versioned-hdf5-benchmarks/environment.yml
61
+ activate-environment : versioned-hdf5-benchmarks
51
62
52
63
- name : Install versioned-hdf5
64
+ shell : bash -el {0}
53
65
working-directory : ./versioned-hdf5
66
+ run : python -m pip install '.[bench]'
67
+
68
+ - name : Dump conda environment
69
+ shell : bash -el {0}
70
+ run : conda list
71
+
72
+ - name : Print hdf5 configuration
73
+ shell : bash -el {0}
74
+ working-directory : ./versioned-hdf5-benchmarks
54
75
run : |
55
- echo "PROJECT_SHA=$(git rev-parse HEAD)" >> $GITHUB_ENV
56
- conda install -n test pip hdf5 openmpi h5py ndindex -c conda-forge -y
57
- conda run -n test pip install '.[bench]'
76
+ python -c 'import utils; utils.debug_libhdf5_so()'
77
+ h5cc -showconfig
58
78
59
79
- name : Run benchmarks
80
+ shell : bash -el {0}
60
81
working-directory : ./versioned-hdf5
61
82
run : |
62
83
# Copy the old asv results back into ./versioned-hdf5 to avoid
@@ -65,11 +86,11 @@ jobs:
65
86
66
87
# set the machine name; otherwise this is unique to each run
67
88
echo "Setting machine name to $MACHINE_NAME"
68
- conda run -n test asv machine --machine $MACHINE_NAME --yes -v
89
+ asv machine --machine $MACHINE_NAME --yes -v
69
90
cat ~/.asv-machine.json
70
91
71
92
# Don't return exit code 1 if results are slower
72
- conda run -n test asv run --skip-existing --machine $MACHINE_NAME 1.7.0.. || true;
93
+ asv run --skip-existing --machine $MACHINE_NAME 1.7.0.. || true;
73
94
74
95
# Copy the new benchmark results to the benchmarks repo to commit them
75
96
rsync -r .asv ../versioned-hdf5-benchmarks/
@@ -82,18 +103,20 @@ jobs:
82
103
message : " Update benchmarks for commit ${{ env.PROJECT_SHA }}"
83
104
84
105
- name : Generate html
106
+ shell : bash -el {0}
85
107
working-directory : ./versioned-hdf5
86
- run : |
87
- conda run -n test asv publish -o ./html
108
+ run : asv publish -o ./html
88
109
89
110
- name : Setup Pages
90
111
uses : actions/configure-pages@v5
91
112
92
113
- name : Upload artifact
93
114
uses : actions/upload-pages-artifact@v3
94
115
with :
95
- path : ' ./versioned-hdf5/html'
116
+ path : ./versioned-hdf5/html
117
+ retention-days : 30
96
118
97
119
- name : Deploy to GitHub Pages
120
+ if : github.event_name != 'pull_request'
98
121
id : deployment
99
122
uses : actions/deploy-pages@v4
0 commit comments