-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add and trigger Github Actions workflows
- Loading branch information
1 parent
da3bd1f
commit 76fe0c5
Showing
2 changed files
with
128 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: linux | ||
|
||
on: | ||
push: | ||
|
||
jobs: | ||
|
||
build-linux: | ||
|
||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: setup | ||
run: | | ||
sudo apt update | ||
export CC=gcc-8 | ||
export CXX=g++-8 | ||
cd ../.. | ||
git clone https://github.com/open-ephys/plugin-GUI.git | ||
cd plugin-GUI/Build && cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release .. | ||
cd ../Resources/Scripts | ||
sudo ./install_linux_dependencies.sh | ||
- name: build | ||
run: | | ||
cd Build | ||
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release .. | ||
make | ||
# - name: test | ||
# run: cd build && ctest | ||
- name: deploy | ||
env: | ||
bintrayUser: ${{ secrets.bintrayUsername }} | ||
bintrayApiKey: ${{ secrets.bintrayApiKey }} | ||
build_dir: "Build" | ||
repo: ${{ github.event.repository.name }} | ||
package: ${{ github.event.repository.name }}-linux | ||
run: | | ||
plugin_api=$(grep -rnw ../../plugin-GUI/Source -e '#define PLUGIN_API_VER' | grep -Eo "[0-9]*" | tail -1) | ||
tag=$(git describe --tags $(git rev-list --tags --max-count=1)) | ||
new_plugin_ver=$tag-API$plugin_api | ||
mkdir plugins | ||
cp -r $build_dir/*.so plugins | ||
mkdir shared | ||
cp -r libs/linux/bin/* shared | ||
zipfile=${package}_${new_plugin_ver}.zip | ||
zip -r -X $zipfile plugins shared | ||
user_info="$bintrayUser:$bintrayApiKey" | ||
curl -T $zipfile --user $user_info https://api.bintray.com/content/$bintrayUser/$repo/$package/$new_plugin_ver/$zipfile | ||
curl -X POST --user $user_info https://api.bintray.com/content/$bintrayUser/$repo/$package/$new_plugin_ver/publish |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
name: Windows | ||
|
||
on: | ||
push: | ||
|
||
jobs: | ||
|
||
build-windows: | ||
|
||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [windows-latest] | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: setup | ||
env: | ||
repo: open-ephys-gui | ||
package: "open-ephys-lib" | ||
run: | | ||
cd ../.. | ||
git clone https://github.com/open-ephys/plugin-GUI.git | ||
cd plugin-GUI/Build | ||
cmake -G "Visual Studio 16 2019" -A x64 .. | ||
mkdir Release && cd Release | ||
lib_version=$(curl -s -X GET https://api.bintray.com/packages/open-ephys-gui/Libraries/open-ephys-lib-for-windows/versions/_latest | jq '.name') | ||
lib_version="${lib_version:1:${#lib_version}-2}" | ||
curl -L https://dl.bintray.com/open-ephys-gui/Libraries/open-ephys-lib-for-win-${lib_version}.zip --output open-ephys-lib-for-win-${lib_version}.zip | ||
unzip open-ephys-lib-for-win-${lib_version}.zip | ||
shell: bash | ||
- name: configure | ||
run: | | ||
cd Build | ||
cmake -G "Visual Studio 16 2019" -A x64 .. | ||
shell: bash | ||
- name: Setup MSBuild.exe | ||
uses: warrenbuckley/Setup-MSBuild@v1 | ||
- name: build | ||
run: | | ||
msbuild Build/INSTALL.vcxproj -p:Configuration=Release -p:Platform=x64 | ||
shell: cmd | ||
|
||
# TODO: Perform some basic testing before publishing... | ||
# - name: test | ||
# run: cd build && ctest | ||
- name: deploy | ||
env: | ||
bintrayUser: ${{ secrets.bintrayUsername }} | ||
bintrayApiKey: ${{ secrets.bintrayApiKey }} | ||
build_dir: "Build/Release" | ||
repo: ${{ github.event.repository.name }} | ||
package: ${{ github.event.repository.name }}-windows | ||
run: | | ||
plugin_api=$(grep -rnw ../../plugin-GUI/Source -e '#define PLUGIN_API_VER' | grep -Eo "[0-9]*" | tail -1) | ||
tag=$(git describe --tags $(git rev-list --tags --max-count=1)) | ||
new_plugin_ver=$tag-API$plugin_api | ||
mkdir plugins | ||
cp -v $build_dir/*.dll plugins | ||
if [ -d "libs" ] | ||
then | ||
mkdir shared | ||
cp -v libs/windows/bin/x64/*.dll shared | ||
fi | ||
zipfile=${package}_${new_plugin_ver}.zip | ||
powershell Compress-Archive -Path "plugins" -DestinationPath ${zipfile} | ||
if [ -d "shared" ] | ||
then | ||
powershell Compress-Archive -U -Path "shared" -DestinationPath ${zipfile} | ||
fi | ||
user_info="$bintrayUser:$bintrayApiKey" | ||
curl -T $zipfile --user $user_info https://api.bintray.com/content/$bintrayUser/$repo/$package/$new_plugin_ver/$zipfile | ||
curl -X POST --user $user_info https://api.bintray.com/content/$bintrayUser/$repo/$package/$new_plugin_ver/publish | ||
shell: bash |