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 98716cd
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 67 deletions.
41 changes: 13 additions & 28 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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 }}"}'
45 changes: 33 additions & 12 deletions .github/workflows/build_pr.yml
Original file line number Diff line number Diff line change
@@ -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 }}"}'
14 changes: 0 additions & 14 deletions Package.resolved

This file was deleted.

2 changes: 1 addition & 1 deletion 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 Down
24 changes: 12 additions & 12 deletions PactSwift.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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 */; };
Expand Down Expand Up @@ -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 */
Expand Down Expand Up @@ -410,6 +410,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
ADF994CE2A7DE1720011D974 /* PactSwiftMockServer in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -418,7 +419,6 @@
buildActionMask = 2147483647;
files = (
AD881808242C715B00BF510D /* PactSwift.framework in Frameworks */,
ADC50E272A7D2A7B004E1E03 /* PactSwiftMockServer in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -434,7 +434,7 @@
buildActionMask = 2147483647;
files = (
AD8FC7C02463A06F00361854 /* PactSwift.framework in Frameworks */,
ADC50E2B2A7D2D7E004E1E03 /* PactSwiftMockServer in Frameworks */,
ADF994D02A7DE1810011D974 /* 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 Down Expand Up @@ -856,7 +856,7 @@
);
name = PactSwiftTests_macOS;
packageProductDependencies = (
ADC50E2A2A7D2D7E004E1E03 /* PactSwiftMockServer */,
ADF994CF2A7DE1810011D974 /* 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 */ = {
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 */
Expand Down

0 comments on commit 98716cd

Please sign in to comment.