Repository navigation
fix(tests): reset Photos access before the previous app instance ling… #94
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: Cross-platform vector gate | |
| # Asserts this repo reproduces the canonical fixtures in the orchestrator's | |
| # `code/test-vectors/` — the same fixtures code-android-app asserts against. The | |
| # two apps compute keys, signatures, and on-chain amounts in parallel Swift and | |
| # Kotlin implementations; these vectors are what keeps the answers identical. | |
| # | |
| # Two packages because they cannot share a deployment target: FlipcashCore's | |
| # transitive deps (BigDecimal, grpc/nio) pull a macOS floor that CrossPlatformVectors | |
| # does not want. Both run on a simulator — the ed25519 under test moved from a | |
| # host-buildable C package to the shared Kotlin XCFramework, which ships iOS only. | |
| on: | |
| pull_request: | |
| branches: [main] | |
| push: | |
| branches: [main] | |
| concurrency: | |
| group: vectors-${{ github.head_ref || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| vectors: | |
| name: Vectors | |
| runs-on: macos-15 | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # FlipcashCore is swift-tools 6.1, which the image's default Xcode may | |
| # predate. Take the newest installed rather than pinning a version that | |
| # can drop out of the runner image. | |
| - name: Select the newest installed Xcode | |
| run: | | |
| set -euo pipefail | |
| XCODE=$(ls -d /Applications/Xcode_*.app 2>/dev/null | sort -V | tail -1 || true) | |
| if [ -n "$XCODE" ]; then | |
| sudo xcode-select -s "$XCODE" | |
| fi | |
| xcodebuild -version | |
| # Simulator model names turn over with each runner image, so pick whatever | |
| # iPhone is installed rather than naming one. | |
| - name: Pick a simulator | |
| id: sim | |
| run: | | |
| set -euo pipefail | |
| UDID=$(xcrun simctl list devices available -j | python3 -c "import json,sys; d=json.load(sys.stdin)['devices']; print(next(x['udid'] for r in sorted(d, reverse=True) for x in d[r] if x['name'].startswith('iPhone')))") | |
| echo "udid=$UDID" >> "$GITHUB_OUTPUT" | |
| - name: Ed25519 vectors | |
| working-directory: CrossPlatformVectors | |
| run: | | |
| xcodebuild test -scheme CrossPlatformVectors-Package \ | |
| -destination "platform=iOS Simulator,id=${{ steps.sim.outputs.udid }}" \ | |
| -quiet | |
| - name: FlipcashCore vectors | |
| working-directory: FlipcashCoreVectors | |
| run: | | |
| xcodebuild test -scheme FlipcashCoreVectors-Package \ | |
| -destination "platform=iOS Simulator,id=${{ steps.sim.outputs.udid }}" \ | |
| -quiet |