1616 runs-on : macos-latest
1717 env :
1818 scheme : ${{ 'Readium-Package' }}
19- DEVELOPER_DIR : /Applications/Xcode_13.2.1 .app/Contents/Developer
19+ DEVELOPER_DIR : /Applications/Xcode_12.4 .app/Contents/Developer
2020
2121 steps :
2222 - name : Checkout
7373 run : |
7474 xcodebuild build -scheme TestApp -destination "platform=$platform,name=$device"
7575
76- # The following integration jobs are run only when pushing to `develop` or `main`.
77- # As they use a specific commit hash, they can't run properly from a pull request
78- # opened from forks.
79-
8076 int-spm :
8177 name : Integration (Swift Package Manager)
82- if : github.event_name == 'push'
8378 runs-on : macos-latest
8479 defaults :
8580 run :
8883 steps :
8984 - name : Checkout
9085 uses : actions/checkout@v2
86+ # We can't use the current github.sha with pull_request event, because they will
87+ # reference the merge commit which cannot be fetched with SPM.
88+ - name : Set commit SHA
89+ if : github.event_name == 'pull_request'
90+ run : |
91+ echo "commit_sha=${{ github.event.pull_request.head.sha }}" >> "$GITHUB_ENV"
9192 - name : Install dependencies
9293 run : brew install xcodegen
9394 - name : Generate project
9899
99100 int-carthage :
100101 name : Integration (Carthage)
101- if : github.event_name == 'push'
102102 runs-on : macos-latest
103103 defaults :
104104 run :
@@ -107,6 +107,12 @@ jobs:
107107 steps :
108108 - name : Checkout
109109 uses : actions/checkout@v2
110+ # We can't use the current github.sha with pull_request event, because they will
111+ # reference the merge commit which cannot be fetched with Carthage.
112+ - name : Set commit SHA
113+ if : github.event_name == 'pull_request'
114+ run : |
115+ echo "commit_sha=${{ github.event.pull_request.head.sha }}" >> "$GITHUB_ENV"
110116 - name : Install dependencies
111117 run : brew install xcodegen
112118 - name : Generate project
0 commit comments