Skip to content

Commit

Permalink
[ci] Continue refactors
Browse files Browse the repository at this point in the history
  • Loading branch information
jcelerier committed Apr 6, 2024
1 parent a7c3fff commit 1982419
Show file tree
Hide file tree
Showing 13 changed files with 42 additions and 118 deletions.
2 changes: 1 addition & 1 deletion .github/actions/latest-rpi-toolchain/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ runs:
run: |
sudo apt-get update -yqq
sudo apt-get upgrade -yqq
sudo apt-get install -yqq build-essential g++ ninja-build libavahi-client-dev wget
sudo apt-get install -yqq build-essential ninja-build libavahi-client-dev wget
wget -nv https://github.com/tttapa/docker-arm-cross-toolchain/releases/download/0.1.2/x-tools-aarch64-rpi3-linux-gnu.tar.xz
tar xaf x-tools-aarch64-rpi3-linux-gnu.tar.xz
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/latest-ubuntu-toolchain/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ runs:
sudo apt-get install -yqq kitware-archive-keyring
sudo rm /etc/apt/trusted.gpg.d/kitware.gpg
echo 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main' | sudo tee /etc/apt/sources.list.d/llvm.list
echo 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main' | sudo tee /etc/apt/sources.list.d/llvm.list
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 1397BC53640DB551 15CF4D18AF4F7421 42D5A192B819C5DA
sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/test
sudo apt-get update -qq
sudo apt purge --auto-remove cmake
sudo apt-get install -yqq \
build-essential g++ binutils ninja-build cmake \
clang-15 lld-15 \
clang-18 lld-18 \
qt6-base-dev qt6-base-dev-tools qt6-base-private-dev \
qt6-declarative-dev qt6-declarative-dev-tools qt6-declarative-private-dev \
libqt6websockets6-dev libqt6websockets6-dev \
Expand Down
43 changes: 6 additions & 37 deletions .github/actions/mac-codesign/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ inputs:
description: 'Path containing files to sign'
required: true
default: ''
output-name:
description: 'Output filename'
required: true
default: 'output.zip'
MAC_CERT_B64:
description: 'Certificate encoded as base64'
required: true
Expand All @@ -23,45 +27,10 @@ runs:
steps:
- name: Code Signing
shell: bash

