Skip to content

Commit

Permalink
Drop CI builds on macOS12
Browse files Browse the repository at this point in the history
  • Loading branch information
surpher committed Aug 5, 2023
1 parent 34f1c18 commit ac4dba9
Show file tree
Hide file tree
Showing 9 changed files with 115 additions and 198 deletions.
48 changes: 17 additions & 31 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,12 @@ on:
push:
branches:
- 'main'
- 'chore/**'
- 'docs/**'
- 'feat/**'
- 'feature/**'
- 'fix/**'
- 'refactor/**'
- 'releases/**'
- 'style/**'
- 'test/**'
- 'tech/**'

env:
RUST_TARGET_PATH: pact-reference

jobs:
test:
name: Run ${{ matrix.platform }} on ${{ matrix.host }}
name: "🤖 Test macOS"
runs-on: ${{ matrix.host }}

strategy:
fail-fast: true
matrix:
Expand All @@ -31,14 +18,14 @@ jobs:
include:
- platform: ios
scheme: "PactSwift-iOS"
destination: "platform=iOS Simulator,name=iPhone 14 Pro"
destination: "platform=iOS Simulator,name=iPhone 12 Pro"
- platform: macos
scheme: "PactSwift-macOS"
destination: "arch=x86_64"
- host: macos-12
xcode: 13.4.1
- host: macos-13
xcode: 14.3.1
xcode: 15.0
- host: macos-12
xcode: 14.1

env:
SCHEME: ${{ matrix.scheme }}
Expand All @@ -49,32 +36,31 @@ jobs:
cancel-in-progress: true

steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: "🧑‍💻 Checkout repository"
uses: actions/checkout@v3

- name: Use Xcode ${{ matrix.xcode }}
run: sudo xcode-select -switch /Applications/Xcode_${{ matrix.xcode }}.app
- name: "🏭 Use Xcode ${{ matrix.XCODE_VERSION }}"
run: sudo xcode-select -switch /Applications/Xcode_${{ matrix.XCODE_VERSION }}.app

- name: Prepare Tools
- name: "🧰 Prepare tools"
run: |
Scripts/prepare_build_tools
- name: Run tests (Xcode)
- name: "🧪 Run tests (xcodebuild)"
run: |
set -o pipefail && xcodebuild clean test -project PactSwift.xcodeproj -scheme "$SCHEME" -destination "$DESTINATION" GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES | xcbeautify
set -o pipefail && xcodebuild -resolvePackageDependencies && xcodebuild clean test -project PactSwift.xcodeproj -scheme "$SCHEME" -destination "$DESTINATION" GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES | xcbeautify
- name: Run tests (CLI - Swift Package)
- name: "⚗️ Run tests (swift)"
run: |
swift build
swift test -c release
set -o pipefail && swift test -c release
after_success:
needs: [test]
name: Build demo projects
name: "🚚 Build demo projects"
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest

steps:
- name: Build demo projects
- name: "🚚 Build demo projects"
run: |
curl -X POST https://api.github.com/repos/surpher/pact-swift-examples/dispatches -H 'Accept: application/vnd.github.everest-preview+json' -u ${{ secrets.PACT_SWIFT_TOKEN }} --data '{"event_type":"PactSwift - ${{ github.event.head_commit.message }}"}'
98 changes: 68 additions & 30 deletions .github/workflows/build_pr.yml
Original file line number Diff line number Diff line change
@@ -1,48 +1,86 @@
name: Build PR
name: Build Pull Request

on:
pull_request:
branches:
- 'main'

env:
RUST_TARGET_PATH: pact-reference
- '!main'

jobs:
test:
name: Run ${{ matrix.platform }} on ${{ matrix.host }}
runs-on: ${{ matrix.host }}

strategy:
fail-fast: true
matrix:
host: [macos-12, macos-13]
platform: [ios, macos]
include:
- platform: ios
scheme: "PactSwift-iOS"
destination: "platform=iOS Simulator,name=iPhone 14 Pro"
- platform: macos
scheme: "PactSwift-macOS"
destination: "arch=x86_64"
test_macos:
name: "🤖 Test macOS"
runs-on: macos-13

