app launches python modules

This commit is contained in:
Sami Khan
2025-08-04 03:18:31 +05:00
committed by GitHub
parent 407796d18f
commit f51f8f72f8
7 changed files with 38 additions and 64 deletions
+28 -56
View File
@@ -6,7 +6,7 @@ on:
- 'v*' # Trigger on version tags
branches:
- main # Also build on main branch for testing
- app-staging # Add app-staging for testing
- python-modules # Add app-staging for testing
pull_request:
branches:
- staging # Test builds on PRs to staging
@@ -41,18 +41,12 @@ jobs:
uv python install
uv sync --locked --all-extras
- name: Install Python Bindings
run: |
uv pip install dist/exo_pyo3_bindings-*.whl
- name: Verify Python Environment
run: |
uv run python -c "import exo_pyo3_bindings; print('Python bindings installed successfully')"
uv run python -c "import master.main; print('Master module available')"
uv run python -c "import worker.main; print('Worker module available')"
- name: Prepare Code Signing Keychain
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
env:
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
MACOS_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
@@ -79,35 +73,23 @@ jobs:
cd app/exov2
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
if [[ "${{ github.event_name }}" == "push" && "${{ github.ref }}" == refs/tags/v* ]]; then
# Release build with code signing
security unlock-keychain -p "$MACOS_CERTIFICATE_PASSWORD" exov2.keychain
SIGNING_IDENTITY=$(security find-identity -v -p codesigning | awk -F '"' '{print $2}')
xcodebuild clean build \
-project exov2.xcodeproj \
-scheme exov2 \
-configuration Release \
-derivedDataPath build \
CODE_SIGNING_IDENTITY="$SIGNING_IDENTITY" \
PROVISIONING_PROFILE_SPECIFIER="Exo Provisioning Profile" \
CODE_SIGN_INJECT_BASE_ENTITLEMENTS=YES \
OTHER_CODE_SIGN_FLAGS="--timestamp"
else
# Debug build without code signing for testing
xcodebuild clean build \
-project exov2.xcodeproj \
-scheme exov2 \
-configuration Debug \
-derivedDataPath build \
CODE_SIGN_IDENTITY="" \
CODE_SIGNING_REQUIRED=NO
fi
# Release build with code signing
security unlock-keychain -p "$MACOS_CERTIFICATE_PASSWORD" exov2.keychain
SIGNING_IDENTITY=$(security find-identity -v -p codesigning | awk -F '"' '{print $2}')
xcodebuild clean build \
-project exov2.xcodeproj \
-scheme exov2 \
-configuration Release \
-derivedDataPath build \
CODE_SIGNING_IDENTITY="$SIGNING_IDENTITY" \
PROVISIONING_PROFILE_SPECIFIER="Exo Provisioning Profile" \
CODE_SIGN_INJECT_BASE_ENTITLEMENTS=YES \
OTHER_CODE_SIGN_FLAGS="--timestamp"
mv build/Build/Products/*/exov2.app ../../
mv build/Build/Products/*/EXO.app ../../
- name: Sign and Create DMG (Release only)
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
- name: Sign, Notarize, and Create DMG
env:
APPLE_NOTARIZATION_USERNAME: ${{ secrets.APPLE_NOTARIZATION_USERNAME }}
APPLE_NOTARIZATION_PASSWORD: ${{ secrets.APPLE_NOTARIZATION_PASSWORD }}
@@ -119,21 +101,21 @@ jobs:
# Sign the app
/usr/bin/codesign --deep --force --timestamp --options runtime \
--sign "$SIGNING_IDENTITY" exov2.app
--sign "$SIGNING_IDENTITY" EXO.app
# Verify the signing
codesign -dvv exov2.app
codesign -dvv EXO.app
# Create DMG
mkdir -p tmp/dmg-contents
cp -r ./exov2.app tmp/dmg-contents/
cp -r ./EXO.app tmp/dmg-contents/
ln -s /Applications tmp/dmg-contents/Applications
VERSION=$(git describe --tags --abbrev=0 | sed 's/^v//')
DMG_NAME="exo.dmg"
# Create and sign DMG
hdiutil create -volname "Exo" -srcfolder tmp/dmg-contents -ov -format UDZO exov2-${VERSION}.dmg
hdiutil create -volname "Exo" -srcfolder tmp/dmg-contents -ov -format UDZO "$DMG_NAME"
/usr/bin/codesign --deep --force --timestamp --options runtime \
--sign "$SIGNING_IDENTITY" exov2-${VERSION}.dmg
--sign "$SIGNING_IDENTITY" "$DMG_NAME"
# Setup notarization credentials (optional - comment out if no notarization secrets)
if [[ -n "$APPLE_NOTARIZATION_USERNAME" ]]; then
@@ -146,24 +128,14 @@ jobs:
xcrun notarytool submit --wait \
--team-id "$APPLE_NOTARIZATION_TEAM" \
--keychain-profile notary_pass \
exov2-${VERSION}.dmg
"$DMG_NAME"
# Staple the notarization
xcrun stapler staple exov2-${VERSION}.dmg
xcrun stapler staple "$DMG_NAME"
fi
- name: Create DMG (Debug builds)
if: github.event_name != 'push' || !startsWith(github.ref, 'refs/tags/v')
run: |
mkdir -p tmp/dmg-contents
cp -r ./exov2.app tmp/dmg-contents/
ln -s /Applications tmp/dmg-contents/Applications
VERSION=$(git rev-parse --short HEAD)
hdiutil create -volname "Exo Debug" -srcfolder tmp/dmg-contents -ov -format UDZO exov2-debug-${VERSION}.dmg
- name: Cleanup Keychain
if: always() && github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
if: always()
run: |
security default-keychain -s login.keychain
security delete-keychain exov2.keychain
@@ -171,11 +143,11 @@ jobs:
- name: Upload DMG file
uses: actions/upload-artifact@v4
with:
name: exov2-dmg
path: exov2*.dmg
name: exo-dmg
path: exo.dmg
- name: Upload App Bundle
uses: actions/upload-artifact@v4
with:
name: exov2-app
path: exov2.app/
path: EXO.app/