From 331b67e7398ed9fa0a9c886415a222c2beeb3536 Mon Sep 17 00:00:00 2001 From: bparks13 Date: Thu, 10 Oct 2024 11:06:34 -0400 Subject: [PATCH] Update actions files --- .github/workflows/linux.yml | 28 ++++++++++++++-------------- .github/workflows/mac.yml | 26 +++++++++++++------------- .github/workflows/windows.yml | 33 +++++++++++++++++---------------- 3 files changed, 44 insertions(+), 43 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 997fabe..513b816 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -2,18 +2,22 @@ name: linux on: push: + branches: [main] + pull_request: + +env: + artifactoryApiKey: ${{ secrets.artifactoryApiKey }} + build_dir: "Build" + package: EphysSocket-linux jobs: - build-linux: - - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-20.04] + runs-on: [ubuntu-20.04] steps: - - uses: actions/checkout@v1 + - name: Checkout + uses: actions/checkout@v4 + - name: setup run: | sudo apt update @@ -21,20 +25,16 @@ jobs: git clone https://github.com/open-ephys/plugin-GUI.git --branch main sudo ./plugin-GUI/Resources/Scripts/install_linux_dependencies.sh cd plugin-GUI/Build && cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release .. + - name: build id: build run: | cd Build cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release .. make -# - name: test -# run: cd build && ctest + - name: deploy if: github.ref == 'refs/heads/main' && steps.build.outcome == 'success' - env: - artifactoryApiKey: ${{ secrets.artifactoryApiKey }} - build_dir: "Build" - package: EphysSocket-linux run: | plugin_api=$(grep -rnw ../../plugin-GUI/Source -e '#define PLUGIN_API_VER' | grep -Eo "[0-9]*" | tail -1) tag=$(grep -w Source/OpenEphysLib.cpp -e 'info->libVersion' | grep -Eo "[0-9]+.[0-9]+.[0-9]+") @@ -43,4 +43,4 @@ jobs: cp -r $build_dir/*.so plugins zipfile=${package}_${new_plugin_ver}.zip zip -r -X $zipfile plugins - curl -H "X-JFrog-Art-Api:$artifactoryApiKey" -T $zipfile "https://openephys.jfrog.io/artifactory/EphysSocket-plugin/linux/$zipfile" \ No newline at end of file + curl -H "X-JFrog-Art-Api:$artifactoryApiKey" -T $zipfile "https://openephys.jfrog.io/artifactory/EphysSocket-plugin/linux/$zipfile" diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml index 6bcfb0a..2a72805 100644 --- a/.github/workflows/mac.yml +++ b/.github/workflows/mac.yml @@ -2,37 +2,37 @@ name: mac on: push: + branches: [main] + pull_request: -jobs: +env: + artifactoryApiKey: ${{ secrets.artifactoryApiKey }} + build_dir: "Build/Release" + package: EphysSocket-mac +jobs: build-mac: - - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [macos-latest] + runs-on: [macos-latest] steps: - - uses: actions/checkout@v1 + - name: Checkout + uses: actions/checkout@v4 + - name: setup run: | cd ../.. git clone https://github.com/open-ephys/plugin-GUI.git --branch main cd plugin-GUI/Build && cmake -G "Xcode" .. + - name: build id: build run: | cd Build cmake -G "Xcode" .. xcodebuild -configuration Release -# - name: test -# run: cd build && ctest + - name: deploy if: github.ref == 'refs/heads/main' && steps.build.outcome == 'success' - env: - artifactoryApiKey: ${{ secrets.artifactoryApiKey }} - build_dir: "Build/Release" - package: EphysSocket-mac run: | plugin_api=$(grep -rnw ../../plugin-GUI/Source -e '#define PLUGIN_API_VER' | grep -Eo "[0-9]" | tail -1) tag=$(grep -w Source/OpenEphysLib.cpp -e 'info->libVersion' | grep -Eo "[0-9]+.[0-9]+.[0-9]+") diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 1b6c6cf..61479df 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -2,18 +2,22 @@ name: Windows on: push: + branches: [main] + pull_request: -jobs: +env: + artifactoryApiKey: ${{ secrets.artifactoryApiKey }} + build_dir: "Build/Release" + package: EphysSocket-windows +jobs: build-windows: - - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [windows-2019] + runs-on: [windows-2019] steps: - - uses: actions/checkout@v1 + - name: Checkout + uses: actions/checkout@v4 + - name: setup env: repo: open-ephys-gui @@ -27,28 +31,25 @@ jobs: curl -L https://openephysgui.jfrog.io/artifactory/Libraries/open-ephys-lib-v0.6.0.zip --output open-ephys-lib.zip unzip open-ephys-lib.zip shell: bash + - name: configure run: | cd Build cmake -G "Visual Studio 16 2019" -A x64 .. shell: bash + - name: Add msbuild to PATH - uses: microsoft/setup-msbuild@v1.0.2 + uses: microsoft/setup-msbuild@v2 + - name: build-plugin id: build run: | cd Build msbuild 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 if: github.ref == 'refs/heads/main' && steps.build.outcome == 'success' - env: - artifactoryApiKey: ${{ secrets.artifactoryApiKey }} - build_dir: "Build/Release" - package: EphysSocket-windows run: | plugin_api=$(grep -rnw ../../plugin-GUI/Source -e '#define PLUGIN_API_VER' | grep -Eo "[0-9]*" | tail -1) tag=$(grep -w Source/OpenEphysLib.cpp -e 'info->libVersion' | grep -Eo "[0-9]+.[0-9]+.[0-9]+") @@ -58,4 +59,4 @@ jobs: zipfile=${package}_${new_plugin_ver}.zip powershell Compress-Archive -Path "plugins" -DestinationPath ${zipfile} curl -H "X-JFrog-Art-Api:$artifactoryApiKey" -T $zipfile "https://openephys.jfrog.io/artifactory/EphysSocket-plugin/windows/$zipfile" - shell: bash \ No newline at end of file + shell: bash