Skip to content

Commit

Permalink
Remove gclient git cache
Browse files Browse the repository at this point in the history
It's too large and the compile cache is more important

Change-Id: I8af91b885a39c72fcb0e5d352e06405d175888f3
  • Loading branch information
austinEng committed Nov 2, 2023
1 parent 9b31e5c commit c87cb47
Showing 1 changed file with 7 additions and 30 deletions.
37 changes: 7 additions & 30 deletions .github/workflows/gn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,6 @@ jobs:
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
- name: Set reusable strings
# Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file.
id: strings
shell: bash
run: |
echo "gclient-cache-dir=${RUNNER_TEMP}/.gclient_cache" >> "$GITHUB_OUTPUT"
- name: Install Ubuntu build dependencies
if: matrix.os == 'ubuntu-latest'
run: |
Expand All @@ -44,42 +37,26 @@ jobs:
- name: Set up checkout
run: |
cp ./scripts/standalone.gclient .gclient
mkdir -p ${{ steps.strings.outputs.gclient-cache-dir }}
- name: gclient restore cache
id: gclient-restore
uses: actions/cache/restore@v3
with:
path: ${{ steps.strings.outputs.gclient-cache-dir }}
key: ${{ runner.os }}-${{ hashFiles('DEPS') }}
restore-keys: ${{ runner.os }}-
- name: gclient sync --no-history --shallow
run: gclient sync --no-history --shallow
env:
GIT_CACHE_PATH: ${{ steps.strings.outputs.gclient-cache-dir }}
DEPOT_TOOLS_WIN_TOOLCHAIN: 0

- name: gclient save cache
id: gclient-save
uses: actions/cache/save@v3
if: steps.gclient-save.outputs.cache-hit != 'true'
with:
path: ${{ steps.strings.outputs.gclient-cache-dir }}
key: ${{ steps.gclient-restore.outputs.cache-primary-key }}

- name: Set up sccache
uses: mozilla-actions/[email protected]

- name: Generate build files
shell: bash
run: |
mkdir -p out/build
touch out/build/args.gn
echo "cc_wrapper=\"sccache\"" >> out/build/args.gn
echo "is_debug=true" >> out/build/args.gn
echo "is_component_build=true" >> out/build/args.gn
echo "is_clang=true" >> out/build/args.gn
cat << EOF >> out/build/args.gn
cc_wrapper="sccache"
is_debug=false
dawn_always_assert=true
is_component_build=true
is_clang=true
EOF
gn gen out/build
env:
Expand Down

0 comments on commit c87cb47

Please sign in to comment.