@@ -3,22 +3,60 @@ name: iOS Tests
33on :
44 push :
55 branches : [ main ]
6- paths :
7- - ' .github/workflows/ios-tests.yml'
8- - ' **/*.swift'
96 pull_request :
107 branches : [ main ]
11- paths :
12- - ' .github/workflows/ios-tests.yml'
13- - ' **/*.swift'
148
159jobs :
16- build-ios-beta :
17- name : iOS Tests - Xcode Betas
10+ check-changes :
11+ name : Check for Changes
12+ runs-on : ubuntu-latest
13+ if : ${{ github.event_name == 'pull_request' }}
14+ outputs :
15+ changed : ${{ steps.filter.outputs.changed }}
16+ steps :
17+ - uses : dorny/paths-filter@v2
18+ id : filter
19+ with :
20+ filters : |
21+ changed:
22+ - '.github/workflows/ios-tests.yml'
23+ - '**/*.swift'
24+
25+ # ############
26+ # iOS Betas #
27+ # ############
28+
29+ # build-ios-beta:
30+ # name: iOS Tests - Xcode Betas
31+ # runs-on: macos-11.0
32+ # if: ${{ github.event_name == 'push' || needs.check-changes.outputs.changed == 'true' }}
33+ # strategy:
34+ # matrix:
35+ # xcode: [ "13.0" ]
36+
37+ # env:
38+ # DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
39+
40+ # steps:
41+ # - name: Checkout
42+ # uses: actions/checkout@v2
43+ # if: ${{ github.event_name == 'push' || needs.check-changes.outputs.changed == 'true' }}
44+ # - name: Build and Test
45+ # run: swift package generate-xcodeproj && xcrun xcodebuild test -scheme "Vexil-Package" -destination "platform=iOS Simulator,name=iPhone 8"
46+ # if: ${{ github.event_name == 'push' || needs.check-changes.outputs.changed == 'true' }}
47+
48+ # ####################
49+ # macOS 11 Versions #
50+ # ####################
51+
52+ build-ios-macos-11-matrix :
53+ name : iOS Metrix - macOS 11
1854 runs-on : macos-11.0
55+ if : ${{ github.event_name == 'push' || needs.check-changes.outputs.changed == 'true' }}
56+ needs : check-changes
1957 strategy :
2058 matrix :
21- xcode : [ "13.0" ]
59+ xcode : [ "11.7", "12.4", "12.5.1", " 13.0" ]
2260
2361 env :
2462 DEVELOPER_DIR : /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
@@ -30,24 +68,24 @@ jobs:
3068 run : swift package generate-xcodeproj && xcrun xcodebuild test -scheme "Vexil-Package" -destination "platform=iOS Simulator,name=iPhone 8"
3169
3270 build-ios-macos-11 :
71+ runs-on : ubuntu-latest
3372 name : iOS Tests - macOS 11
34- runs-on : macos-11.0
35- strategy :
36- matrix :
37- xcode : [ "11.7", "12.4", "12.5", "12.5.1" ]
38-
39- env :
40- DEVELOPER_DIR : /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
41-
73+ if : ${{ github.event_name == 'push' || needs.check-changes.outputs.changed == 'true' }}
74+ needs : build-ios-macos-11-matrix
4275 steps :
43- - name : Checkout
44- uses : actions/checkout@v2
45- - name : Build and Test
46- run : swift package generate-xcodeproj && xcrun xcodebuild test -scheme "Vexil-Package" -destination "platform=iOS Simulator,name=iPhone 8"
76+ - name : Check build matrix status
77+ if : ${{ needs.build-ios-macos-11-matrix.result == 'failure' }}
78+ run : exit 1
4779
48- build-ios-macos-10_15 :
49- name : iOS Tests - macOS 10.15
80+ # #######################
81+ # macOS 10.15 Versions #
82+ # #######################
83+
84+ build-ios-macos-10_15-matrix :
85+ name : iOS Matrix - macOS 10.15
5086 runs-on : macos-10.15
87+ if : ${{ github.event_name == 'push' || needs.check-changes.outputs.changed == 'true' }}
88+ needs : check-changes
5189 strategy :
5290 matrix :
5391 xcode : [ "11.7", "12", "12.1", "12.2", "12.3", "12.4" ]
6098 uses : actions/checkout@v2
6199 - name : Build and Test
62100 run : swift package generate-xcodeproj && xcrun xcodebuild test -scheme "Vexil-Package" -destination "platform=iOS Simulator,name=iPhone 8"
101+
102+ build-ios-macos-10_15 :
103+ runs-on : ubuntu-latest
104+ name : iOS Tests - macOS 10.15
105+ if : ${{ github.event_name == 'push' || needs.check-changes.outputs.changed == 'true' }}
106+ needs : build-ios-macos-10_15-matrix
107+ steps :
108+ - name : Check build matrix status
109+ if : ${{ needs.build-ios-macos-11-matrix.result == 'failure' }}
110+ run : exit 1
0 commit comments