env:
SCHEME: ${{ matrix.scheme }}
DESTINATION: ${{ matrix.destination }}
XCODE_VERSION: 14.3.1

concurrency:
group: test_macos13_darwin_$SCHEME_${{ github.ref }}
cancel-in-progress: true

steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: "🧑‍💻 Checkout repository"
uses: actions/checkout@v3

- name: "⚙️ Use Xcode ${{ env.XCODE_VERSION }}"
run: sudo xcode-select -switch /Applications/Xcode_${{ env.XCODE_VERSION }}.app

- name: Prepare Tools
- name: "🧰 Prepare tools"
run: |
Scripts/prepare_build_tools
- name: Run tests (Xcode)
- name: "🧪 xcodebuild clean test"
run: |
set -o pipefail && xcodebuild clean test -project PactSwift.xcodeproj -scheme "$SCHEME" -destination "$DESTINATION" GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES | xcbeautify
set -o pipefail && xcodebuild -resolvePackageDependencies | xcbeautify && xcodebuild clean test -project PactSwift.xcodeproj -scheme "PactSwift-macOS" -destination "arch=x86_64" | xcbeautify
- name: Run tests (CLI - Swift Package)
- name: "⚗️ swift test"
run: |
set -o pipefail && swift test -c release
test_ios:
name: "🤖 Test iOS"
runs-on: macos-13
needs: [test_macos]

env:
SCHEME: "PactSwift-iOS"
DESTINATION: "platform=iOS Simulator,name=iPhone 14 Pro"
XCODE_VERSION: 14.3.1

concurrency:
group: test_macos13_ios_$SCHEME_${{ github.ref }}
cancel-in-progress: true

steps:
- name: "🧑‍💻 Checkout repository"
uses: actions/checkout@v3

- name: "⚙️ Use Xcode ${{ env.XCODE_VERSION }}"
run: sudo xcode-select -switch /Applications/Xcode_${{ env.XCODE_VERSION }}.app

- name: "🧰 Prepare tools"
run: |
Scripts/prepare_build_tools
- name: "♘ Test for Carthage"
run: |
set -o pipefail && carthage build --no-skip-current --use-xcframeworks
- name: "🧪 xcodebuild clean test"
run: |
set -o pipefail && xcodebuild -resolvePackageDependencies | xcbeautify && xcodebuild clean test -project PactSwift.xcodeproj -scheme "PactSwift-iOS" -destination "platform=iOS Simulator,name=iPhone 14 Pro" | xcbeautify
- name: "⚗️ swift test"
run: |
swift build
swift test -c release
after_success:
needs: [test_ios]
name: "🚚 Build demo projects"
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest

