Skip to content

Commit c73b432

Browse files
committed
Update some repo tags and associated patches for the snapshots on the CI
1 parent 4e34b72 commit c73b432

File tree

4 files changed

+98
-46
lines changed

4 files changed

+98
-46
lines changed

get-packages-and-swift-source.swift

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ let extraSwiftRepos = ["swift-llbuild", "swift-package-manager", "swift-driver",
1717
"swift-certificates", "swift-asn1", "swift-toolchain-sqlite"]
1818
let appleRepos = ["swift-argument-parser", "swift-crypto", "swift-system", "swift-collections", "swift-certificates", "swift-asn1"]
1919
let renameRepos = ["swift-llbuild" : "llbuild", "swift-package-manager" : "swiftpm", "Yams" : "yams"]
20-
var repoTags = ["swift-system" : "1.4.1", "swift-collections" : "1.1.3", "swift-asn1" : "1.0.0",
20+
var repoTags = ["swift-system" : "1.5.0", "swift-collections" : "1.1.3", "swift-asn1" : "1.0.0",
2121
"swift-certificates" : "1.0.1", "Yams" : "5.0.6", "swift-argument-parser" : "1.4.0",
2222
"swift-crypto" : "3.0.0", "swift-toolchain-sqlite" : "1.0.1"]
2323
if ProcessInfo.processInfo.environment["BUILD_SWIFT_PM"] != nil {
@@ -61,6 +61,13 @@ if swiftBranch == "RELEASE" {
6161
if ProcessInfo.processInfo.environment["BUILD_SWIFT_PM"] != nil {
6262
swiftRepos += ["swift-build"]
6363
}
64+
if swiftVersion == "" {
65+
repoTags["swift-collections"] = "1.1.6"
66+
repoTags["swift-argument-parser"] = "1.5.1"
67+
repoTags["swift-crypto"] = "3.12.5"
68+
repoTags["swift-certificates"] = "1.10.1"
69+
repoTags["swift-asn1"] = "1.3.2"
70+
}
6471
}
6572

6673
// takes the name of a command-line executable and the arguments to pass to it

swift-android-ci-devel.patch

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,34 @@
1+
diff --git a/swift-argument-parser/Sources/ArgumentParser/Utilities/Platform.swift b/swift-argument-parser/Sources/ArgumentParser/Utilities/Platform.swift
2+
index b7fa046..a94e3b8 100644
3+
--- a/swift-argument-parser/Sources/ArgumentParser/Utilities/Platform.swift
4+
+++ b/swift-argument-parser/Sources/ArgumentParser/Utilities/Platform.swift
5+
@@ -19,6 +19,8 @@ import Darwin
6+
import CRT
7+
#elseif canImport(WASILibc)
8+
import WASILibc
9+
+#elseif canImport(Android)
10+
+import Android
11+
#endif
12+
13+
enum Platform {}
14+
@@ -88,6 +90,8 @@ extension Platform {
15+
ucrt._exit(code)
16+
#elseif canImport(WASILibc)
17+
WASILibc.exit(code)
18+
+#elseif canImport(Android)
19+
+ Android.exit(code)
20+
#endif
21+
}
22+
}
23+
@@ -108,7 +112,7 @@ extension Platform {
24+
25+
// MARK: Terminal size
26+
27+
-#if canImport(Glibc)
28+
+#if canImport(Glibc) || canImport(Android)
29+
func ioctl(_ a: Int32, _ b: Int32, _ p: UnsafeMutableRawPointer) -> Int32 {
30+
ioctl(CInt(a), UInt(b), p)
31+
}
132
diff --git a/swift-build/Sources/SWBUtil/FSProxy.swift b/swift-build/Sources/SWBUtil/FSProxy.swift
233
index b446d21..f88f3c3 100644
334
--- a/swift-build/Sources/SWBUtil/FSProxy.swift
@@ -85,3 +116,17 @@ index b446d21..f88f3c3 100644
85116
return createFileInfo(info)
86117
}
87118
}
119+
diff --git a/swift-crypto/Sources/Crypto/Key Derivation/HKDF.swift b/swift-crypto/Sources/Crypto/Key Derivation/HKDF.swift
120+
index 5f47c2f..4b5579e 100644
121+
--- a/swift-crypto/Sources/Crypto/Key Derivation/HKDF.swift
122+
+++ b/swift-crypto/Sources/Crypto/Key Derivation/HKDF.swift
123+
@@ -15,6 +15,9 @@
124+
@_exported import CryptoKit
125+
#else
126+
import Foundation
127+
+#if canImport(Android)
128+
+import Android
129+
+#endif
130+
131+
/// A standards-based implementation of an HMAC-based Key Derivation Function
132+
/// (HKDF).

