diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 7714beb02..9e4ff093c 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -45,16 +45,27 @@ jobs: curl -H $user_info -T $zipfile "https://openephysgui.jfrog.io/artifactory/1.0.0-dev/linux/$zipfile" shell: bash - name: deploy_preview - if: github.ref_type == 'tag' + if: github.ref_type == 'refs/heads/testing-juce8' env: artifactoryApiKey: ${{ secrets.artifactoryApiKey }} run: | gui_ver=$(git describe --tags $(git rev-list --tags --max-count=1)) + cd Build cp -r Release open-ephys cp ../LICENSE open-ephys - zipfile=open-ephys-${gui_ver}-linux.zip + zipfile=open-ephys-v1.0.0-alpha.1-linux.zip zip -r $zipfile open-ephys user_info="X-JFrog-Art-Api:$artifactoryApiKey" - curl -H $user_info -T $zipfile "https://openephysgui.jfrog.io/artifactory/1.0.0-pre/linux/$zipfile" + curl -H $user_info -T $zipfile "https://openephysgui.jfrog.io/artifactory/1.0.0-alpha/linux/$zipfile" + + cd ../Resources/Installers/Linux/Open-Ephys_Installer + mkdir -p usr/local/bin/open-ephys-gui + cp -r ../../../../Build/Release/* usr/local/bin/open-ephys-gui + cp ../../../Scripts/40-open-ephys.rules usr/local/bin/open-ephys-gui + cd .. + dpkg-deb --build Open-Ephys_Installer + installer=open-ephys-gui-v1.0.0-alpha.1.deb + mv -v Open-Ephys_Installer.deb $installer + curl -H $user_info -T $installer "https://openephysgui.jfrog.io/artifactory/1.0.0-alpha/linux/$installer" shell: bash diff --git a/.github/workflows/osx.yml b/.github/workflows/osx.yml index 92e7c42fd..b5f023b2b 100644 --- a/.github/workflows/osx.yml +++ b/.github/workflows/osx.yml @@ -98,15 +98,89 @@ jobs: user_info="X-JFrog-Art-Api:$artifactoryApiKey" curl -H $user_info -T $zipfile "https://openephysgui.jfrog.io/artifactory/1.0.0-dev/mac/$zipfile" - name: deploy_preview - if: github.ref_type == 'tag' + if: github.ref_type == '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 }} run: | - gui_ver=$(git describe --tags $(git rev-list --tags --max-count=1)) - zipfile=open-ephys-${gui_ver}-mac.zip cd Build/Release mkdir open-ephys mv open-ephys.app/ open-ephys - zip -r $zipfile open-ephys + + # 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 open-ephys/open-ephys.app --deep --strict --timestamp --options=runtime + + /usr/bin/codesign -dv --verbose=4 open-ephys/open-ephys.app + + # Store the notarization credentials so that we can prevent a UI password dialog from blocking the CI + + echo "Create keychain profile" + xcrun notarytool store-credentials "notarytool-profile" --apple-id "$PROD_MACOS_NOTARIZATION_APPLE_ID" --team-id "$PROD_MACOS_NOTARIZATION_TEAM_ID" --password "$PROD_MACOS_NOTARIZATION_PWD" + + # We can't notarize an app bundle directly, but we need to compress it as an archive. + # Therefore, we create a zip file containing our app bundle, so that we can send it to the + # notarization service + + echo "Creating temp notarization archive" + /usr/bin/ditto -c -k --sequesterRsrc --keepParent open-ephys/open-ephys.app open-ephys.zip + + # Here we send the notarization request to the Apple's Notarization service, waiting for the result. + # This typically takes a few seconds inside a CI environment, but it might take more depending on the App + # characteristics. Visit the Notarization docs for more information and strategies on how to optimize it if + # you're curious + + echo "Notarize app" + xcrun notarytool submit "open-ephys.zip" --keychain-profile "notarytool-profile" --wait + + # Finally, we need to "attach the staple" to our executable, which will allow our app to be + # validated by macOS even when an internet connection is not available. + echo "Attach staple" + rm -r open-ephys/* + /usr/bin/ditto -x -k open-ephys.zip open-ephys + xcrun stapler staple open-ephys/open-ephys.app + + zipfile=open-ephys-v1.0.0-alpha.1-mac.zip + /usr/bin/ditto -c -k --sequesterRsrc --keepParent open-ephys $zipfile user_info="X-JFrog-Art-Api:$artifactoryApiKey" - curl -H $user_info -T $zipfile "https://openephysgui.jfrog.io/artifactory/1.0.0-pre/mac/$zipfile" + curl -H $user_info -T $zipfile "https://openephysgui.jfrog.io/artifactory/1.0.0-alpha/mac/$zipfile" + + # Create a DMG installer + brew install create-dmg && create-dmg \ + --volname "Open-Ephys Installer" \ + --volicon "open-ephys/open-ephys.app/Contents/Resources/Icon.icns" \ + --background "open-ephys/open-ephys.app/Contents/Resources/dmg_background.png" \ + --window-pos 300 0 \ + --window-size 688 416 \ + --icon-size 128 \ + --icon "open-ephys.app" 200 190 \ + --hide-extension "Open-Ephys.app" \ + --app-drop-link 500 188 \ + "Open-Ephys-Installer.dmg" \ + "open-ephys/" + + installer=Open_Ephys_GUI_v1.0.0-alpha.1.dmg + mv -v Open-Ephys-Installer.dmg $installer + + echo "Notarize DMG" + xcrun notarytool submit "$installer" --keychain-profile "notarytool-profile" --wait + + echo "Attach staple to DMG" + xcrun stapler staple $installer + + curl -H $user_info -T $installer "https://openephysgui.jfrog.io/artifactory/1.0.0-alpha/mac/$installer" diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 2eaff7c5a..0082e5f17 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -18,19 +18,19 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [windows-2019] + os: [windows-latest] steps: - uses: actions/checkout@v1 - name: configure run: | cd Build - cmake -G "Visual Studio 16 2019" -A x64 .. + cmake -G "Visual Studio 17 2022" -A x64 .. - name: Add msbuild to PATH - uses: microsoft/setup-msbuild@v1.1 + uses: microsoft/setup-msbuild@v2 - name: build run: | - msbuild Build/ALL_BUILD.vcxproj -p:Configuration=Release -p:Platform=x64 -p:BuildInParallel=true + msbuild Build/ALL_BUILD.vcxproj -p:Configuration=Release -p:Platform=x64 -m # - name: test # run: cd build && ctest - name: deploy_dev @@ -50,7 +50,7 @@ jobs: curl -H $user_info -T $zipfile "https://openephysgui.jfrog.io/artifactory/1.0.0-dev/windows/$zipfile" shell: bash - name: deploy_preview - if: github.ref_type == 'tag' + if: github.ref_type == 'refs/heads/testing-juce8' env: artifactoryApiKey: ${{ secrets.artifactoryApiKey }} run: | @@ -60,8 +60,14 @@ jobs: cp -r ../Resources/DLLs/FTD3XXDriver_WHQLCertified_1.3.0.8_Installer.exe open-ephys cp ../LICENSE open-ephys gui_ver=$(git describe --tags $(git rev-list --tags --max-count=1)) - zipfile=open-ephys-${gui_ver}-windows.zip + zipfile=open-ephys-v1.0.0-alpha.1-windows.zip powershell Compress-Archive -Path "open-ephys" -DestinationPath ${zipfile} user_info="X-JFrog-Art-Api:$artifactoryApiKey" - curl -H $user_info -T $zipfile "https://openephysgui.jfrog.io/artifactory/1.0.0-pre/windows/$zipfile" + curl -H $user_info -T $zipfile "https://openephysgui.jfrog.io/artifactory/1.0.0-alpha/windows/$zipfile" + + cd ../Resources/Installers/Windows + iscc "windows_installer_script.iss" + installer=Install-Open-Ephys-GUI-v1.0.0-alpha.1.exe + mv Open-Ephys_Installer.exe $installer + curl -H $user_info -T $installer "https://openephysgui.jfrog.io/artifactory/1.0.0-alpha/windows/$installer" shell: bash diff --git a/Resources/Installers/Linux/Open-Ephys_Installer/DEBIAN/control b/Resources/Installers/Linux/Open-Ephys_Installer/DEBIAN/control index 5423a5b60..d5776b222 100644 --- a/Resources/Installers/Linux/Open-Ephys_Installer/DEBIAN/control +++ b/Resources/Installers/Linux/Open-Ephys_Installer/DEBIAN/control @@ -1,5 +1,5 @@ Package: open-ephys -Version: 1.0.0-dev +Version: 1.0.0-alpha.1 Architecture: amd64 Installed-Size: 18644 Section: science diff --git a/Resources/Installers/Windows/windows_installer_script.iss b/Resources/Installers/Windows/windows_installer_script.iss index cd959c7ea..7459af9ad 100644 --- a/Resources/Installers/Windows/windows_installer_script.iss +++ b/Resources/Installers/Windows/windows_installer_script.iss @@ -1,7 +1,7 @@ [Setup] AppName=Open Ephys -AppVersion=1.0.0-dev -AppVerName=Open Ephys 1.0.0-dev +AppVersion=1.0.0-apha.1 +AppVerName=Open Ephys 1.0.0-alpha.1 AppCopyright=Copyright (C) 2010-2024, Open Ephys & Contributors AppPublisher=open-ephys.org AppPublisherURL=https://open-ephys.org/gui