env:
MAC_CERT_B64: ${{ inputs.MAC_CERT_B64 }}
MAC_CERT_PASSWORD: ${{ inputs.MAC_CERT_PASSWORD }}
MAC_ALTOOL_PASSWORD: ${{ inputs.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
find ${{ inputs.path-to-sign }} \
\( -name "*.dylib" -o -name "*.a" -o -name "*.so" -o -name "*.mxo" -o -name "ossia.d_*" \) \
-exec echo Signing {} + \
-exec codesign --force --timestamp --sign "ossia.io" {} +
ditto -c -k --sequesterRsrc --keepParent ${{ inputs.path-to-sign }} codesign.zip
xcrun notarytool submit "codesign.zip" \
--team-id "GRW9MHZ724" \
--apple-id "[email protected]" \
--password "$MAC_ALTOOL_PASSWORD" \
--progress \
--wait
rm codesign.zip
)
source "${GITHUB_WORKSPACE}/ci/codesign_functions.sh"
release_macos_folder "${{ inputs.path-to-sign }}" "$PWD/${{ inputs.output-name }}"
5 changes: 1 addition & 4 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,13 @@ jobs:
- name: Install Dependencies
run: |
sudo apt update -qq
sudo apt install -qq -y build-essential gcc-11 g++-11 ninja-build wget
sudo apt install -qq -y build-essential ninja-build wget
wget https://github.com/jcelerier/cninja/releases/download/v3.7.6/cninja-v3.7.6-Linux.tar.gz
tar xaf cninja-*-Linux.tar.gz
sudo mv cninja "/usr/bin/"
rm *.tar.gz
- name: Build
env:
CC: gcc-11
CXX: g++-11
run: |
echo $(variables.gitTag)
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,11 @@ jobs:
run: |
sudo gem install coveralls-lcov
sudo apt-get install -yqq python3 python3-pip lcov gcc-11 g++-11 gcovr
sudo apt-get install -yqq python3 python3-pip lcov build-essential gcovr
sudo pip3 install --upgrade wheel setuptools
sudo pip3 install git+https://github.com/rpgillespie6/fastcov.git
- name: Build
env:
CC: gcc-11
CXX: g++-11
run: |
QT_ENV_SCRIPT=$(find /opt -name 'qt*-env.sh')
set +e
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/libossia.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
-DOSSIA_TESTING=1 \
-DOSSIA_CI=1 \
-DCMAKE_OSX_ARCHITECTURES="x86_64;arm64"
cmake --build build
cmake --build build --target test
cmake --build build --target install
Expand All @@ -52,7 +53,6 @@ jobs:
fail-fast: false
steps:
- uses: actions/checkout@v4

- uses: ./.github/actions/latest-msvc-toolchain

- name : Build
Expand Down Expand Up @@ -81,17 +81,11 @@ jobs:
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Install Dependencies
run: |
sudo apt-get update -yqq
sudo apt-get upgrade -yqq
sudo apt-get install -yqq build-essential g++-11 gcc-11 ninja-build libavahi-client-dev
- uses: ./.github/actions/latest-ubuntu-toolchain
- name: Build
env:
STATIC: ${{ matrix.static }}
BUILD_TYPE: ${{ matrix.build_type }}
CC: gcc-11
CXX: g++-11

run: |
cmake -B build -S ${GITHUB_WORKSPACE} -GNinja \
Expand Down
20 changes: 6 additions & 14 deletions .github/workflows/ossia-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,8 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Install Build Dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -yqq build-essential gcc-11 g++-11 ninja-build libavahi-client-dev
- uses: ./.github/actions/latest-ubuntu-toolchain
- name: Build
env:
CC: gcc-11
CXX: g++-11
run: |
cmake -B build -S ${GITHUB_WORKSPACE} -GNinja \
-DOSSIA_CPP_ONLY=1 \
Expand All @@ -35,6 +29,7 @@ jobs:
cpp-mac:
name: CPP (macOS)
runs-on: macos-14
environment: 'Apple Certificate'
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/latest-mac-toolchain
Expand All @@ -43,22 +38,19 @@ jobs:
cmake -B build -S ${GITHUB_WORKSPACE} -GNinja -DOSSIA_CPP_ONLY=1 -DOSSIA_CI=1 -DCMAKE_INSTALL_PREFIX=install -DCMAKE_BUILD_TYPE=Release
cmake --build build
cmake --build build --target install
- name: Code Signing
shell: bash
env:
- uses: ./.github/actions/mac-codesign
with:
path-to-sign: install
MAC_CERT_B64: ${{ secrets.MAC_CERT_B64 }}
MAC_CERT_PASSWORD: ${{ secrets.MAC_CERT_PASSWORD }}
MAC_ALTOOL_PASSWORD: ${{ secrets.MAC_ALTOOL_PASSWORD }}
run: |
source ${GITHUB_WORKSPACE}/ci/codesign_functions.sh
release_macos_folder "${GITHUB_WORKSPACE}/install" "$PWD/ossia-cpp-osx.zip" "io.ossia.ossia-cpp"

- name: Archive Package
uses: actions/upload-artifact@v2
with:
name: ossia-cpp
path: install
environment: 'Apple Certificate'

cpp-windows:
name: CPP (Windows)
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/ossia-pd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Dependencies
run: |
sudo apt-get update -yqq
sudo apt-get upgrade -yqq
sudo apt-get install -yqq build-essential ninja-build libavahi-client-dev
- uses: ./.github/actions/latest-ubuntu-toolchain
- name: Build
run: |
cmake -B build -S ${GITHUB_WORKSPACE} -GNinja -DOSSIA_CI=1 -DCMAKE_BUILD_TYPE=Release -DOSSIA_PD_ONLY=1 -DCMAKE_INSTALL_PREFIX=install
Expand Down
17 changes: 8 additions & 9 deletions .github/workflows/ossia-purrdata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- 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
- uses: ./.github/actions/latest-ubuntu-toolchain
- 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 -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
Expand Down
9 changes: 1 addition & 8 deletions .github/workflows/ossia-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- 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
env:
CC: gcc-11
CXX: g++-11
- uses: ./.github/actions/latest-ubuntu-toolchain
- name: Build ossia-python
run: |
cmake -B build -S ${GITHUB_WORKSPACE} -G Ninja -DOSSIA_PYTHON_ONLY=1 -DOSSIA_CI=1
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/ossia-qml.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,8 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Install Build Dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -yqq build-essential gcc g++ ninja-build libavahi-client-dev
- uses: ./.github/actions/latest-ubuntu-toolchain
- name: Build
env:
CC: gcc
CXX: g++
run: |
cmake -B build -S ${GITHUB_WORKSPACE} -GNinja \
-DOSSIA_CI=1 \
Expand All @@ -34,6 +28,7 @@ jobs:
qml-mac:
name: QML (macOS)
runs-on: macos-14
environment: 'Apple Certificate'
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/latest-mac-toolchain
Expand Down Expand Up @@ -65,7 +60,6 @@ jobs:
with:
name: ossia-qml
path: install
environment: 'Apple Certificate'

qml-windows:
name: QML (Windows)
Expand Down
12 changes: 3 additions & 9 deletions .github/workflows/ossia-unity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,8 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Install Build Dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -yqq build-essential gcc-11 g++-11 ninja-build libavahi-client-dev
- uses: ./.github/actions/latest-ubuntu-toolchain
- name: Build
env:
CC: gcc-11
CXX: g++-11
run: |
cmake -B build -S ${GITHUB_WORKSPACE} -GNinja -DOSSIA_UNITY3D_ONLY=1 -DOSSIA_CI=1 -DCMAKE_INSTALL_PREFIX=install -DCMAKE_BUILD_TYPE=Release
cmake --build build
Expand All @@ -30,6 +24,7 @@ jobs:
Unity3DMac:
name: Unity3D (macOS)
runs-on: macos-14
environment: 'Apple Certificate'
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/latest-mac-toolchain
Expand Down Expand Up @@ -86,11 +81,11 @@ jobs:
with:
name: ossia-unity
path: install
environment: 'Apple Certificate'

Unity3DIOs:
name: Unity3D (iOS)
runs-on: macos-14
environment: 'Apple Certificate'
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/latest-mac-toolchain
Expand Down Expand Up @@ -157,7 +152,6 @@ jobs:
with:
name: ossia-unity-ios
path: install
environment: 'Apple Certificate'

Unity3DWin32:
name: Unity3D (Win32)
Expand Down
17 changes: 8 additions & 9 deletions ci/codesign_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,24 +29,23 @@ codesign_osx() {
notarize_osx() {
set +x
local zipfile=${1}
local bundle_id=${2}
xcrun altool --notarize-app \
-t osx \
-f "$zipfile" \
--primary-bundle-id "$bundle_id" \
-u [email protected] \
-p "@env:MAC_ALTOOL_PASSWORD"
xcrun notarytool \
submit "$zipfile" \
--team-id "GRW9MHZ724" \
--apple-id "[email protected]" \
--password "$MAC_ALTOOL_PASSWORD" \
--progress \
--wait
}

release_macos_folder() {
local folder="${1}"
local zipfile="${2}"
local bundle_id="${3}"

codesign_osx "$folder"
(
cd "$folder"/.. || return
ditto -c -k --sequesterRsrc --keepParent $(basename "$folder") "${ARTIFACTS_DIR}/$zipfile"
notarize_osx "${ARTIFACTS_DIR}/$zipfile" "$bundle_id"
notarize_osx "${ARTIFACTS_DIR}/$zipfile"
)
}

0 comments on commit 1982419

Please sign in to comment.