Skip to content

Commit

Permalink
[ci] Cleanup CI scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
jcelerier committed Apr 5, 2024
1 parent 12dc902 commit a7c3fff
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 159 deletions.
2 changes: 1 addition & 1 deletion .github/actions/mac-codesign/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ runs:
(
cd install
find ${{ inputs.path-to-sign }} \
\( -name "*.dylib" -o -name "*.a" -o -name "*.so" -o -name "*.mxo" \) \
\( -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" {} +
Expand Down
52 changes: 4 additions & 48 deletions .github/workflows/ossia-max.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,57 +11,13 @@ jobs:
- uses: ./.github/actions/latest-mac-toolchain
- name: build
run: ./tools/build-ossia-max.sh clean silent release
- name: Code Signing
shell: bash
env:

- uses: ./.github/actions/mac-codesign
with:
path-to-sign: ossia
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
echo "Checking codesigning"
find . -name libossia-max.dylib
(
cd artifacts
echo "===== Content of artifacts"
ls
echo "===== Content of artifacts/ossia/support"
ls ossia/support
echo "===== Content of artifacts/ossia/externals"
ls ossia/externals
codesign --force --timestamp --sign "ossia.io" ossia/support/libossia-max.dylib
for mxo in ossia/externals/*.mxo;
do
codesign --force --timestamp --sign "ossia.io" $mxo
done
ditto -c -k --sequesterRsrc --keepParent ossia ossia-max.zip
xcrun altool \
--notarize-app \
-t osx \
-f "ossia-max.zip" \
--primary-bundle-id "io.ossia.ossia-max" \
-u [email protected] -p "@env:MAC_ALTOOL_PASSWORD"
rm ossia-max.zip
)
- name: Archive Max Package
uses: actions/upload-artifact@v2
with:
Expand Down
44 changes: 5 additions & 39 deletions .github/workflows/ossia-pd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,44 +22,13 @@ jobs:
cmake --build build
cmake --build build --target install
- name: Code Signing
shell: bash
env:
- uses: ./.github/actions/mac-codesign
with:
path-to-sign: "install/ossia-pd-package"
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:
Expand Down Expand Up @@ -92,11 +61,8 @@ jobs:
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
sudo apt-get install -yqq build-essential ninja-build libavahi-client-dev
- name: Build
env:
CC: gcc-11
CXX: g++-11
run: |
cmake -B build -S ${GITHUB_WORKSPACE} -GNinja -DOSSIA_CI=1 -DCMAKE_BUILD_TYPE=Release -DOSSIA_PD_ONLY=1 -DCMAKE_INSTALL_PREFIX=install
cmake --build build
Expand Down
40 changes: 5 additions & 35 deletions .github/workflows/ossia-purrdata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,44 +22,14 @@ jobs:
cmake --build build
cmake --build build --target install
- name: Code Signing
shell: bash
env:
- uses: ./.github/actions/mac-codesign
with:
path-to-sign: "install/ossia-pd-package"
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:
Expand Down
32 changes: 5 additions & 27 deletions .github/workflows/ossia-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,36 +16,14 @@ jobs:
-DOSSIA_CI=1 \
-DCMAKE_OSX_ARCHITECTURES="x86_64;arm64"
cmake --build build
- name: Code Signing
shell: bash
env:
- uses: ./.github/actions/mac-codesign
with:
path-to-sign: "build"
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
for lib in `find build -name "ossia_python.cpython*.so" -print`
do
echo Signing ${lib}
codesign --force --timestamp --sign "ossia.io" ${lib}
done

- name: Build Wheel
shell: bash
run: |
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/ossia-qml.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@ jobs:
-DCMAKE_OSX_ARCHITECTURES="x86_64"
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: |
source ${GITHUB_WORKSPACE}/ci/codesign_functions.sh
release_macos_folder "${GITHUB_WORKSPACE}/install/Ossia" "$PWD/ossia-qml-osx.zip" "io.ossia.ossia-qml"
# - 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: |
# source ${GITHUB_WORKSPACE}/ci/codesign_functions.sh
# release_macos_folder "${GITHUB_WORKSPACE}/install/Ossia" "$PWD/ossia-qml-osx.zip" "io.ossia.ossia-qml"

- name: Archive Package
uses: actions/upload-artifact@v2
Expand Down

0 comments on commit a7c3fff

Please sign in to comment.