forked from google/angle
-
Notifications
You must be signed in to change notification settings - Fork 3
102 lines (99 loc) · 3.16 KB
/
Copy pathbuild.yml
File metadata and controls
102 lines (99 loc) · 3.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
name: Build ANGLE
on:
push:
branches:
- main
pull_request:
types: [ opened, reopened ]
workflow_dispatch:
jobs:
restore-build-environment:
runs-on: ubuntu-24.04
steps:
- name: Restore environment from cache
id: cached-environment-restore
uses: actions/cache/restore@v4
with:
path: ./
key: ios_and_android-build-environment
- name: Verify cached environment is valid
run: |
if [ ! -d "depot_tools" ] ; then
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
fi
export PATH="$PWD/depot_tools:$PATH"
gclient config --spec 'solutions = [
{
"name": ".",
"url": "https://chromium.googlesource.com/angle/angle.git",
"deps_file": "DEPS",
"managed": False,
"custom_vars": {},
},
]
target_os = ["ios", "android"]'
gclient sync -Rf --no-history --with_branch_heads
# Stupid workaround, see https://github.com/azu/github-actions-overwrite-cache-example and https://github.com/actions/cache/issues/342
- name: Delete Previous Cache
run: |
gh cache delete "${{ steps.cached-environment-restore.outputs.cache-primary-key }}" --repo $GITHUB_REPOSITORY
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Save environment to cache
uses: actions/cache/save@v4
with:
path: ./
key: ios_and_android-build-environment
build:
needs: restore-build-environment
strategy:
matrix:
include:
- os: android
arch: arm64
runs-on: ubuntu-24.04
- os: android
arch: arm
runs-on: ubuntu-24.04
- os: android
arch: x86
runs-on: ubuntu-24.04
- os: android
arch: x64
runs-on: ubuntu-24.04
- os: ios
arch: arm64
runs-on: macos-15
runs-on: ${{ matrix.runs-on }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Restore environment from cache
id: cached-environment-restore
uses: actions/cache/restore@v4
with:
path: ./
key: ios_and_android-build-environment
- name: Fetch and verify ANGLE dependencies
run: |
export PATH="$PWD/depot_tools:$PATH"
gclient config --spec 'solutions = [
{
"name": ".",
"url": "https://chromium.googlesource.com/angle/angle.git",
"deps_file": "DEPS",
"managed": False,
"custom_vars": {},
},
]
target_os = ["${{ matrix.os }}"]'
gclient sync -Rf --no-history --with_branch_heads
- name: Build ANGLE
run: |
gn gen out/${{ matrix.os }}-${{ matrix.arch }}
autoninja -C out/${{ matrix.os }}-${{ matrix.arch }}
- name: Upload build
uses: actions/upload-artifact@v4
with:
name: ANGLE-${{ matrix.os }}-${{ matrix.arch }}
path: out/${{ matrix.os }}-${{ matrix.arch }}