swift-android-ci-release.patch

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,48 @@
1+
diff --git a/swift-argument-parser/Sources/ArgumentParser/Utilities/Platform.swift b/swift-argument-parser/Sources/ArgumentParser/Utilities/Platform.swift
2+
index b7fa046..a94e3b8 100644
3+
--- a/swift-argument-parser/Sources/ArgumentParser/Utilities/Platform.swift
4+
+++ b/swift-argument-parser/Sources/ArgumentParser/Utilities/Platform.swift
5+
@@ -19,6 +19,8 @@ import Darwin
6+
import CRT
7+
#elseif canImport(WASILibc)
8+
import WASILibc
9+
+#elseif canImport(Android)
10+
+import Android
11+
#endif
12+
13+
enum Platform {}
14+
@@ -88,6 +90,8 @@ extension Platform {
15+
ucrt._exit(code)
16+
#elseif canImport(WASILibc)
17+
WASILibc.exit(code)
18+
+#elseif canImport(Android)
19+
+ Android.exit(code)
20+
#endif
21+
}
22+
}
23+
@@ -108,7 +112,7 @@ extension Platform {
24+
25+
// MARK: Terminal size
26+
27+
-#if canImport(Glibc)
28+
+#if canImport(Glibc) || canImport(Android)
29+
func ioctl(_ a: Int32, _ b: Int32, _ p: UnsafeMutableRawPointer) -> Int32 {
30+
ioctl(CInt(a), UInt(b), p)
31+
}
32+
diff --git a/swift-crypto/Sources/Crypto/Key Derivation/HKDF.swift b/swift-crypto/Sources/Crypto/Key Derivation/HKDF.swift
33+
index 5f47c2f..4b5579e 100644
34+
--- a/swift-crypto/Sources/Crypto/Key Derivation/HKDF.swift
35+
+++ b/swift-crypto/Sources/Crypto/Key Derivation/HKDF.swift
36+
@@ -15,6 +15,9 @@
37+
@_exported import CryptoKit
38+
#else
39+
import Foundation
40+
+#if canImport(Android)
41+
+import Android
42+
+#endif
43+
44+
/// A standards-based implementation of an HMAC-based Key Derivation Function
45+
/// (HKDF).
146
diff --git a/swift-system/Sources/System/Internals/CInterop.swift b/swift-system/Sources/System/Internals/CInterop.swift
247
index 13abc75..2ad551a 100644
348
--- a/swift-system/Sources/System/Internals/CInterop.swift

swift-android-ci.patch

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -40,37 +40,6 @@ index 92a1ee38..52273afb 100644
4040
add_subdirectory(BuildSystem)
4141
-add_subdirectory(Ninja)
4242
+#add_subdirectory(Ninja)
43-
diff --git a/swift-argument-parser/Sources/ArgumentParser/Utilities/Platform.swift b/swift-argument-parser/Sources/ArgumentParser/Utilities/Platform.swift
44-
index b7fa046..a94e3b8 100644
45-
--- a/swift-argument-parser/Sources/ArgumentParser/Utilities/Platform.swift
46-
+++ b/swift-argument-parser/Sources/ArgumentParser/Utilities/Platform.swift
47-
@@ -19,6 +19,8 @@ import Darwin
48-
import CRT
49-
#elseif canImport(WASILibc)
50-
import WASILibc
51-
+#elseif canImport(Android)
52-
+import Android
53-
#endif
54-
55-
enum Platform {}
56-
@@ -88,6 +90,8 @@ extension Platform {
57-
ucrt._exit(code)
58-
#elseif canImport(WASILibc)
59-
WASILibc.exit(code)
60-
+#elseif canImport(Android)
61-
+ Android.exit(code)
62-
#endif
63-
}
64-
}
65-
@@ -108,7 +112,7 @@ extension Platform {
66-
67-
// MARK: Terminal size
68-
69-
-#if canImport(Glibc)
70-
+#if canImport(Glibc) || canImport(Android)
71-
func ioctl(_ a: Int32, _ b: Int32, _ p: UnsafeMutableRawPointer) -> Int32 {
72-
ioctl(CInt(a), UInt(b), p)
73-
}
7443
diff --git a/swift-certificates/Sources/X509/Verifier/RFC5280/URIConstraints.swift b/swift-certificates/Sources/X509/Verifier/RFC5280/URIConstraints.swift
7544
--- a/swift-certificates/Sources/X509/Verifier/RFC5280/URIConstraints.swift
7645
+++ b/swift-certificates/Sources/X509/Verifier/RFC5280/URIConstraints.swift
@@ -84,17 +53,3 @@ diff --git a/swift-certificates/Sources/X509/Verifier/RFC5280/URIConstraints.swi
8453
#elseif canImport(Darwin)
8554
import Darwin
8655
#endif
87-
diff --git a/swift-crypto/Sources/Crypto/Key Derivation/HKDF.swift b/swift-crypto/Sources/Crypto/Key Derivation/HKDF.swift
88-
index 5f47c2f..4b5579e 100644
89-
--- a/swift-crypto/Sources/Crypto/Key Derivation/HKDF.swift
90-
+++ b/swift-crypto/Sources/Crypto/Key Derivation/HKDF.swift
91-
@@ -15,6 +15,9 @@
92-
@_exported import CryptoKit
93-
#else
94-
import Foundation
95-
+#if canImport(Android)
96-
+import Android
97-
+#endif
98-
99-
/// A standards-based implementation of an HMAC-based Key Derivation Function
100-
/// (HKDF).

0 commit comments

Comments
 (0)