diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c4f1f65f..6885926a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,7 +29,16 @@ jobs: # Note: this commit is used in soundness & swifttests workflows, so they should be kept in sync uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@f84da042883848ad67aadd051dc322eec18660d3 # 0.0.9 with: - enable_windows_checks: false + windows_exclude_swift_versions: "[{\"swift_version\": \"5.9\"}, {\"swift_version\": \"5.10\"}, {\"swift_version\": \"6.0\"}, {\"swift_version\": \"6.1\"}]" + windows_build_command: > + # swift run --configuration release BasicsAsyncSnippet; + # swift run --configuration release BasicsSnippet; + swift test --configuration release; + $swiftFiles = Get-ChildItem -Path .\Snippets -Include *.swift -Recurse; + foreach ($file in $swiftFiles) { + $basename = [System.IO.Path]::GetFileNameWithoutExtension($file.FullName); + swift run --configuration release $basename; + } enable_macos_checks: true macos_env_vars: SWIFT_HOMOMORPHIC_ENCRYPTION_ENABLE_BENCHMARKING=1 macos_exclude_xcode_versions: "[{\"xcode_version\": \"16.3\"}, {\"xcode_version\": \"16.4\"}]" # we require swift 6.2 diff --git a/Package.resolved b/Package.resolved index c2918c11..f75aea83 100644 --- a/Package.resolved +++ b/Package.resolved @@ -1,5 +1,5 @@ { - "originHash" : "941fc73e4b5308506dbfb3f290b82f7cab1ff1024c9f689cf42a64022a1c5c78", + "originHash" : "b572c42630b4b717acf5a6245ef3bac7a1fc3d264c9a6fac55709bda2a537f31", "pins" : [ { "identity" : "swift-algorithms", @@ -15,8 +15,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-argument-parser.git", "state" : { - "revision" : "309a47b2b1d9b5e991f36961c983ecec72275be3", - "version" : "1.6.1" + "revision" : "41982a3656a71c768319979febd796c6fd111d5c", + "version" : "1.5.0" } }, { @@ -24,8 +24,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-asn1.git", "state" : { - "revision" : "f70225981241859eb4aa1a18a75531d26637c8cc", - "version" : "1.4.0" + "revision" : "ae33e5941bb88d88538d0a6b19ca0b01e6c76dcf", + "version" : "1.3.1" } }, { @@ -33,8 +33,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-async-algorithms.git", "state" : { - "revision" : "042e1c4d9d19748c9c228f8d4ebc97bb1e339b0b", - "version" : "1.0.4" + "revision" : "2773d4125311133a2f705ec374c363a935069d45", + "version" : "1.1.0" } }, { @@ -42,8 +42,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-collections.git", "state" : { - "revision" : "6675bc0ff86e61436e615df6fc5174e043e57924", - "version" : "1.4.1" + "revision" : "7b847a3b7008b2dc2f47ca3110d8c782fb2e5c7e", + "version" : "1.3.0" } }, { @@ -51,8 +51,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-crypto.git", "state" : { - "revision" : "95ba0316a9b733e92bb6b071255ff46263bbe7dc", - "version" : "3.15.1" + "revision" : "a6ce32a18b81b04ce7e897d1d98df6eb2da04786", + "version" : "3.12.2" } }, { @@ -60,8 +60,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-log.git", "state" : { - "revision" : "ce592ae52f982c847a4efc0dd881cc9eb32d29f2", - "version" : "1.6.4" + "revision" : "3d8596ed08bd13520157f0355e35caed215ffbfa", + "version" : "1.6.3" } }, { @@ -69,8 +69,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-numerics", "state" : { - "revision" : "0c0290ff6b24942dadb83a929ffaaa1481df04a2", - "version" : "1.1.1" + "revision" : "e0ec0f5f3af6f3e4d5e7a19d2af26b481acb6ba8", + "version" : "1.0.3" } }, { diff --git a/Package.swift b/Package.swift index 3800b967..b63f1aba 100644 --- a/Package.swift +++ b/Package.swift @@ -217,16 +217,6 @@ let package = Package( "HomomorphicEncryptionProtobuf", "_TestUtilities", ], swiftSettings: executableSettings), - .testTarget( - name: "PIRGenerateDatabaseTests", - dependencies: ["PIRGenerateDatabase", - "_TestUtilities", - .product(name: "Numerics", package: "swift-numerics")], swiftSettings: executableSettings), - .testTarget( - name: "PIRProcessDatabaseTests", - dependencies: ["PIRProcessDatabase", - "_TestUtilities", - .product(name: "Numerics", package: "swift-numerics")], swiftSettings: executableSettings), .testTarget( name: "PrivateInformationRetrievalTests", dependencies: [ @@ -249,6 +239,23 @@ let package = Package( ], swiftSettings: executableSettings), ]) +// Workaround SwiftPM's attempt to link in executables which does not work on all +// platforms. +#if !os(Windows) +package.targets.append(contentsOf: [ + .testTarget( + name: "PIRGenerateDatabaseTests", + dependencies: ["PIRGenerateDatabase", + "_TestUtilities", + .product(name: "Numerics", package: "swift-numerics")], swiftSettings: executableSettings), + .testTarget( + name: "PIRProcessDatabaseTests", + dependencies: ["PIRProcessDatabase", + "_TestUtilities", + .product(name: "Numerics", package: "swift-numerics")], swiftSettings: executableSettings), +]) +#endif + // MARK: - Benchmarks var enableBenchmarking: Bool { diff --git a/Snippets/HomomorphicEncryption/BasicsSnippet.swift b/Snippets/HomomorphicEncryption/BasicsSnippet.swift index e8050779..9c02495a 100644 --- a/Snippets/HomomorphicEncryption/BasicsSnippet.swift +++ b/Snippets/HomomorphicEncryption/BasicsSnippet.swift @@ -80,3 +80,5 @@ precondition(decoded == [8, 5, 12, 12, 15, 0, 8, 5]) // plaintext to any observer. The observed value in this case is zero. try sum -= sum precondition(sum.isTransparent()) + +preconditionFailure()