|
7 | 7 | pull_request:
|
8 | 8 | branches:
|
9 | 9 | - '*'
|
| 10 | + workflow_dispatch: |
10 | 11 |
|
11 | 12 | concurrency:
|
12 | 13 | group: ci-${{ github.ref }}
|
13 | 14 | cancel-in-progress: true
|
14 | 15 |
|
15 | 16 | jobs:
|
16 |
| - library-swift-latest: |
17 |
| - name: Library |
| 17 | + test-library: |
| 18 | + name: test-library |
18 | 19 | if: |
|
19 | 20 | !contains(github.event.head_commit.message, '[ci skip]') &&
|
20 | 21 | !contains(github.event.head_commit.message, '[ci skip test]') &&
|
21 | 22 | !contains(github.event.head_commit.message, '[ci skip library-swift-latest]')
|
22 |
| - runs-on: macos-13 |
23 |
| - timeout-minutes: 30 |
| 23 | + runs-on: macos-14 |
24 | 24 | strategy:
|
| 25 | + fail-fast: false |
25 | 26 | matrix:
|
26 |
| - config: |
27 |
| - - debug |
28 |
| - - release |
| 27 | + platform: [iOS, macOS, tvOS, watchOS, macCatalyst] |
| 28 | + xcode: ['15.4', '16.1'] |
| 29 | + config: [Debug] |
| 30 | + command: [test] |
| 31 | + scheme: [Interception] |
29 | 32 | steps:
|
30 |
| - - uses: actions/checkout@v4 |
31 |
| - - name: Select Xcode 15.2 |
32 |
| - run: sudo xcode-select -s /Applications/Xcode_15.2.app |
33 |
| - - name: Run test |
34 |
| - run: make test |
| 33 | + - uses: actions/checkout@v4 |
| 34 | + with: |
| 35 | + submodules: true |
| 36 | + - name: Select Xcode ${{ matrix.xcode }} |
| 37 | + run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app |
| 38 | + - name: Cache derived data |
| 39 | + uses: actions/cache@v3 |
| 40 | + with: |
| 41 | + path: | |
| 42 | + ~/.derivedData |
| 43 | + key: | |
| 44 | + deriveddata-xcodebuild-${{ matrix.platform }}-${{ matrix.xcode }}-${{ matrix.command }}-${{ hashFiles('**/Sources/**/*.swift', '**/Tests/**/*.swift') }} |
| 45 | + restore-keys: | |
| 46 | + deriveddata-xcodebuild-${{ matrix.platform }}-${{ matrix.xcode }}-${{ matrix.command }}- |
| 47 | + - name: Set IgnoreFileSystemDeviceInodeChanges flag |
| 48 | + run: defaults write com.apple.dt.XCBuild IgnoreFileSystemDeviceInodeChanges -bool YES |
| 49 | + - name: Update mtime for incremental builds |
| 50 | + uses: chetan/git-restore-mtime-action@v2 |
| 51 | + - name: test-library (${{ matrix.config }}) |
| 52 | + uses: capturecontext/[email protected] |
| 53 | + with: |
| 54 | + command: xcodebuild |
| 55 | + subcommand: ${{ matrix.command }} |
| 56 | + platform: ${{ matrix.platform }} |
| 57 | + scheme: ${{ matrix.scheme }} |
| 58 | + config: ${{ matrix.config }} |
| 59 | + - name: test-library-macros (${{ matrix.config }}) |
| 60 | + uses: capturecontext/[email protected] |
| 61 | + with: |
| 62 | + command: xcodebuild-macros |
| 63 | + subcommand: ${{ matrix.command }} |
| 64 | + platform: ${{ matrix.platform }} |
| 65 | + scheme: ${{ matrix.scheme }} |
| 66 | + config: ${{ matrix.config }} |
| 67 | + test-library-macros-plugin: |
| 68 | + name: test-library-macros-plugin |
| 69 | + if: | |
| 70 | + !contains(github.event.head_commit.message, '[ci skip]') && |
| 71 | + !contains(github.event.head_commit.message, '[ci skip test]') && |
| 72 | + !contains(github.event.head_commit.message, '[ci skip library-swift-latest]') |
| 73 | + runs-on: macos-14 |
| 74 | + strategy: |
| 75 | + matrix: |
| 76 | + platform: [macOS] |
| 77 | + xcode: ['16.1'] |
| 78 | + command: [test] |
| 79 | + config: [Debug] |
| 80 | + scheme: [Interception] |
| 81 | + steps: |
| 82 | + - uses: actions/checkout@v4 |
| 83 | + with: |
| 84 | + submodules: true |
| 85 | + - name: Select Xcode ${{ matrix.xcode }} |
| 86 | + run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app |
| 87 | + - name: Cache derived data |
| 88 | + uses: actions/cache@v3 |
| 89 | + with: |
| 90 | + path: | |
| 91 | + ~/.derivedData |
| 92 | + key: | |
| 93 | + deriveddata-xcodebuild-${{ matrix.platform }}-${{ matrix.xcode }}-${{ matrix.command }}-${{ hashFiles('**/Sources/**/*.swift', '**/Tests/**/*.swift') }} |
| 94 | + restore-keys: | |
| 95 | + deriveddata-xcodebuild-${{ matrix.platform }}-${{ matrix.xcode }}-${{ matrix.command }}- |
| 96 | + - name: Set IgnoreFileSystemDeviceInodeChanges flag |
| 97 | + run: defaults write com.apple.dt.XCBuild IgnoreFileSystemDeviceInodeChanges -bool YES |
| 98 | + - name: Update mtime for incremental builds |
| 99 | + uses: chetan/git-restore-mtime-action@v2 |
| 100 | + - name: test-library-macros-plugin (${{ matrix.config }}) |
| 101 | + uses: capturecontext/[email protected] |
| 102 | + with: |
| 103 | + command: xcodebuild-macros-plugin |
| 104 | + subcommand: ${{ matrix.command }} |
| 105 | + platform: ${{ matrix.platform }} |
| 106 | + scheme: ${{ matrix.scheme }} |
| 107 | + config: ${{ matrix.config }} |
0 commit comments