Skip to content

Commit 45e44a4

Browse files
committed
Add GHA workflow for Linux
1 parent 8cdd773 commit 45e44a4

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

.github/workflows/linux.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: linux
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
8+
build-linux:
9+
10+
runs-on: ${{ matrix.os }}
11+
strategy:
12+
matrix:
13+
os: [ubuntu-20.04]
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+
run: |
26+
sudo apt update
27+
cd ../..
28+
git clone https://github.com/open-ephys/plugin-GUI.git --branch main
29+
sudo ./plugin-GUI/Resources/Scripts/install_linux_dependencies.sh
30+
cd plugin-GUI/Build && cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release ..
31+
- name: build
32+
run: |
33+
conda env list
34+
cd Build
35+
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DPython_ROOT_DIR="$CONDA/envs/oe-python-plugin" ..
36+
make
37+
# - name: test
38+
# run: cd build && ctest
39+
- name: deploy
40+
if: github.ref == 'refs/heads/main'
41+
env:
42+
artifactoryApiKey: ${{ secrets.artifactoryApiKey }}
43+
build_dir: "Build"
44+
package: PythonProcessor-linux
45+
run: |
46+
plugin_api=$(grep -rnw ../../plugin-GUI/Source -e '#define PLUGIN_API_VER' | grep -Eo "[0-9]*" | tail -1)
47+
tag=$(git describe --tags $(git rev-list --tags --max-count=1))
48+
new_plugin_ver=$tag-API$plugin_api
49+
mkdir plugins
50+
cp -r $build_dir/*.so plugins
51+
zipfile=${package}_${new_plugin_ver}.zip
52+
zip -r -X $zipfile plugins
53+
curl -H "X-JFrog-Art-Api:$artifactoryApiKey" -T $zipfile "https://openephys.jfrog.io/artifactory/PythonProcessor-plugin/linux/$zipfile"

0 commit comments

Comments
 (0)