[tests] update scenario tests with changes #496
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
name: ossia-purrdata | |
on: push | |
jobs: | |
build-macos: | |
runs-on: macos-latest | |
environment: 'Apple Certificate' | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Dependencies | |
run: brew install ninja | |
- name: Build | |
run: | | |
cmake -B build -S ${GITHUB_WORKSPACE} \ | |
-GNinja \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-DOSSIA_CI=1 \ | |
-DOSSIA_PD_ONLY=1 \ | |
-DOSSIA_PURR_DATA=1 \ | |
-DCMAKE_INSTALL_PREFIX=install \ | |
-DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" | |
cmake --build build | |
cmake --build build --target install | |
- name: Code Signing | |
shell: bash | |
env: | |
MAC_CERT_B64: ${{ secrets.MAC_CERT_B64 }} | |
MAC_CERT_PASSWORD: ${{ secrets.MAC_CERT_PASSWORD }} | |
MAC_ALTOOL_PASSWORD: ${{ secrets.MAC_ALTOOL_PASSWORD }} | |
run: | | |
# Setup codesigning | |
# Thanks https://www.update.rocks/blog/osx-signing-with-travis/ | |
( | |
set +x | |
KEY_CHAIN=build.keychain | |
echo "$MAC_CERT_B64" | base64 --decode > ossia-cert.p12 | |
security create-keychain -p azure $KEY_CHAIN | |
security default-keychain -s $KEY_CHAIN | |
security unlock-keychain -p azure $KEY_CHAIN | |
security import ossia-cert.p12 -k $KEY_CHAIN -P "$MAC_CERT_PASSWORD" -T /usr/bin/codesign; | |
security set-key-partition-list -S apple-tool:,apple: -s -k azure $KEY_CHAIN | |
rm -rf *.p12 | |
) | |
security unlock-keychain -p azure build.keychain | |
( | |
cd install/ossia-pd-package | |
codesign --force --timestamp --sign "ossia.io" ossia/ossia.d_* | |
zip ossia-pd.zip ossia/ossia.d_* | |
xcrun altool \ | |
--notarize-app \ | |
-t osx \ | |
-f "ossia-pd.zip" \ | |
--primary-bundle-id "io.ossia.ossia-pd" \ | |
-u [email protected] -p "@env:MAC_ALTOOL_PASSWORD" | |
rm ossia-pd.zip | |
) | |
- name: Archive Package | |
uses: actions/upload-artifact@v2 | |
with: | |
name: ossia-pd | |
path: install/ossia-pd-package | |
build-windows: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: install deps | |
run: cinst -y ninja | |
- name : Build | |
shell: cmd | |
run: | | |
call ci\msvc.bat | |
cmake -B build -S %GITHUB_WORKSPACE% -GNinja -DOSSIA_PD_ONLY=1 -DOSSIA_PURR_DATA=1 -DOSSIA_CI=1 -DCMAKE_SYSTEM_VERSION=7 -DCMAKE_INSTALL_PREFIX=install -DCMAKE_BUILD_TYPE=Release | |
cmake --build build | |
cmake --install build | |
- name: Archive Package | |
uses: actions/upload-artifact@v2 | |
with: | |
name: ossia-pd | |
path: install/ossia-pd-package/ossia | |
build-linux: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Dependencies | |
run: | | |
sudo apt-get update -yqq | |
sudo apt-get upgrade -yqq | |
sudo apt-get install -yqq build-essential gcc-11 g++-11 ninja-build libavahi-client-dev | |
- name: Build | |
env: | |
CC: gcc-11 | |
CXX: g++-11 | |
run: | | |
cmake -B build -S ${GITHUB_WORKSPACE} -GNinja -DOSSIA_PURR_DATA=1 -DOSSIA_CI=1 -DCMAKE_BUILD_TYPE=Release -DOSSIA_PD_ONLY=1 -DCMAKE_INSTALL_PREFIX=install | |
cmake --build build | |
cmake --build build --target install | |
- name: Archive Package | |
uses: actions/upload-artifact@v2 | |
with: | |
name: ossia-pd | |
path: install/ossia-pd-package/ossia | |
build-rpi: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: ./.github/actions/latest-rpi-toolchain | |
- name: Build | |
run: | | |
export CTEST_OUTPUT_ON_FAILURE=1 | |
export RPI_ROOT_PATH=/opt/cross-pi-gcc | |
export PKG_CONFIG_SYSROOT_DIR=$RPI_ROOT_PATH | |
export PKG_CONFIG_LIBDIR=${RPI_ROOT_PATH}/usr/lib/pkgconfig:${RPI_ROOT_PATH}/usr/share/pkgconfig:${RPI_ROOT_PATH}/usr/lib/arm-linux-gnueabihf/pkgconfig/ | |
export PATH=/opt/cross-pi-gcc/bin:${PATH} | |
export LD_LIBRARY_PATH=/opt/cross-pi-gcc/lib:${LD_LIBRARY_PATH} | |
cmake -B build -S ${GITHUB_WORKSPACE} -DCMAKE_TOOLCHAIN_FILE="${GITHUB_WORKSPACE}/cmake/toolchain/arm-linux-gnueabihf.cmake" \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-DCMAKE_INSTALL_PREFIX=install \ | |
-DOSSIA_CI=1 \ | |
-DOSSIA_PD_ONLY=1 \ | |
-DOSSIA_PURR_DATA=1 \ | |
.. | |
cmake --build build | |
cmake --build build --target install | |
- name: Archive Package | |
uses: actions/upload-artifact@v2 | |
with: | |
name: ossia-pd | |
path: install/ossia-pd-package/ossia | |
upload_release: | |
runs-on: ubuntu-latest | |
needs: [ build-macos, build-windows, build-rpi, build-linux ] | |
steps: | |
- uses: actions/download-artifact@v2 | |
with: | |
name: ossia-pd | |
path: ossia | |
- name: Rezip | |
shell: bash | |
run: | | |
SHORT=${GITHUB_REF:11} # remove the 'refs/tags/' prefix | |
SLUG=${SHORT//\//_} # replace '/' with '_' | |
zip -r ossia-pd-${SLUG}.zip ossia | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: ossia-pd*.zip |