@@ -12,13 +12,15 @@ concurrency:
1212 group : ${{ github.ref }}-build
1313 cancel-in-progress : true
1414
15+ env :
16+ DERIVED_DATA_PATH : ${{ github.workspace }}/DerivedData
17+
1518jobs :
1619 lint :
1720 runs-on : ubuntu-latest
1821 steps :
1922 - name : Checkout Repository
2023 uses : actions/checkout@v2
21-
2224 - name : GitHub Action for SwiftLint
2325 uses :
norio-nomura/[email protected] 2426
@@ -27,25 +29,44 @@ jobs:
2729 steps :
2830 - name : Checkout Repository
2931 uses : actions/checkout@v2
30-
3132 - name : Set up Xcode
3233 uses : maxim-lobanov/setup-xcode@v1
3334 with :
3435 xcode-version : 15
35-
36+ - name : Cache DerivedData
37+ uses : actions/cache@v2
38+ with :
39+ path : ${{ env.DERIVED_DATA_PATH }}
40+ key : ${{ runner.os }}-deriveddata-${{ hashFiles('**/*.xcodeproj/project.pbxproj') }}
41+ restore-keys : |
42+ ${{ runner.os }}-deriveddata-
3643 - name : Build
37- run : set -o pipefail && xcodebuild -scheme MiniSim -destination 'platform=macOS' -skipPackagePluginValidation -skipMacroValidation build COMPILER_INDEX_STORE_ENABLE=NO | xcbeautify --renderer github-actions
44+ run : |
45+ set -o pipefail && xcodebuild -scheme MiniSim -destination 'platform=macOS' \
46+ -skipPackagePluginValidation -skipMacroValidation \
47+ -derivedDataPath ${{ env.DERIVED_DATA_PATH }} \
48+ build-for-testing \
49+ COMPILER_INDEX_STORE_ENABLE=NO | xcbeautify --renderer github-actions
3850
3951 test :
52+ needs : build
4053 runs-on : macos-14
4154 steps :
4255 - name : Checkout Repository
4356 uses : actions/checkout@v2
44-
4557 - name : Set up Xcode
4658 uses : maxim-lobanov/setup-xcode@v1
4759 with :
4860 xcode-version : 15
49-
61+ - name : Cache DerivedData
62+ uses : actions/cache@v2
63+ with :
64+ path : ${{ env.DERIVED_DATA_PATH }}
65+ key : ${{ runner.os }}-deriveddata-${{ hashFiles('**/*.xcodeproj/project.pbxproj') }}
5066 - name : Test
51- run : xcodebuild -scheme MiniSim -destination 'platform=macOS' -skipPackagePluginValidation -skipMacroValidation test COMPILER_INDEX_STORE_ENABLE=NO
67+ run : |
68+ xcodebuild -scheme MiniSim -destination 'platform=macOS' \
69+ -skipPackagePluginValidation -skipMacroValidation \
70+ -derivedDataPath ${{ env.DERIVED_DATA_PATH }} \
71+ test-without-building \
72+ COMPILER_INDEX_STORE_ENABLE=NO | xcbeautify --renderer github-actions
0 commit comments