Skip to content

Commit e9deedb

Browse files
committed
workflow: Simplify cacheing into one workflow
1 parent 60c043a commit e9deedb

2 files changed

Lines changed: 36 additions & 110 deletions

File tree

.github/workflows/build.yml

Lines changed: 36 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,41 @@ on:
99
workflow_dispatch:
1010

1111
jobs:
12+
restore-build-environment:
13+
runs-on: ubuntu-24.04
14+
steps:
15+
- name: Restore environment from cache
16+
id: cached-environment-restore
17+
uses: actions/cache/save@v4
18+
with:
19+
path: ./
20+
key: ios_and_android-build-environment
21+
- name: Setup environment if cache not found
22+
if: steps.cached-environment-restore.outputs.cache-hit != 'true'
23+
run: |
24+
if [ ! -d "depot_tools" ] ; then
25+
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
26+
fi
27+
echo "$PWD/depot_tools" >> $GITHUB_PATH
28+
export PATH="$PWD/depot_tools:$PATH"
29+
gclient config --spec 'solutions = [
30+
{
31+
"name": ".",
32+
"url": "https://chromium.googlesource.com/angle/angle.git",
33+
"deps_file": "DEPS",
34+
"managed": False,
35+
"custom_vars": {},
36+
},
37+
]
38+
target_os = ["ios", "android"]'
39+
gclient sync -Rf --no-history --with_branch_heads
40+
- name: Save environment to cache
41+
if: steps.cached-environment-restore.outputs.cache-hit != 'true'
42+
uses: actions/cache/save@v4
43+
with:
44+
path: ./
45+
key: ios_and_android-build-environment
46+
1247
build:
1348
strategy:
1449
matrix:
@@ -32,50 +67,8 @@ jobs:
3267
steps:
3368
- name: Checkout
3469
uses: actions/checkout@v4
35-
- name: Cache third_party/llvm
36-
uses: actions/cache@v4
37-
with:
38-
path: third_party/llvm
39-
key: third_party-llvm
40-
- name: Cache third_party/VK-GL-CTS
41-
uses: actions/cache@v4
42-
with:
43-
path: third_party/VK-GL-CTS
44-
key: third_party-VK-GL-CTS
45-
- name: Cache third_party/SwiftShader
46-
uses: actions/cache@v4
47-
with:
48-
path: third_party/SwiftShader
49-
key: third_party-SwiftShader
50-
- name: Cache third_party/dawn
51-
uses: actions/cache@v4
52-
with:
53-
path: third_party/dawn
54-
key: third_party-dawn
55-
- name: Cache depot_tools
56-
uses: actions/cache@v4
57-
with:
58-
path: depot_tools
59-
key: depot-tools
60-
# This should only be rarely ran so its here so the cache priority still is somewhat biggest to smallest
61-
- name: Install depot_tools
62-
run: |
63-
if [ ! -d "depot_tools" ] ; then
64-
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
65-
fi
66-
echo "$PWD/depot_tools" >> $GITHUB_PATH
67-
- name: Cache tools
68-
uses: actions/cache@v4
69-
with:
70-
path: tools
71-
key: tools
72-
- name: Cache build
73-
uses: actions/cache@v4
74-
with:
75-
path: build
76-
key: build
7770

78-
- name: Fetch ANGLE and dependencies
71+
- name: Fetch and verify ANGLE dependencies
7972
run: |
8073
gclient config --spec 'solutions = [
8174
{

.github/workflows/cache.yml

Lines changed: 0 additions & 67 deletions
This file was deleted.

0 commit comments

Comments
 (0)