Fix sideload install: drop background task / UIBackgroundModes (#4) #13
This file contains hidden or 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: build | |
| on: | |
| push: | |
| branches: [main] | |
| paths: [rust/**, ios/**, scripts/**, .github/workflows/build.yml] | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| rust-tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| run: rustup toolchain install stable --profile minimal | |
| - name: Run crypto tests on real vectors | |
| run: cargo test --manifest-path rust/Cargo.toml | |
| ios: | |
| runs-on: macos-15 | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust + iOS targets | |
| run: | | |
| rustup toolchain install stable --profile minimal | |
| rustup target add aarch64-apple-ios aarch64-apple-ios-sim x86_64-apple-ios | |
| - name: Build XCFramework | |
| run: bash scripts/build-xcframework.sh | |
| - name: Install XcodeGen | |
| run: brew install xcodegen | |
| - name: Generate Xcode project | |
| working-directory: ios | |
| run: xcodegen generate | |
| - name: Run tests | |
| working-directory: ios | |
| run: | | |
| DEVICE=$(xcrun simctl list devices available | grep -E "iPhone" | head -1 | sed -E 's/^ *([^(]+) \(.*/\1/' | xargs) | |
| echo "Using simulator: $DEVICE" | |
| xcodebuild test \ | |
| -project happwn.xcodeproj \ | |
| -scheme happwn \ | |
| -destination "platform=iOS Simulator,name=$DEVICE" \ | |
| CODE_SIGNING_ALLOWED=NO | |
| - name: Archive (unsigned) | |
| working-directory: ios | |
| run: | | |
| xcodebuild archive \ | |
| -project happwn.xcodeproj \ | |
| -scheme happwn \ | |
| -configuration Release \ | |
| -archivePath "$PWD/build/happwn.xcarchive" \ | |
| -destination 'generic/platform=iOS' \ | |
| CODE_SIGNING_ALLOWED=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY="" | |
| - name: Package .ipa | |
| working-directory: ios | |
| run: | | |
| APP="build/happwn.xcarchive/Products/Applications/happwn.app" | |
| VERSION=$(/usr/libexec/PlistBuddy -c "Print :CFBundleShortVersionString" "$APP/Info.plist") | |
| echo "VERSION=$VERSION" >> "$GITHUB_ENV" | |
| mkdir -p build/Payload | |
| cp -R "$APP" build/Payload/ | |
| (cd build && zip -qry "happwn-${VERSION}.ipa" Payload) | |
| - name: Upload .ipa artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: happwn-ipa | |
| path: ios/build/happwn-${{ env.VERSION }}.ipa | |
| if-no-files-found: error | |
| - name: Publish release with the .ipa | |
| if: github.ref == 'refs/heads/main' | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: v${{ env.VERSION }} | |
| name: happwn v${{ env.VERSION }} | |
| files: ios/build/happwn-${{ env.VERSION }}.ipa | |
| generate_release_notes: true | |
| make_latest: true |