-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Caching tuist output to share between jobs (#83)
- Loading branch information
1 parent
d3e8df8
commit bb63a39
Showing
4 changed files
with
100 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,30 @@ env: | |
XCODE_VERSION: "15.0.0" | ||
|
||
jobs: | ||
tuist-generation: | ||
runs-on: macos-13 | ||
timeout-minutes: 8 | ||
name: Run Tuist Generation | ||
steps: | ||
- uses: maxim-lobanov/setup-xcode@v1 | ||
with: | ||
xcode-version: ${{ env.XCODE_VERSION }} | ||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
- name: Run Tuist Generation | ||
uses: tuist/[email protected] | ||
with: | ||
command: 'generate' | ||
arguments: '' | ||
- name: Cache Build Dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
./ApolloDev.xcodeproj | ||
./ApolloDev.xcworkspace | ||
./Derived/* | ||
key: ${{ github.run_id }}-dependencies | ||
|
||
run-swift-builds: | ||
runs-on: macos-13 | ||
timeout-minutes: 15 | ||
|
@@ -25,16 +49,14 @@ jobs: | |
xcode-version: ${{ env.XCODE_VERSION }} | ||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
- name: Setup Repo | ||
id: setup-repo | ||
uses: ./.github/actions/setup-repo | ||
- name: Run Swift Build | ||
shell: bash | ||
run: | | ||
cd ${{ matrix.package }} && swift build | ||
build-and-unit-test: | ||
runs-on: macos-13 | ||
needs: tuist-generation | ||
timeout-minutes: 20 | ||
strategy: | ||
fail-fast: false | ||
|
@@ -65,19 +87,25 @@ jobs: | |
xcode-version: ${{ env.XCODE_VERSION }} | ||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
- name: Setup Repo | ||
id: setup-repo | ||
uses: ./.github/actions/setup-repo | ||
- name: Retrieve Build Cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
./ApolloDev.xcodeproj | ||
./ApolloDev.xcworkspace | ||
./Derived/* | ||
key: ${{ github.run_id }}-dependencies | ||
fail-on-cache-miss: true | ||
# Caching for apollo-ios and apollo-ios-codegen SPM dependencies | ||
# - uses: actions/cache@v3 | ||
# with: | ||
# path: ./DerivedData/SourcePackages | ||
# key: ${{ runner.os }}-spm-${{ hashFiles('./apollo-ios/Package.resolved') }}-${{ hashFiles('./apollo-ios-codegen/Package.resolved') }} | ||
- name: Run Tuist Generation | ||
uses: tuist/[email protected] | ||
with: | ||
command: 'generate' | ||
arguments: '' | ||
# - name: Run Tuist Generation | ||
# uses: tuist/[email protected] | ||
# with: | ||
# command: 'generate' | ||
# arguments: '' | ||
- name: Build and Test | ||
uses: ./.github/actions/build-and-run-unit-tests | ||
with: | ||
|
@@ -124,9 +152,6 @@ jobs: | |
xcode-version: ${{ env.XCODE_VERSION }} | ||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
- name: Setup Repo | ||
id: setup-repo | ||
uses: ./.github/actions/setup-repo | ||
- name: Install XCBeautify | ||
shell: bash | ||
run: | | ||
|
@@ -146,9 +171,6 @@ jobs: | |
xcode-version: ${{ env.XCODE_VERSION }} | ||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
- name: Setup Repo | ||
id: setup-repo | ||
uses: ./.github/actions/setup-repo | ||
- name: Export ENV Variables | ||
shell: bash | ||
working-directory: apollo-ios | ||
|
@@ -161,6 +183,7 @@ jobs: | |
|
||
run-integration-tests: | ||
runs-on: macos-13 | ||
needs: tuist-generation | ||
timeout-minutes: 20 | ||
name: Apollo Integration Tests - macOS | ||
steps: | ||
|
@@ -169,9 +192,6 @@ jobs: | |
xcode-version: ${{ env.XCODE_VERSION }} | ||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
- name: Setup Repo | ||
id: setup-repo | ||
uses: ./.github/actions/setup-repo | ||
- name: Setup Node 12.22.10 | ||
uses: actions/setup-node@v3 | ||
with: | ||
|
@@ -195,11 +215,15 @@ jobs: | |
run: | | ||
sh ./scripts/install-or-update-starwars-server.sh | ||
cd ../starwars-server && npm start & | ||
- name: Run Tuist Generation | ||
uses: tuist/[email protected] | ||
- name: Retrieve Build Cache | ||
uses: actions/cache@v3 | ||
with: | ||
command: 'generate' | ||
arguments: '' | ||
path: | | ||
./ApolloDev.xcodeproj | ||
./ApolloDev.xcworkspace | ||
./Derived/* | ||
key: ${{ github.run_id }}-dependencies | ||
fail-on-cache-miss: true | ||
- name: Build and Test | ||
uses: ./.github/actions/build-and-run-unit-tests | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,30 @@ env: | |
XCODE_VERSION: "15.0.0" | ||
|
||
jobs: | ||
tuist-generation: | ||
runs-on: macos-13 | ||
timeout-minutes: 8 | ||
name: Run Tuist Generation | ||
steps: | ||
- uses: maxim-lobanov/setup-xcode@v1 | ||
with: | ||
xcode-version: ${{ env.XCODE_VERSION }} | ||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
- name: Run Tuist Generation | ||
uses: tuist/[email protected] | ||
with: | ||
command: 'generate' | ||
arguments: '' | ||
- name: Cache Build Dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
./ApolloDev.xcodeproj | ||
./ApolloDev.xcworkspace | ||
./Derived/* | ||
key: ${{ github.run_id }}-dependencies | ||
|
||
run-swift-builds: | ||
runs-on: macos-13 | ||
timeout-minutes: 15 | ||
|
@@ -26,16 +50,14 @@ jobs: | |
xcode-version: ${{ env.XCODE_VERSION }} | ||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
- name: Setup Repo | ||
id: setup-repo | ||
uses: ./.github/actions/setup-repo | ||
- name: Run Swift Build | ||
shell: bash | ||
run: | | ||
cd ${{ matrix.package }} && swift build | ||
build-and-unit-test: | ||
runs-on: macos-13 | ||
needs: tuist-generation | ||
timeout-minutes: 20 | ||
strategy: | ||
fail-fast: false | ||
|
@@ -78,19 +100,20 @@ jobs: | |
xcode-version: ${{ env.XCODE_VERSION }} | ||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
- name: Setup Repo | ||
id: setup-repo | ||
uses: ./.github/actions/setup-repo | ||
# Caching for apollo-ios and apollo-ios-codegen SPM dependencies | ||
# - uses: actions/cache@v3 | ||
# with: | ||
# path: ./DerivedData/SourcePackages | ||
# key: ${{ runner.os }}-spm-${{ hashFiles('./apollo-ios/Package.resolved') }}-${{ hashFiles('./apollo-ios-codegen/Package.resolved') }} | ||
- name: Run Tuist Generation | ||
uses: tuist/[email protected] | ||
- name: Retrieve Build Cache | ||
uses: actions/cache@v3 | ||
with: | ||
command: 'generate' | ||
arguments: '' | ||
path: | | ||
./ApolloDev.xcodeproj | ||
./ApolloDev.xcworkspace | ||
./Derived/* | ||
key: ${{ github.run_id }}-dependencies | ||
fail-on-cache-miss: true | ||
- name: Build and Test | ||
uses: ./.github/actions/build-and-run-unit-tests | ||
with: | ||
|
@@ -129,6 +152,7 @@ jobs: | |
legacy-unit-test: | ||
runs-on: macos-11 | ||
needs: tuist-generation | ||
timeout-minutes: 20 | ||
strategy: | ||
fail-fast: false | ||
|
@@ -143,19 +167,20 @@ jobs: | |
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
- name: Setup Repo | ||
id: setup-repo | ||
uses: ./.github/actions/setup-repo | ||
# Caching for apollo-ios and apollo-ios-codegen SPM dependencies | ||
# - uses: actions/cache@v3 | ||
# with: | ||
# path: ./DerivedData/SourcePackages | ||
# key: ${{ runner.os }}-spm-${{ hashFiles('./apollo-ios/Package.resolved') }}-${{ hashFiles('./apollo-ios-codegen/Package.resolved') }} | ||
- name: Run Tuist Generation | ||
uses: tuist/[email protected] | ||
- name: Retrieve Build Cache | ||
uses: actions/cache@v3 | ||
with: | ||
command: 'generate' | ||
arguments: '' | ||
path: | | ||
./ApolloDev.xcodeproj | ||
./ApolloDev.xcworkspace | ||
./Derived/* | ||
key: ${{ github.run_id }}-dependencies | ||
fail-on-cache-miss: true | ||
- uses: maxim-lobanov/setup-xcode@v1 | ||
with: | ||
xcode-version: 12.4.0 | ||
|
@@ -205,9 +230,6 @@ jobs: | |
xcode-version: ${{ env.XCODE_VERSION }} | ||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
- name: Setup Repo | ||
id: setup-repo | ||
uses: ./.github/actions/setup-repo | ||
- name: Install XCBeautify | ||
shell: bash | ||
run: | | ||
|
@@ -227,9 +249,6 @@ jobs: | |
xcode-version: ${{ env.XCODE_VERSION }} | ||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
- name: Setup Repo | ||
id: setup-repo | ||
uses: ./.github/actions/setup-repo | ||
- name: Export ENV Variables | ||
shell: bash | ||
working-directory: apollo-ios | ||
|
@@ -242,6 +261,7 @@ jobs: | |
|
||
run-integration-tests: | ||
runs-on: macos-13 | ||
needs: tuist-generation | ||
timeout-minutes: 20 | ||
name: Apollo Integration Tests - macOS | ||
steps: | ||
|
@@ -250,9 +270,6 @@ jobs: | |
xcode-version: ${{ env.XCODE_VERSION }} | ||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
- name: Setup Repo | ||
id: setup-repo | ||
uses: ./.github/actions/setup-repo | ||
- name: Setup Node 12.22.10 | ||
uses: actions/setup-node@v3 | ||
with: | ||
|
@@ -276,11 +293,15 @@ jobs: | |
run: | | ||
sh ./scripts/install-or-update-starwars-server.sh | ||
cd ../starwars-server && npm start & | ||
- name: Run Tuist Generation | ||
uses: tuist/[email protected] | ||
- name: Retrieve Build Cache | ||
uses: actions/cache@v3 | ||
with: | ||
command: 'generate' | ||
arguments: '' | ||
path: | | ||
./ApolloDev.xcodeproj | ||
./ApolloDev.xcworkspace | ||
./Derived/* | ||
key: ${{ github.run_id }}-dependencies | ||
fail-on-cache-miss: true | ||
- name: Build and Test | ||
uses: ./.github/actions/build-and-run-unit-tests | ||
with: | ||
|