File tree Expand file tree Collapse file tree 8 files changed +25
-19
lines changed Expand file tree Collapse file tree 8 files changed +25
-19
lines changed Original file line number Diff line number Diff line change @@ -23,16 +23,21 @@ jobs:
23
23
fail-fast : false
24
24
matrix :
25
25
swift-version :
26
- - 5.9
27
26
- 5.10
28
27
- 6.0
28
+ - 6.1
29
29
include :
30
- - { swift-version: 5.9, swift-branch: swift-5.9.2-release, swift-tag: 5.9.2-RELEASE }
31
30
- { swift-version: 5.10, swift-branch: swift-5.10.1-release, swift-tag: 5.10.1-RELEASE }
32
31
- { swift-version: 6.0, swift-branch: swift-6.0.3-release, swift-tag: 6.0.3-RELEASE }
32
+ - { swift-version: 6.1, swift-branch: swift-6.1-release, swift-tag: 6.1-RELEASE }
33
33
runs-on : windows-latest
34
34
timeout-minutes : 60
35
35
steps :
36
+ - name : Configure dev environment
37
+ uses : compnerd/gha-setup-vsdevenv@main
38
+ with :
39
+ toolset_version : 14.29
40
+ winsdk : 10.0.22621.0
36
41
- name : Install Windows Swift toolchain
37
42
uses : compnerd/gha-setup-swift@main
38
43
with :
55
60
uses : actions/checkout@v4
56
61
- name : Run unit tests
57
62
run : |
58
- swift test -Xcc -I'C:/Program Files (x86)/zlib/include' -Xlinker -L'C:/Program Files (x86)/zlib/lib'
63
+ swift test -Xcc -I'C:/Program Files (x86)/zlib/include' -Xcc -D_INTSAFE_H_INCLUDED_ - Xlinker -L'C:/Program Files (x86)/zlib/lib' -Xbuild-tools-swiftc -windows-sdk-root -Xbuild-tools-swiftc "${env:WindowsSdkDir}" -Xbuild-tools-swiftc -windows-sdk-version -Xbuild-tools-swiftc ${env:UCRTVersion} -Xswiftc -windows-sdk-root -Xswiftc "${env:WindowsSdkDir}" -Xswiftc -windows-sdk-version -Xswiftc ${env:UCRTVersion}
Original file line number Diff line number Diff line change 1
- // swift-tools-version:5.9
1
+ // swift-tools-version:5.10
2
2
import PackageDescription
3
3
4
4
#if canImport(Darwin) || compiler(<6.0)
@@ -51,6 +51,7 @@ var swiftSettings: [SwiftSetting] {
51
51
. enableUpcomingFeature( " DisableOutwardActorInference " ) ,
52
52
. enableUpcomingFeature( " StrictConcurrency " ) ,
53
53
. enableExperimentalFeature( " StrictConcurrency=complete " ) ,
54
+ . enableExperimentalFeature( " AccessLevelOnImport " ) ,
54
55
]
55
56
}
56
57
Original file line number Diff line number Diff line change 12
12
<img src="https://img.shields.io/codecov/c/github/vapor-community/Zip?style=plastic&logo=codecov&label=codecov">
13
13
</a>
14
14
<a href="https://swift.org">
15
- <img src="https://design.vapor.codes/images/swift59up.svg" alt="Swift 5.9 +">
15
+ <img src="https://design.vapor.codes/images/swift59up.svg" alt="Swift 5.10 +">
16
16
</a>
17
17
</div >
18
18
<br >
@@ -40,7 +40,7 @@ and add it to your target's dependencies:
40
40
41
41
### Supported Platforms
42
42
43
- Zip supports all platforms supported by Swift 5.9 and later.
43
+ Zip supports all platforms supported by Swift 5.10 and later.
44
44
45
45
To use Zip on Windows, you need to pass an available build of ` zlib ` to the build via extended flags. For example:
46
46
Original file line number Diff line number Diff line change 1
- @ _implementationOnly import CMinizip
1
+ private import CMinizip
2
2
import Foundation
3
3
4
4
/// Defines data saved in memory that will be archived as a file.
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ and add it to your target's dependencies:
31
31
32
32
### Supported Platforms
33
33
34
- Zip supports all platforms supported by Swift 5.9 and later.
34
+ Zip supports all platforms supported by Swift 5.10 and later.
35
35
36
36
To use Zip on Windows, you need to pass an available build of ` zlib ` to the build via extended flags. For example:
37
37
Original file line number Diff line number Diff line change 6
6
// Copyright © 2015 Roy Marmelstein. All rights reserved.
7
7
//
8
8
9
- @ _implementationOnly import CMinizip
9
+ private import CMinizip
10
10
import Foundation
11
11
12
12
/// Main class that handles zipping and unzipping of files.
13
13
public class Zip {
14
14
// Set of vaild file extensions
15
- #if compiler(>=5.10)
16
- nonisolated ( unsafe) private static var customFileExtensions : Set < String > = [ ]
17
- #else
18
- private static var customFileExtensions : Set < String > = [ ]
19
- #endif
15
+ nonisolated ( unsafe) private static var customFileExtensions : Set < String > = [ ]
20
16
private static let lock = NSLock ( )
21
17
22
18
@available ( * , deprecated, message: " Do not use this initializer. Zip is a utility class and should not be instantiated. " )
Original file line number Diff line number Diff line change 1
- @ _implementationOnly import CMinizip
1
+ private import CMinizip
2
2
3
3
/// Zip compression strategies.
4
4
public enum ZipCompression : Int {
Original file line number Diff line number Diff line change 1
- import Foundation
1
+ #if canImport(Darwin) || compiler(<6.0)
2
+ import Foundation
3
+ #else
4
+ import FoundationEssentials
5
+ #endif
2
6
3
7
/// Errors that can be thrown by Zip.
4
8
public enum ZipError : Error {
@@ -12,9 +16,9 @@ public enum ZipError: Error {
12
16
/// A textual representation of this error.
13
17
public var description : String {
14
18
switch self {
15
- case . fileNotFound: return NSLocalizedString ( " File not found. " , comment : " " )
16
- case . unzipFail: return NSLocalizedString ( " Failed to unzip file. " , comment : " " )
17
- case . zipFail: return NSLocalizedString ( " Failed to zip file. " , comment : " " )
19
+ case . fileNotFound: " File not found. "
20
+ case . unzipFail: " Failed to unzip file. "
21
+ case . zipFail: " Failed to zip file. "
18
22
}
19
23
}
20
24
}
You can’t perform that action at this time.
0 commit comments