steps:
- name: "🚚 Build demo projects"
run: |
curl -X POST https://api.github.com/repos/surpher/pact-swift-examples/dispatches -H 'Accept: application/vnd.github.everest-preview+json' -u ${{ secrets.PACT_SWIFT_TOKEN }} --data '{"event_type":"PactSwift - ${{ github.event.head_commit.message }}"}'
24 changes: 13 additions & 11 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
{
"pins" : [
{
"identity" : "pactswiftserver",
"kind" : "remoteSourceControl",
"location" : "https://github.com/surpher/PactSwiftServer.git",
"state" : {
"revision" : "a122b04c7ba2f420f256b0657e67ff97ce933279",
"version" : "0.4.7"
"object": {
"pins": [
{
"package": "PactSwiftMockServer",
"repositoryURL": "https://github.com/surpher/PactSwiftServer.git",
"state": {
"branch": null,
"revision": "12ecc92092ecd3640dcc2dcb98ce6b3d1f2d76f7",
"version": "0.4.7"
}
}
}
],
"version" : 2
]
},
"version": 1
}
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.8
// swift-tools-version:5.3

import PackageDescription

Expand All @@ -19,7 +19,7 @@ let package = Package(
],

dependencies: [
.package(url: "https://github.com/surpher/PactSwiftServer.git", exact: "0.4.7")
.package(url: "https://github.com/surpher/PactSwiftServer.git", .exact("0.4.7"))
],

targets: [
Expand Down
24 changes: 12 additions & 12 deletions PactSwift.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@
AD92805626BE3361004FAA7E /* String+PactSwiftTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD92805426BE3361004FAA7E /* String+PactSwiftTests.swift */; };
AD92805826BE3705004FAA7E /* TransferProtocolTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD92805726BE3705004FAA7E /* TransferProtocolTests.swift */; };
AD92805926BE3705004FAA7E /* TransferProtocolTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD92805726BE3705004FAA7E /* TransferProtocolTests.swift */; };
AD92E18F2A7DE6E7005C70E5 /* PactSwiftMockServer in Frameworks */ = {isa = PBXBuildFile; productRef = AD92E18E2A7DE6E7005C70E5 /* PactSwiftMockServer */; };
AD957F3228A23A2300860AD1 /* Logger.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD957F3128A23A2300860AD1 /* Logger.swift */; };
AD957F3328A23A2300860AD1 /* Logger.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD957F3128A23A2300860AD1 /* Logger.swift */; };
AD9D7D8D26C8AD3400FE4137 /* ProviderStateGenerator.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD9D7D8C26C8AD3400FE4137 /* ProviderStateGenerator.swift */; };
Expand Down Expand Up @@ -185,8 +186,6 @@
ADC3AA38247C8C4B0034446E /* InteractionTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADC3AA36247C8C4B0034446E /* InteractionTests.swift */; };
ADC3AA3D247CBB550034446E /* IncludesLikeTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADC3AA3C247CBB550034446E /* IncludesLikeTests.swift */; };
ADC3AA3E247CBB550034446E /* IncludesLikeTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADC3AA3C247CBB550034446E /* IncludesLikeTests.swift */; };
ADC50E272A7D2A7B004E1E03 /* PactSwiftMockServer in Frameworks */ = {isa = PBXBuildFile; productRef = ADC50E262A7D2A7B004E1E03 /* PactSwiftMockServer */; };
ADC50E2B2A7D2D7E004E1E03 /* PactSwiftMockServer in Frameworks */ = {isa = PBXBuildFile; productRef = ADC50E2A2A7D2D7E004E1E03 /* PactSwiftMockServer */; };
ADD0315F2512193500C6099B /* ExampleGeneratorExpressible.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADD0315E2512193500C6099B /* ExampleGeneratorExpressible.swift */; };
ADD031602512193500C6099B /* ExampleGeneratorExpressible.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADD0315E2512193500C6099B /* ExampleGeneratorExpressible.swift */; };
ADD03164251219B700C6099B /* ExampleGenerator.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADD03163251219B700C6099B /* ExampleGenerator.swift */; };
Expand Down Expand Up @@ -241,6 +240,7 @@
ADF959CB26C8F6EB00C35536 /* FromProviderStateTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADF959C926C8F6EB00C35536 /* FromProviderStateTests.swift */; };
ADF959CD26C8F98800C35536 /* ProviderStateGeneratorTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADF959CC26C8F98800C35536 /* ProviderStateGeneratorTests.swift */; };
ADF959CE26C8F98800C35536 /* ProviderStateGeneratorTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADF959CC26C8F98800C35536 /* ProviderStateGeneratorTests.swift */; };
ADF994CE2A7DE1720011D974 /* PactSwiftMockServer in Frameworks */ = {isa = PBXBuildFile; productRef = ADF994CD2A7DE1720011D974 /* PactSwiftMockServer */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -410,6 +410,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
ADF994CE2A7DE1720011D974 /* PactSwiftMockServer in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -418,14 +419,14 @@
buildActionMask = 2147483647;
files = (
AD881808242C715B00BF510D /* PactSwift.framework in Frameworks */,
ADC50E272A7D2A7B004E1E03 /* PactSwiftMockServer in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
AD8FC7B42463A06F00361854 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
AD92E18F2A7DE6E7005C70E5 /* PactSwiftMockServer in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -434,7 +435,6 @@
buildActionMask = 2147483647;
files = (
AD8FC7C02463A06F00361854 /* PactSwift.framework in Frameworks */,
ADC50E2B2A7D2D7E004E1E03 /* PactSwiftMockServer in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -791,6 +791,7 @@
);
name = PactSwift_iOS;
packageProductDependencies = (
ADF994CD2A7DE1720011D974 /* PactSwiftMockServer */,
);
productName = PACTSwift;
productReference = AD8817FE242C715A00BF510D /* PactSwift.framework */;
Expand All @@ -812,7 +813,6 @@
);
name = PactSwiftTests_iOS;
packageProductDependencies = (
ADC50E262A7D2A7B004E1E03 /* PactSwiftMockServer */,
);
productName = PACTSwiftTests;
productReference = AD881807242C715B00BF510D /* PactSwiftTests_iOS.xctest */;
Expand All @@ -836,6 +836,7 @@
);
name = PactSwift_macOS;
packageProductDependencies = (
AD92E18E2A7DE6E7005C70E5 /* PactSwiftMockServer */,
);
productName = PactSwift_macOS;
productReference = AD8FC7B72463A06F00361854 /* PactSwift.framework */;
Expand All @@ -856,7 +857,6 @@
);
name = PactSwiftTests_macOS;
packageProductDependencies = (
ADC50E2A2A7D2D7E004E1E03 /* PactSwiftMockServer */,
);
productName = PactSwift_macOSTests;
productReference = AD8FC7BF2463A06F00361854 /* PactSwiftTests_macOS.xctest */;
Expand Down Expand Up @@ -898,7 +898,7 @@
);
mainGroup = AD8817F4242C715A00BF510D;
packageReferences = (
ADC50E252A7D2A7B004E1E03 /* XCRemoteSwiftPackageReference "PactSwiftServer" */,
ADF994CC2A7DE1720011D974 /* XCRemoteSwiftPackageReference "PactSwiftServer" */,
);
productRefGroup = AD8817FF242C715A00BF510D /* Products */;
projectDirPath = "";
Expand Down Expand Up @@ -1475,7 +1475,7 @@
/* End XCConfigurationList section */

