1+ name : Windows
2+
3+ on :
4+ push :
5+
6+ jobs :
7+
8+ build-windows :
9+
10+ runs-on : ${{ matrix.os }}
11+ strategy :
12+ matrix :
13+ os : [windows-2019]
14+
15+ steps :
16+ - uses : actions/checkout@v3
17+ with :
18+ submodules : true
19+ - uses : conda-incubator/setup-miniconda@v2
20+ with :
21+ activate-environment : oe-python-plugin
22+ python-version : " 3.10"
23+ auto-activate-base : false
24+ - name : setup
25+ env :
26+ repo : open-ephys-gui
27+ package : " open-ephys-lib"
28+ run : |
29+ cd ../..
30+ git clone https://github.com/open-ephys/plugin-GUI.git --branch main
31+ cd plugin-GUI/Build
32+ cmake -G "Visual Studio 16 2019" -A x64 ..
33+ mkdir Release && cd Release
34+ curl -L https://openephysgui.jfrog.io/artifactory/Libraries/open-ephys-lib-v0.6.0.zip --output open-ephys-lib.zip
35+ unzip open-ephys-lib.zip
36+ shell : bash
37+ - name : configure
38+ run : |
39+ cd Build
40+ cmake -G "Visual Studio 16 2019" -A x64 -DPython_ROOT_DIR="$CONDA/envs/oe-python-plugin" -DCOPY_PYTHON_DL=ON ..
41+ shell : bash
42+ - name : Add msbuild to PATH
43+ uses : microsoft/setup-msbuild@v1.1
44+ - name : build-plugin
45+ run : |
46+ cd Build
47+ msbuild INSTALL.vcxproj -p:Configuration=Release -p:Platform=x64
48+ shell : cmd
49+ # TODO: Perform some basic testing before publishing...
50+ # - name: test
51+ # run: cd build && ctest
52+ - name : package
53+ env :
54+ build_dir : " Build/Release"
55+ package : PythonProcessor-windows
56+ run : |
57+ plugin_api=$(grep -rnw ../../plugin-GUI/Source -e '#define PLUGIN_API_VER' | grep -Eo "[0-9]*" | tail -1)
58+ tag=$(grep -w Source/OpenEphysLib.cpp -e 'info->libVersion' | grep -Eo "[0-9]+.[0-9]+.[0-9]+")
59+ new_plugin_ver=$tag-API$plugin_api
60+ mkdir plugins
61+ cp $build_dir/*.dll plugins
62+ echo "zipfile=${package}_${new_plugin_ver}.zip" >> $GITHUB_ENV
63+ powershell Compress-Archive -Path "plugins" -DestinationPath ${{ env.zipfile }}
64+ powershell Compress-Archive -U -Path "$build_dir/shared" -DestinationPath ${{ env.zipfile }}
65+ shell : bash
66+ - uses : actions/upload-artifact@v3
67+ with :
68+ name : ${{ env.zipfile }}
69+ path : ${{ env.zipfile }}
70+ - name : deploy
71+ if : github.ref == 'refs/heads/main'
72+ env :
73+ artifactoryApiKey : ${{ secrets.artifactoryApiKey }}
74+ run : |
75+ curl -H "X-JFrog-Art-Api:$artifactoryApiKey" -T ${{ env.zipfile }} "https://openephys.jfrog.io/artifactory/PythonProcessor-plugin/windows/${{ env.zipfile }}"
76+ shell : bash
0 commit comments