Skip to content

Commit

Permalink
Update GHA workflows for juce8
Browse files Browse the repository at this point in the history
  • Loading branch information
anjaldoshi committed Oct 16, 2024
1 parent 789111f commit da21c03
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 15 deletions.
19 changes: 16 additions & 3 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,27 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-18.04]
os: [ubuntu-20.04]

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: set env vars
run: |
if [ ${{github.ref_name}} == 'juce8' ]; then
echo "GUI_BRANCH=development-juce8" >> "$GITHUB_ENV"
elif [ ${{github.ref_name}} == 'testing-juce8' ]; then
echo "GUI_BRANCH=testing-juce8" >> "$GITHUB_ENV"
else
echo "Invalid branch : ${{github.ref_name}}"
exit 1
fi
- name: setup
run: |
sudo apt update
cd ../..
git clone https://github.com/open-ephys/plugin-GUI.git --branch main
git clone https://github.com/open-ephys/plugin-GUI.git --branch $GUI_BRANCH
sudo ./plugin-GUI/Resources/Scripts/install_linux_dependencies.sh
cd plugin-GUI/Build && cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release ..
- name: build
Expand All @@ -29,6 +41,7 @@ jobs:
# - name: test
# run: cd build && ctest
- name: deploy
if: github.ref == 'refs/heads/testing-juce8'
env:
artifactoryApiKey: ${{ secrets.artifactoryApiKey }}
build_dir: "Build"
Expand Down
49 changes: 45 additions & 4 deletions .github/workflows/mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,31 +13,72 @@ jobs:
os: [macos-latest]

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: set env vars
run: |
if [ ${{github.ref_name}} == 'juce8' ]; then
echo "GUI_BRANCH=development-juce8" >> "$GITHUB_ENV"
elif [ ${{github.ref_name}} == 'testing-juce8' ]; then
echo "GUI_BRANCH=testing-juce8" >> "$GITHUB_ENV"
else
echo "Invalid branch : ${{github.ref_name}}"
exit 1
fi
- name: setup
run: |
cd ../..
git clone https://github.com/open-ephys/plugin-GUI.git --branch main
cd plugin-GUI/Build && cmake -G "Xcode" -DCMAKE_BUILD_TYPE=Release ..
git clone https://github.com/open-ephys/plugin-GUI.git --branch $GUI_BRANCH
cd plugin-GUI/Build && cmake -G "Xcode" ..
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: build
run: |
cd Build
cmake -G "Xcode" -DCMAKE_BUILD_TYPE=Release ..
cmake -G "Xcode" ..
xcodebuild -configuration Release
# - name: test
# run: cd build && ctest
- name: deploy
if: github.ref == 'refs/heads/testing-juce8'
env:
artifactoryApiKey: ${{ secrets.artifactoryApiKey }}
MACOS_CERTIFICATE: ${{ secrets.BUILD_CERTIFICATE_BASE64 }}
MACOS_CERTIFICATE_PWD: ${{ secrets.BUILD_CERTIFICATE_PWD }}
MACOS_CERTIFICATE_NAME: ${{ secrets.BUILD_CERTIFICATE_NAME }}
MACOS_CI_KEYCHAIN_PWD: ${{ secrets.PROD_MACOS_CI_KEYCHAIN_PWD }}
PROD_MACOS_NOTARIZATION_APPLE_ID: ${{ secrets.PROD_MACOS_NOTARIZATION_APPLE_ID }}
PROD_MACOS_NOTARIZATION_TEAM_ID: ${{ secrets.PROD_MACOS_NOTARIZATION_TEAM_ID }}
PROD_MACOS_NOTARIZATION_PWD: ${{ secrets.PROD_MACOS_NOTARIZATION_PWD }}
build_dir: "Build/Release"
package: OpenEphysFFTW-mac
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 shared
cp -r $build_dir/*.dylib shared
cp -r libs/macos/bin/* shared
# Turn our base64-encoded certificate back to a regular .p12 file
echo $MACOS_CERTIFICATE | base64 --decode > certificate.p12
# We need to create a new keychain, otherwise using the certificate will prompt
# with a UI dialog asking for the certificate password, which we can't
# use in a headless CI environment
security create-keychain -p $MACOS_CI_KEYCHAIN_PWD build.keychain
security default-keychain -s build.keychain
security unlock-keychain -p $MACOS_CI_KEYCHAIN_PWD build.keychain
security import certificate.p12 -k build.keychain -P $MACOS_CERTIFICATE_PWD -T /usr/bin/codesign
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k $MACOS_CI_KEYCHAIN_PWD build.keychain
/usr/bin/codesign --force -s "$MACOS_CERTIFICATE_NAME" -v shared/libOpenEphysFFTW.dylib --deep --strict --timestamp --options=runtime
/usr/bin/codesign --force -s "$MACOS_CERTIFICATE_NAME" -v shared/libfftw3.3.6.9.dylib --deep --strict --timestamp --options=runtime
/usr/bin/codesign -dv --verbose=4 shared/libOpenEphysFFTW.dylib
zipfile=${package}_${new_plugin_ver}.zip
zip -r -X $zipfile shared
curl -H "X-JFrog-Art-Api:$artifactoryApiKey" -T $zipfile "https://openephys.jfrog.io/artifactory/OpenEphysFFTW-plugin/mac/$zipfile"
29 changes: 21 additions & 8 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,30 @@ jobs:
os: [windows-2019]

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: set env vars
run: |
if [ ${{github.ref_name}} == 'juce8' ]; then
echo "GUI_BRANCH=development-juce8" >> "$GITHUB_ENV"
echo "GUI_LIB_VERSION=v1.0.0-dev" >> "$GITHUB_ENV"
elif [ ${{github.ref_name}} == 'testing-juce8' ]; then
echo "GUI_BRANCH=testing-juce8" >> "$GITHUB_ENV"
echo "GUI_LIB_VERSION=v1.0.0-alpha" >> "$GITHUB_ENV"
else
echo "Invalid branch : ${{github.ref_name}}"
exit 1
fi
shell: bash
- name: setup
env:
repo: open-ephys-gui
package: "open-ephys-lib"
run: |
cd ../..
git clone https://github.com/open-ephys/plugin-GUI.git --branch main
git clone https://github.com/open-ephys/plugin-GUI.git --branch $GUI_BRANCH
cd plugin-GUI/Build
cmake -G "Visual Studio 16 2019" -A x64 ..
mkdir Release && cd Release
curl -L https://openephysgui.jfrog.io/artifactory/Libraries/open-ephys-lib-v0.6.0.zip --output open-ephys-lib.zip
curl -L https://openephysgui.jfrog.io/artifactory/Libraries/open-ephys-lib-$GUI_LIB_VERSION.zip --output open-ephys-lib.zip
unzip open-ephys-lib.zip
shell: bash
- name: configure
Expand All @@ -33,7 +45,7 @@ jobs:
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
run: |
msbuild Build/INSTALL.vcxproj -p:Configuration=Release -p:Platform=x64
Expand All @@ -42,6 +54,7 @@ jobs:
# - name: test
# run: cd build && ctest
- name: deploy
if: github.ref == 'refs/heads/testing-juce8'
env:
artifactoryApiKey: ${{ secrets.artifactoryApiKey }}
build_dir: "Build/Release"
Expand All @@ -54,7 +67,7 @@ jobs:
cp -v $build_dir/*.dll shared
if [ -d "libs" ]
then
cp -v libs/windows/bin/x64/*.dll shared
cp -v libs/windows/bin/*.dll shared
fi
zipfile=${package}_${new_plugin_ver}.zip
powershell Compress-Archive -Path "shared" -DestinationPath ${zipfile}
Expand Down

0 comments on commit da21c03

Please sign in to comment.