/* Begin XCRemoteSwiftPackageReference section */
ADC50E252A7D2A7B004E1E03 /* XCRemoteSwiftPackageReference "PactSwiftServer" */ = {
ADF994CC2A7DE1720011D974 /* XCRemoteSwiftPackageReference "PactSwiftServer" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/surpher/PactSwiftServer.git";
requirement = {
Expand All @@ -1486,14 +1486,14 @@
/* End XCRemoteSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
ADC50E262A7D2A7B004E1E03 /* PactSwiftMockServer */ = {
AD92E18E2A7DE6E7005C70E5 /* PactSwiftMockServer */ = {
isa = XCSwiftPackageProductDependency;
package = ADC50E252A7D2A7B004E1E03 /* XCRemoteSwiftPackageReference "PactSwiftServer" */;
package = ADF994CC2A7DE1720011D974 /* XCRemoteSwiftPackageReference "PactSwiftServer" */;
productName = PactSwiftMockServer;
};
ADC50E2A2A7D2D7E004E1E03 /* PactSwiftMockServer */ = {
ADF994CD2A7DE1720011D974 /* PactSwiftMockServer */ = {
isa = XCSwiftPackageProductDependency;
package = ADC50E252A7D2A7B004E1E03 /* XCRemoteSwiftPackageReference "PactSwiftServer" */;
package = ADF994CC2A7DE1720011D974 /* XCRemoteSwiftPackageReference "PactSwiftServer" */;
productName = PactSwiftMockServer;
};
/* End XCSwiftPackageProductDependency section */
Expand Down
Loading

0 comments on commit ac4dba9

Please sign in to comment.