From 98716cdf13d721fe178f5ec48735cc56ae4fa5ee Mon Sep 17 00:00:00 2001 From: surpher Date: Sat, 5 Aug 2023 01:26:20 +1000 Subject: [PATCH] Drop CI builds on macOS12 --- .github/workflows/build.yml | 41 +++++++++----------------- .github/workflows/build_pr.yml | 45 +++++++++++++++++++++-------- Package.resolved | 14 --------- Package.swift | 2 +- PactSwift.xcodeproj/project.pbxproj | 24 +++++++-------- 5 files changed, 59 insertions(+), 67 deletions(-) delete mode 100644 Package.resolved diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 448b4503..d9246359 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,41 +4,26 @@ 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 ${{ matrix.platform }} on ${{ matrix.host }}" runs-on: ${{ matrix.host }} strategy: fail-fast: true matrix: - host: [macos-12, macos-13] + host: [macos-13] platform: [ios, macos] include: - platform: ios scheme: "PactSwift-iOS" destination: "platform=iOS Simulator,name=iPhone 14 Pro" + xcode: 14.3.1 - 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" env: SCHEME: ${{ matrix.scheme }} @@ -49,32 +34,32 @@ 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 }} + - name: "โš™๏ธ Use Xcode ${{ matrix.xcode }}" run: sudo xcode-select -switch /Applications/Xcode_${{ matrix.xcode }}.app - - name: Prepare Tools + - name: "๐Ÿงฐ Prepare Tools" run: | Scripts/prepare_build_tools - - name: Run tests (Xcode) + - name: "๐Ÿงช Run tests (Xcode ${{ matrix.xcode }})" 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 "$SCHEME" -destination "$DESTINATION" | xcbeautify - - name: Run tests (CLI - Swift Package) + - name: "โš—๏ธ Run tests in terminal (${{ matrix.destination }})" run: | swift build 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 }}"}' diff --git a/.github/workflows/build_pr.yml b/.github/workflows/build_pr.yml index 49186297..15b7c257 100644 --- a/.github/workflows/build_pr.yml +++ b/.github/workflows/build_pr.yml @@ -1,48 +1,69 @@ -name: Build PR +name: Build Pull Request on: pull_request: branches: - 'main' -env: - RUST_TARGET_PATH: pact-reference - jobs: test: - name: Run ${{ matrix.platform }} on ${{ matrix.host }} + name: "๐Ÿค– Test ${{ matrix.platform }} on ${{ matrix.host }}" runs-on: ${{ matrix.host }} - + strategy: fail-fast: true matrix: - host: [macos-12, macos-13] + host: [macos-13] platform: [ios, macos] include: - platform: ios scheme: "PactSwift-iOS" destination: "platform=iOS Simulator,name=iPhone 14 Pro" + xcode: 14.3.1 - platform: macos scheme: "PactSwift-macOS" destination: "arch=x86_64" + xcode: "15.0" env: SCHEME: ${{ matrix.scheme }} DESTINATION: ${{ matrix.destination }} + concurrency: + group: test_${{ matrix.host }}_${{ matrix.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 ${{ matrix.xcode }}" + run: sudo xcode-select -switch /Applications/Xcode_${{ matrix.xcode }}.app - - name: Prepare Tools + - name: "๐Ÿงฐ Prepare Tools" run: | Scripts/prepare_build_tools - - name: Run tests (Xcode) + - name: "๐Ÿ“ฆ Resolve package dependencies" + run: | + set -o pipefail && xcodebuild clean test -resolvePackageDependencies -project PactSwift.xcodeproj -scheme "$SCHEME" -destination "$DESTINATION" | xcbeautify + + - name: "๐Ÿงช Run tests (Xcode ${{ matrix.xcode }})" 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 - - name: Run tests (CLI - Swift Package) + - name: "โš—๏ธ Run tests in terminal (${{ matrix.destination }})" run: | swift build swift test -c release + + # after_success: + # needs: [test] + # 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 }}"}' diff --git a/Package.resolved b/Package.resolved deleted file mode 100644 index c3eff9de..00000000 --- a/Package.resolved +++ /dev/null @@ -1,14 +0,0 @@ -{ - "pins" : [ - { - "identity" : "pactswiftserver", - "kind" : "remoteSourceControl", - "location" : "https://github.com/surpher/PactSwiftServer.git", - "state" : { - "revision" : "a122b04c7ba2f420f256b0657e67ff97ce933279", - "version" : "0.4.7" - } - } - ], - "version" : 2 -} diff --git a/Package.swift b/Package.swift index 051e9df7..639748c7 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.8 +// swift-tools-version:5.3 import PackageDescription diff --git a/PactSwift.xcodeproj/project.pbxproj b/PactSwift.xcodeproj/project.pbxproj index f9623511..03103d1d 100644 --- a/PactSwift.xcodeproj/project.pbxproj +++ b/PactSwift.xcodeproj/project.pbxproj @@ -185,8 +185,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 */; }; @@ -241,6 +239,8 @@ 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 */; }; + ADF994D02A7DE1810011D974 /* PactSwiftMockServer in Frameworks */ = {isa = PBXBuildFile; productRef = ADF994CF2A7DE1810011D974 /* PactSwiftMockServer */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -410,6 +410,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + ADF994CE2A7DE1720011D974 /* PactSwiftMockServer in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -418,7 +419,6 @@ buildActionMask = 2147483647; files = ( AD881808242C715B00BF510D /* PactSwift.framework in Frameworks */, - ADC50E272A7D2A7B004E1E03 /* PactSwiftMockServer in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -434,7 +434,7 @@ buildActionMask = 2147483647; files = ( AD8FC7C02463A06F00361854 /* PactSwift.framework in Frameworks */, - ADC50E2B2A7D2D7E004E1E03 /* PactSwiftMockServer in Frameworks */, + ADF994D02A7DE1810011D974 /* PactSwiftMockServer in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -791,6 +791,7 @@ ); name = PactSwift_iOS; packageProductDependencies = ( + ADF994CD2A7DE1720011D974 /* PactSwiftMockServer */, ); productName = PACTSwift; productReference = AD8817FE242C715A00BF510D /* PactSwift.framework */; @@ -812,7 +813,6 @@ ); name = PactSwiftTests_iOS; packageProductDependencies = ( - ADC50E262A7D2A7B004E1E03 /* PactSwiftMockServer */, ); productName = PACTSwiftTests; productReference = AD881807242C715B00BF510D /* PactSwiftTests_iOS.xctest */; @@ -856,7 +856,7 @@ ); name = PactSwiftTests_macOS; packageProductDependencies = ( - ADC50E2A2A7D2D7E004E1E03 /* PactSwiftMockServer */, + ADF994CF2A7DE1810011D974 /* PactSwiftMockServer */, ); productName = PactSwift_macOSTests; productReference = AD8FC7BF2463A06F00361854 /* PactSwiftTests_macOS.xctest */; @@ -898,7 +898,7 @@ ); mainGroup = AD8817F4242C715A00BF510D; packageReferences = ( - ADC50E252A7D2A7B004E1E03 /* XCRemoteSwiftPackageReference "PactSwiftServer" */, + ADF994CC2A7DE1720011D974 /* XCRemoteSwiftPackageReference "PactSwiftServer" */, ); productRefGroup = AD8817FF242C715A00BF510D /* Products */; projectDirPath = ""; @@ -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 = { @@ -1486,14 +1486,14 @@ /* End XCRemoteSwiftPackageReference section */ /* Begin XCSwiftPackageProductDependency section */ - ADC50E262A7D2A7B004E1E03 /* PactSwiftMockServer */ = { + ADF994CD2A7DE1720011D974 /* PactSwiftMockServer */ = { isa = XCSwiftPackageProductDependency; - package = ADC50E252A7D2A7B004E1E03 /* XCRemoteSwiftPackageReference "PactSwiftServer" */; + package = ADF994CC2A7DE1720011D974 /* XCRemoteSwiftPackageReference "PactSwiftServer" */; productName = PactSwiftMockServer; }; - ADC50E2A2A7D2D7E004E1E03 /* PactSwiftMockServer */ = { + ADF994CF2A7DE1810011D974 /* PactSwiftMockServer */ = { isa = XCSwiftPackageProductDependency; - package = ADC50E252A7D2A7B004E1E03 /* XCRemoteSwiftPackageReference "PactSwiftServer" */; + package = ADF994CC2A7DE1720011D974 /* XCRemoteSwiftPackageReference "PactSwiftServer" */; productName = PactSwiftMockServer; }; /* End XCSwiftPackageProductDependency section */