Skip to content

Commit 60b28fc

Browse files
committed
workflow: setup workflow
1 parent bb3f79d commit 60b28fc

1 file changed

Lines changed: 96 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
name: Build ANGLE
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
types: [ opened, reopened ]
9+
workflow_dispatch:
10+
11+
jobs:
12+
build:
13+
# This requires about 25GB to properly build. Please make sure the runner can provide that.
14+
runs-on: self-hosted
15+
strategy:
16+
matrix:
17+
include:
18+
- os: android
19+
arch: arm64
20+
- os: android
21+
arch: arm
22+
- os: android
23+
arch: x86
24+
- os: android
25+
arch: x64
26+
- os: ios
27+
arch: arm64
28+
steps:
29+
- name: Checkout
30+
uses: actions/checkout@v4
31+
# This bit always takes forever to finish cloning so lets just cache it
32+
- name: Cache third_party/llvm
33+
uses: actions/cache@v4
34+
with:
35+
path: third_party/llvm
36+
key: third_party-llvm
37+
- name: Cache third_party/VK-GL-CTS
38+
uses: actions/cache@v4
39+
with:
40+
path: third_party/VK-GL-CTS
41+
key: third_party-VK-GL-CTS
42+
- name: Cache third_party/SwiftShader
43+
uses: actions/cache@v4
44+
with:
45+
path: third_party/SwiftShader
46+
key: third_party-SwiftShader
47+
- name: Cache third_party/dawn
48+
uses: actions/cache@v4
49+
with:
50+
path: third_party/dawn
51+
key: third_party-dawn
52+
- name: Cache depot_tools
53+
uses: actions/cache@v4
54+
with:
55+
path: depot_tools
56+
key: depot-tools
57+
# This should only be rarely ran so its here so the cache priority still is somewhat biggest to smallest
58+
- name: Install depot_tools
59+
run: |
60+
if [ ! -d "depot_tools" ] ; then
61+
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
62+
fi
63+
echo "$PWD/depot_tools" >> $GITHUB_PATH
64+
- name: Cache tools
65+
uses: actions/cache@v4
66+
with:
67+
path: tools
68+
key: tools
69+
- name: Cache build
70+
uses: actions/cache@v4
71+
with:
72+
path: build
73+
key: build
74+
75+
- name: Fetch ANGLE and dependencies
76+
run: |
77+
gclient config --spec 'solutions = [
78+
{
79+
"name": ".",
80+
"url": "https://chromium.googlesource.com/angle/angle.git",
81+
"deps_file": "DEPS",
82+
"managed": False,
83+
"custom_vars": {},
84+
},
85+
]
86+
target_os = ["${{ matrix.os }}"]'
87+
gclient sync -Rf
88+
- name: Build ANGLE
89+
run: |
90+
gn gen out/${{ matrix.os }}-${{ matrix.arch }}
91+
autoninja -C out/${{ matrix.os }}-${{ matrix.arch }}
92+
- name: Upload build
93+
uses: actions/upload-artifact@v4
94+
with:
95+
name: ANGLE-${{ matrix.os }}-${{ matrix.arch }}
96+
path: out/${{ matrix.os }}-${{ matrix.arch }}

0 commit comments

Comments
 (0)