@@ -93,28 +93,100 @@ jobs:
9393 with :
9494 path : Build
9595 key : windows-build-${{ steps.source-hash.outputs.hash }}
96- - name : Install open-ephys-data-format
96+ - name : Get plugin commit hashes
97+ id : plugin-hashes
98+ shell : bash
99+ run : |
100+ data_format_hash=$(git ls-remote https://github.com/open-ephys-plugins/open-ephys-data-format.git main | cut -f1 | cut -c1-16)
101+ hdf5_hash=$(git ls-remote https://github.com/open-ephys-plugins/OpenEphysHDF5Lib.git main | cut -f1 | cut -c1-16)
102+ nwb_hash=$(git ls-remote https://github.com/open-ephys-plugins/nwb-format.git main | cut -f1 | cut -c1-16)
103+ echo "data-format=$data_format_hash" >> $GITHUB_OUTPUT
104+ echo "hdf5=$hdf5_hash" >> $GITHUB_OUTPUT
105+ echo "nwb=$nwb_hash" >> $GITHUB_OUTPUT
106+ - name : Restore open-ephys-data-format cache
107+ uses : actions/cache@v4
108+ id : cache-data-format
109+ with :
110+ path : C:\OEPlugins\open-ephys-data-format
111+ key : plugin-data-format-${{ steps.plugin-hashes.outputs.data-format }}
112+ restore-keys : |
113+ plugin-data-format-
114+ - name : Build open-ephys-data-format
115+ if : steps.cache-data-format.outputs.cache-hit != 'true'
97116 shell : powershell
98117 run : |
99- New-Item -Path '.. \OEPlugins' -ItemType Directory
100- git clone --branch main https://github.com/open-ephys-plugins/open-ephys-data-format.git .. \OEPlugins\open-ephys-data-format
101- cd .. \OEPlugins\open-ephys-data-format\Build
118+ New-Item -Path 'C: \OEPlugins' -ItemType Directory -Force
119+ git clone --branch main https://github.com/open-ephys-plugins/open-ephys-data-format.git C: \OEPlugins\open-ephys-data-format
120+ cd C: \OEPlugins\open-ephys-data-format\Build
102121 cmake -G "Visual Studio 17 2022" -A x64 ..
122+ msbuild ALL_BUILD.vcxproj -p:Configuration=Release -p:Platform=x64 -m
123+ - name : Install open-ephys-data-format
124+ shell : powershell
125+ run : |
126+ cd C:\OEPlugins\open-ephys-data-format\Build
103127 msbuild INSTALL.vcxproj -p:Configuration=Release -p:Platform=x64
104- - name : Install OpenEphysHDF5Lib
128+ - name : Save open-ephys-data-format cache
129+ if : steps.cache-data-format.outputs.cache-hit != 'true'
130+ uses : actions/cache@v4
131+ with :
132+ path : C:\OEPlugins\open-ephys-data-format
133+ key : plugin-data-format-${{ steps.plugin-hashes.outputs.data-format }}
134+ - name : Restore OpenEphysHDF5Lib cache
135+ uses : actions/cache@v4
136+ id : cache-hdf5
137+ with :
138+ path : C:\OEPlugins\OpenEphysHDF5Lib
139+ key : plugin-hdf5-${{ steps.plugin-hashes.outputs.hdf5 }}
140+ restore-keys : |
141+ plugin-hdf5-
142+ - name : Build OpenEphysHDF5Lib
143+ if : steps.cache-hdf5.outputs.cache-hit != 'true'
105144 shell : powershell
106145 run : |
107- git clone --branch main https://github.com/open-ephys-plugins/OpenEphysHDF5Lib.git ..\OEPlugins\OpenEphysHDF5Lib
108- cd ..\OEPlugins\OpenEphysHDF5Lib\Build
146+ New-Item -Path 'C:\OEPlugins' -ItemType Directory -Force
147+ git clone --branch main https://github.com/open-ephys-plugins/OpenEphysHDF5Lib.git C:\OEPlugins\OpenEphysHDF5Lib
148+ cd C:\OEPlugins\OpenEphysHDF5Lib\Build
109149 cmake -G "Visual Studio 17 2022" -A x64 ..
150+ msbuild ALL_BUILD.vcxproj -p:Configuration=Release -p:Platform=x64 -m
151+ - name : Install OpenEphysHDF5Lib
152+ shell : powershell
153+ run : |
154+ cd C:\OEPlugins\OpenEphysHDF5Lib\Build
110155 msbuild INSTALL.vcxproj -p:Configuration=Release -p:Platform=x64
111- - name : Install nwb-format
156+ - name : Save OpenEphysHDF5Lib cache
157+ if : steps.cache-hdf5.outputs.cache-hit != 'true'
158+ uses : actions/cache@v4
159+ with :
160+ path : C:\OEPlugins\OpenEphysHDF5Lib
161+ key : plugin-hdf5-${{ steps.plugin-hashes.outputs.hdf5 }}
162+ - name : Restore nwb-format cache
163+ uses : actions/cache@v4
164+ id : cache-nwb
165+ with :
166+ path : C:\OEPlugins\nwb-format
167+ key : plugin-nwb-${{ steps.plugin-hashes.outputs.nwb }}
168+ restore-keys : |
169+ plugin-nwb-
170+ - name : Build nwb-format
171+ if : steps.cache-nwb.outputs.cache-hit != 'true'
112172 shell : powershell
113173 run : |
114- git clone --branch main https://github.com/open-ephys-plugins/nwb-format.git ..\OEPlugins\nwb-format
115- cd ..\OEPlugins\nwb-format\Build
174+ New-Item -Path 'C:\OEPlugins' -ItemType Directory -Force
175+ git clone --branch main https://github.com/open-ephys-plugins/nwb-format.git C:\OEPlugins\nwb-format
176+ cd C:\OEPlugins\nwb-format\Build
116177 cmake -G "Visual Studio 17 2022" -A x64 ..
178+ msbuild ALL_BUILD.vcxproj -p:Configuration=Release -p:Platform=x64 -m
179+ - name : Install nwb-format
180+ shell : powershell
181+ run : |
182+ cd C:\OEPlugins\nwb-format\Build
117183 msbuild INSTALL.vcxproj -p:Configuration=Release -p:Platform=x64
184+ - name : Save nwb-format cache
185+ if : steps.cache-nwb.outputs.cache-hit != 'true'
186+ uses : actions/cache@v4
187+ with :
188+ path : C:\OEPlugins\nwb-format
189+ key : plugin-nwb-${{ steps.plugin-hashes.outputs.nwb }}
118190 - name : Install test-suite
119191 shell : powershell
120192 run : |
0 commit comments