Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run CI with Xcode 12.5.1 & Swift 5.4 #3710

Merged
merged 2 commits into from
Sep 10, 2021
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
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

#### Breaking

* None.
* SwiftLint now requires Swift 5.4 or higher to build.
[JP Simard](https://github.com/jpsim)

#### Experimental

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ docker_image:
docker build --force-rm --tag swiftlint .

docker_test:
docker run -v `pwd`:`pwd` -w `pwd` --name swiftlint --rm swift:5.3 swift test --parallel
docker run -v `pwd`:`pwd` -w `pwd` --name swiftlint --rm swift:5.4 swift test --parallel

docker_htop:
docker run -it --rm --pid=container:swiftlint terencewestphal/htop || reset
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ running it.
### Installing from source:

You can also build and install from source by cloning this project and running
`make install` (Xcode 12 or later).
`make install` (Xcode 12.5 or later).

## Usage

Expand Down
2 changes: 1 addition & 1 deletion README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ $ mint install realm/SwiftLint

### 编译源代码:

你也可以通过 Clone SwiftLint 的 Git 仓库到本地然后执行 `make install` (Xcode 11.4+) 编译源代码的方式来安装。
你也可以通过 Clone SwiftLint 的 Git 仓库到本地然后执行 `make install` (Xcode 12.5+) 编译源代码的方式来安装。

## 用法

Expand Down
2 changes: 1 addition & 1 deletion README_KR.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ $ mint install realm/SwiftLint

### 소스를 직접 컴파일하는 경우:

본 프로젝트를 클론해서 빌드할 수도 있습니다. `make install` 명령을 사용합니다. (Xcode 11.4 이후 버전)
본 프로젝트를 클론해서 빌드할 수도 있습니다. `make install` 명령을 사용합니다. (Xcode 12.5 이후 버전)

## 사용 방법

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ struct UnusedDeclarationRuleExamples {
}

let changes = [Change.insert(0), .delete(0)]
changes.deletes()
_ = changes.deletes()
"""),
Example("""
struct Item {}
struct Item: Codable {}
struct ResponseModel: Codable {
let items: [Item]

Expand Down Expand Up @@ -79,7 +79,7 @@ struct UnusedDeclarationRuleExamples {
indirect case optional(Component?)
}

@_functionBuilder
@resultBuilder
struct ComponentBuilder {
static func buildExpression(_ string: StaticString) -> Component {
return .string(string)
Expand Down
2 changes: 2 additions & 0 deletions Tests/SwiftLintFrameworkTests/SwiftVersionTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ final class SwiftVersionTests: XCTestCase {
func testDetectSwiftVersion() {
#if compiler(>=5.5.0)
let version = "5.5.0"
#elseif compiler(>=5.4.2)
let version = "5.4.2"
#elseif compiler(>=5.4.1)
let version = "5.4.1"
#elseif compiler(>=5.4.0)
Expand Down
36 changes: 16 additions & 20 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,21 @@ jobs:
strategy:
maxParallel: 10
matrix:
swift53:
containerImage: swift:5.3
swift54:
containerImage: swift:5.4
container: $[ variables['containerImage'] ]
steps:
- script: swift test --parallel
displayName: swift test

- job: Xcode
pool:
vmImage: 'macOS-10.15'
vmImage: 'macOS-11'
strategy:
maxParallel: 10
matrix:
xcode12:
DEVELOPER_DIR: /Applications/Xcode_12.app
xcode124:
DEVELOPER_DIR: /Applications/Xcode_12.4.app
xcode125:
DEVELOPER_DIR: /Applications/Xcode_12.5.1.app
steps:
- script: |
sw_vers
Expand All @@ -45,14 +43,12 @@ jobs:

- job: SwiftPM
pool:
vmImage: 'macOS-10.15'
vmImage: 'macOS-11'
strategy:
maxParallel: 10
matrix:
xcode12:
DEVELOPER_DIR: /Applications/Xcode_12.app
xcode124:
DEVELOPER_DIR: /Applications/Xcode_12.4.app
xcode125:
DEVELOPER_DIR: /Applications/Xcode_12.5.1.app
steps:
- script: |
sw_vers
Expand All @@ -65,9 +61,9 @@ jobs:

- job: CocoaPods
pool:
vmImage: 'macOS-10.15'
vmImage: 'macOS-11'
variables:
DEVELOPER_DIR: /Applications/Xcode_12.4.app
DEVELOPER_DIR: /Applications/Xcode_12.5.1.app
steps:
- script: bundle install --path vendor/bundle
displayName: bundle install
Expand All @@ -78,18 +74,18 @@ jobs:

- job: Analyze
pool:
vmImage: 'macOS-10.15'
vmImage: 'macOS-11'
variables:
DEVELOPER_DIR: /Applications/Xcode_12.4.app
DEVELOPER_DIR: /Applications/Xcode_12.5.1.app
steps:
- script: make analyze
displayName: Run SwiftLint Analyze

- job: TSan
pool:
vmImage: 'macOS-10.15'
vmImage: 'macOS-11'
variables:
DEVELOPER_DIR: /Applications/Xcode_12.4.app
DEVELOPER_DIR: /Applications/Xcode_12.5.1.app
steps:
- script: swift run --sanitize=thread swiftlint lint --lenient
displayName: Pre-cache SwiftLint Run
Expand All @@ -100,9 +96,9 @@ jobs:

- job: jazzy
pool:
vmImage: 'macOS-10.15'
vmImage: 'macOS-11'
variables:
DEVELOPER_DIR: /Applications/Xcode_12.4.app
DEVELOPER_DIR: /Applications/Xcode_12.5.1.app
steps:
- script: swift run swiftlint generate-docs
displayName: Run swiftlint generate-docs
Expand Down