From a3683f45897c0fe4a8d53729d43ce0cdb02b2cff Mon Sep 17 00:00:00 2001 From: Ryo Aoyama Date: Tue, 22 Oct 2019 23:07:14 +0900 Subject: [PATCH 1/4] Add config for GitHub Actions CI --- .github/workflows/ci.yml | 53 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..78385b6 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,53 @@ +name: GitHub Actions CI +on: push +jobs: + linux: + name: Test on linux + runs-on: ubuntu-18.04 + container: + image: swift:${{ matrix.swift_version }} + strategy: + fail-fast: false + matrix: + swift_version: ["4.2", "5.0", "5.1"] + steps: + - uses: actions/checkout@v1 + - name: Show environments + run: | + swift --version + - name: Swift test + run: | + swift build + swift test + + macOS: + name: Test on macOS + runs-on: macOS-10.14 + strategy: + fail-fast: false + matrix: + xcode_version: ["10.1", "10.2", "11.1"] + env: + DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode_version }}.app + steps: + - uses: actions/checkout@v1 + - name: Show environments + run: | + swift --version + xcodebuild -version + - name: Swift test + run: | + swift build + swift test + - name: Xcode maxOS + run: | + set -o pipefail && xcodebuild build-for-testing test-without-building -scheme DifferenceKit -configuration Release ENABLE_TESTABILITY=YES | xcpretty -c + - name: Xcode iOS + run: | + set -o pipefail && xcodebuild build-for-testing test-without-building -scheme DifferenceKit -configuration Release -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone X' ENABLE_TESTABILITY=YES | xcpretty -c + - name: Xcode tvOS + run: | + set -o pipefail && xcodebuild build-for-testing test-without-building -scheme DifferenceKit -configuration Release -sdk appletvsimulator -destination 'platform=tvOS Simulator,name=Apple TV' ENABLE_TESTABILITY=YES | xcpretty -c + - name: Xcode watchOS + run: | + set -o pipefail && xcodebuild build -scheme DifferenceKit -configuration Release -sdk watchsimulator -destination 'platform=watchOS Simulator,name=Apple Watch Series 4 - 40mm' ENABLE_TESTABILITY=YES | xcpretty -c From c94cd6f88a873e02e1d899568369dbcd192b9cd0 Mon Sep 17 00:00:00 2001 From: Ryo Aoyama Date: Tue, 22 Oct 2019 23:18:28 +0900 Subject: [PATCH 2/4] Remove azure pipline config --- azure-pipelines.yml | 70 --------------------------------------------- 1 file changed, 70 deletions(-) delete mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index 0740295..0000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,70 +0,0 @@ -trigger: -- master - -jobs: - -- job: linux - pool: - vmImage: 'Ubuntu 16.04' - strategy: - maxParallel: 10 - matrix: - swift4_2: - containerImage: swift:4.2 - swift5_0: - containerImage: swift:5.0 - container: $[ variables['containerImage'] ] - steps: - - script: | - swift build - swift test - displayName: swift test on linux - -- job: macOS - pool: - vmImage: 'macOS 10.14' - strategy: - maxParallel: 10 - matrix: - xcode10_1: - DEVELOPER_DIR: /Applications/Xcode_10.1.app - xcode10_2: - DEVELOPER_DIR: /Applications/Xcode_10.2.app - steps: - - script: | - swift build - swift test - displayName: swift test on macOS - condition: succeededOrFailed() - - script: xcodebuild -version - displayName: xcodebuild -version - condition: succeededOrFailed() - - script: | - set -o pipefail && - xcodebuild build-for-testing test-without-building -scheme DifferenceKit -configuration Release ENABLE_TESTABILITY=YES | - xcpretty -c -r junit -o build/reports/xcodebuild-macOS.xml - displayName: xcodebuild test maxOS - condition: succeededOrFailed() - - script: | - set -o pipefail && - xcodebuild build-for-testing test-without-building -scheme DifferenceKit -configuration Release -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone X' ENABLE_TESTABILITY=YES | - xcpretty -c -r junit -o build/reports/xcodebuild-iOS.xml - displayName: xcodebuild test iOS - condition: succeededOrFailed() - - script: | - set -o pipefail && - xcodebuild build-for-testing test-without-building -scheme DifferenceKit -configuration Release -sdk appletvsimulator -destination 'platform=tvOS Simulator,name=Apple TV' ENABLE_TESTABILITY=YES | - xcpretty -c -r junit -o build/reports/xcodebuild-tvOS.xml - displayName: xcodebuild test tvOS - condition: succeededOrFailed() - - script: | - set -o pipefail && - xcodebuild build -scheme DifferenceKit -configuration Release -sdk watchsimulator -destination 'platform=watchOS Simulator,name=Apple Watch Series 4 - 40mm' ENABLE_TESTABILITY=YES | - xcpretty -c - displayName: xcodebuild test watchOS - condition: succeededOrFailed() - - task: PublishTestResults@2 - inputs: - testRunner: JUnit - testResultsFiles: build/reports/** - condition: succeededOrFailed() From 3f75dd4cafb1ac73e7d6913f7a9a2f043ebf2994 Mon Sep 17 00:00:00 2001 From: Ryo Aoyama Date: Tue, 22 Oct 2019 23:43:07 +0900 Subject: [PATCH 3/4] Add CI status badge --- .github/workflows/ci.yml | 2 +- README.md | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 78385b6..e6baaf7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: GitHub Actions CI +name: GitHub Actions on: push jobs: linux: diff --git a/README.md b/README.md index aebd37f..c0107a3 100644 --- a/README.md +++ b/README.md @@ -16,8 +16,7 @@ The algorithm is optimized based on the Paul Heckel's algorithm. Carthage Swift Package Manager
-Build Status +CI Status Platform Lincense

From 2d7d71be58bae03b043e0b9da83ee0d4e7383e21 Mon Sep 17 00:00:00 2001 From: Ryo Aoyama Date: Tue, 22 Oct 2019 23:50:20 +0900 Subject: [PATCH 4/4] Use iPhone 8 simulator on CI --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e6baaf7..4d943c4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,7 +44,7 @@ jobs: set -o pipefail && xcodebuild build-for-testing test-without-building -scheme DifferenceKit -configuration Release ENABLE_TESTABILITY=YES | xcpretty -c - name: Xcode iOS run: | - set -o pipefail && xcodebuild build-for-testing test-without-building -scheme DifferenceKit -configuration Release -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone X' ENABLE_TESTABILITY=YES | xcpretty -c + set -o pipefail && xcodebuild build-for-testing test-without-building -scheme DifferenceKit -configuration Release -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 8' ENABLE_TESTABILITY=YES | xcpretty -c - name: Xcode tvOS run: | set -o pipefail && xcodebuild build-for-testing test-without-building -scheme DifferenceKit -configuration Release -sdk appletvsimulator -destination 'platform=tvOS Simulator,name=Apple TV' ENABLE_TESTABILITY=YES | xcpretty -c