11name : Build
22
33on :
4+ pull_request :
45 push :
56 branches :
6- - ' main '
7+ - ' issue/** '
78 - ' chore/**'
89 - ' docs/**'
910 - ' feat/**'
@@ -22,23 +23,23 @@ jobs:
2223 test :
2324 name : Run ${{ matrix.platform }} on ${{ matrix.host }}
2425 runs-on : ${{ matrix.host }}
25-
26+
2627 strategy :
2728 fail-fast : true
2829 matrix :
29- host : [macos-11 , macos-12 ]
30+ host : [macos-13 , macos-14 ]
3031 platform : [ios, macos]
3132 include :
3233 - platform : ios
3334 scheme : " PactSwift-iOS"
34- destination : " platform=iOS Simulator,name=iPhone 12 Pro"
35+ destination : " platform=iOS Simulator,name=iPhone 15 Pro"
3536 - platform : macos
3637 scheme : " PactSwift-macOS"
3738 destination : " arch=x86_64"
38- - host : macos-11
39- xcode : 13.2 .1
40- - host : macos-12
41- xcode : 14.0.1
39+ - host : macos-13
40+ xcode : 14.3 .1
41+ - host : macos-14
42+ xcode : 15.3
4243
4344 env :
4445 SCHEME : ${{ matrix.scheme }}
6768 run : |
6869 swift build
6970 swift test -c release
70-
71- test_linux :
72- name : Run on Ubuntu
73- runs-on : ubuntu-latest
74-
75- strategy :
76- fail-fast : true
77-
78- concurrency :
79- group : test-linux-${{ github.ref }}
80- cancel-in-progress : true
81-
82- steps :
83- - uses : fwal/setup-swift@v1
84- - name : Get swift version
85- run : swift --version
86-
87- - name : " ⬇️ Checkout repository"
88- uses : actions/checkout@v2
89-
90- - name : Install Protoc
91- uses : arduino/setup-protoc@v1
92-
93- - name : " ♼ Cache rust binaries"
94- uses : actions/cache@v3
95- with :
96- path : |
97- ${{ env.RUST_TARGET_PATH }}
98- key : build-${{ runner.os }}-rust-pactswift-${{ hashFiles('**/Package.resolved') }}
99- restore-keys : |
100- build-${{ runner.os }}-rust-pactswift
101- build-${{ runner.os }}-rust-
102-
103- - name : " ⚗️ Build and Test"
104- run : |
105- Scripts/build_test_linux
106-
107- test_carthage :
108- name : " Verify for Carthage"
109- runs-on : macos-12
110-
111- strategy :
112- fail-fast : true
113-
114- concurrency :
115- group : test-carthage-${{ github.ref }}
116- cancel-in-progress : true
117-
118- steps :
119- - name : Checkout repository
120- uses : actions/checkout@v2
121-
122- - name : Use Xcode 13.4.1
123- run : sudo xcode-select -switch /Applications/Xcode_13.4.1.app
124-
125- - name : Carthage build
126- run : |
127- carthage build --use-xcframeworks --no-skip-current
128-
129- after_success :
130- needs : [test, test_carthage, test_linux]
131- name : Build demo projects
132- if : github.ref == 'refs/heads/main'
133- runs-on : ubuntu-latest
134-
135- steps :
136- - name : Build demo projects
137- run : |
138- 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 }}"}'
0 commit comments