Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 18 additions & 9 deletions .github/workflows/vectors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ name: Cross-platform vector gate
# 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: CodeCurves is
# plain C and builds for the host, while FlipcashCore declares only iOS and its
# transitive deps (BigDecimal, grpc/nio) will not resolve for a macOS build.
# 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:
Expand Down Expand Up @@ -39,17 +40,25 @@ jobs:
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: swift test
run: |
xcodebuild test -scheme CrossPlatformVectors-Package \
-destination "platform=iOS Simulator,id=${{ steps.sim.outputs.udid }}" \
-quiet

- name: FlipcashCore vectors
working-directory: FlipcashCoreVectors
run: |
set -euo pipefail
# Simulator model names turn over with each runner image, so pick
# whatever iPhone is installed rather than naming one.
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')))")
xcodebuild test -scheme FlipcashCoreVectors-Package \
-destination "platform=iOS Simulator,id=$UDID" \
-destination "platform=iOS Simulator,id=${{ steps.sim.outputs.udid }}" \
-quiet
4 changes: 1 addition & 3 deletions Code.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@
9A516F892D9B12EA00AF478B /* FlipcashTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = FlipcashTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
9A516F932D9B12EA00AF478B /* FlipcashUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = FlipcashUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
9A592D762B17AF5500735BB0 /* base.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = base.xcconfig; sourceTree = "<group>"; };
9AA197072CE51ABB00FE1703 /* CodeCurves */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = CodeCurves; sourceTree = "<group>"; };
9ABDD1962D9D7C2E006B6CDA /* FlipcashAPI */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = FlipcashAPI; sourceTree = "<group>"; };
9AD5E64B25F2BF3E007388AE /* opencv2.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = opencv2.framework; sourceTree = "<group>"; };
A361ABDE10578BE8E8859E31 /* NotificationContent.entitlements */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.entitlements; path = NotificationContent.entitlements; sourceTree = "<group>"; };
Expand Down Expand Up @@ -275,7 +274,6 @@
9AED116C258BE3AF0088D902 /* Packages */ = {
isa = PBXGroup;
children = (
9AA197072CE51ABB00FE1703 /* CodeCurves */,
9A43F0102D9C357900CE8817 /* FlipcashCore */,
9ABDD1962D9D7C2E006B6CDA /* FlipcashAPI */,
9A0C7F8E2DA0379A0018C7CB /* FlipcashUI */,
Expand Down Expand Up @@ -1768,7 +1766,7 @@
repositoryURL = "https://github.com/code-payments/flipcash-shared-core-spm";
requirement = {
kind = upToNextMinorVersion;
minimumVersion = 0.3.1;
minimumVersion = 0.4.0;
};
};
9ACE172927E6287C00ACA047 /* XCRemoteSwiftPackageReference "mixpanel-swift" */ = {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 0 additions & 8 deletions CodeCurves/.gitignore

This file was deleted.

23 changes: 0 additions & 23 deletions CodeCurves/Package.swift

This file was deleted.

69 changes: 0 additions & 69 deletions CodeCurves/Sources/CodeCurves/add_scalar.c

This file was deleted.

40 changes: 0 additions & 40 deletions CodeCurves/Sources/CodeCurves/ed25519.h

This file was deleted.

Loading
Loading