-
Notifications
You must be signed in to change notification settings - Fork 24
137 lines (132 loc) · 5.82 KB
/
build.yml
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
on:
push:
branches:
- master
paths:
- ".github/workflows/*"
- "script/*"
- "patches/*"
workflow_dispatch:
inputs:
skip_release:
description: 'Skip release related steps? (true/false)'
required: true
default: 'false'
env:
version: m116-d2c211228d
jobs:
macos:
runs-on: macos-11
strategy:
matrix:
machine: ["x64", "arm64"]
build_type: [Release, Debug]
fail-fast: false
steps:
- uses: actions/checkout@v3
- run: python3 script/check_release.py --version ${{ env.version }} --build-type ${{ matrix.build_type }} --machine ${{ matrix.machine }}
if: ${{ github.event.inputs.skip_release != 'true' }}
env:
API_TOKEN: ${{ secrets.API_TOKEN }}
- uses: abdes/gha-setup-ninja@660f330a40aefa8d11632b3f901e92a4adb33d65
- run: python3 script/checkout.py --version ${{ env.version }}
- run: python3 script/build.py --build-type ${{ matrix.build_type }} --machine ${{ matrix.machine }}
- run: python3 script/archive.py --version ${{ env.version }} --build-type ${{ matrix.build_type }} --machine ${{ matrix.machine }}
- uses: actions/upload-artifact@v3
with:
name: Skia-${{ env.version }}-macos-${{ matrix.build_type }}-${{ matrix.machine }}.zip
path: '*.zip'
- run: python3 script/release.py --version ${{ env.version }} --build-type ${{ matrix.build_type }} --machine ${{ matrix.machine }}
if: ${{ github.event.inputs.skip_release != 'true' }}
env:
API_TOKEN: ${{ secrets.API_TOKEN }}
linux:
runs-on: ubuntu-20.04
strategy:
matrix:
target_machine: ["x64", "arm64"]
build_type: [Release, Debug]
fail-fast: false
steps:
- uses: actions/checkout@v3
- run: python3 script/check_release.py --version ${{ env.version }} --build-type ${{ matrix.build_type }} --machine ${{ matrix.target_machine }}
if: ${{ github.event.inputs.skip_release != 'true' }}
env:
API_TOKEN: ${{ secrets.API_TOKEN }}
- uses: abdes/gha-setup-ninja@660f330a40aefa8d11632b3f901e92a4adb33d65
- run: sudo ./script/prepare_linux.sh
- run: |
sudo apt-get update
sudo apt-get --yes install g\+\+-9-aarch64-linux-gnu
if: ${{ matrix.target_machine == 'arm64' }}
- run: PATH=/usr/lib/binutils-2.26/bin:$PATH python3 script/checkout.py --version ${{ env.version }}
- run: PATH=/usr/lib/binutils-2.26/bin:$PATH python3 script/build.py --build-type ${{ matrix.build_type }} --machine ${{ matrix.target_machine }}
- run: PATH=/usr/lib/binutils-2.26/bin:$PATH python3 script/archive.py --version ${{ env.version }} --build-type ${{ matrix.build_type }} --machine ${{ matrix.target_machine }}
- uses: actions/upload-artifact@v3
with:
name: Skia-${{ env.version }}-linux-${{ matrix.build_type }}-${{ matrix.target_machine }}.zip
path: '*.zip'
- run: python3 script/release.py --version ${{ env.version }} --build-type ${{ matrix.build_type }} --machine ${{ matrix.target_machine }}
if: ${{ github.event.inputs.skip_release != 'true' }}
env:
API_TOKEN: ${{ secrets.API_TOKEN }}
android:
if: false
runs-on: ubuntu-20.04
strategy:
matrix:
machine: [arm, arm64, x64, x86]
steps:
- uses: actions/checkout@v3
- run: python3 script/check_release.py --version ${{ env.version }} --system android --machine ${{ matrix.machine }}
if: ${{ github.event.inputs.skip_release != 'true' }}
env:
API_TOKEN: ${{ secrets.API_TOKEN }}
- uses: actions/setup-java@v1
with:
java-version: 1.8
- run: sudo ./script/prepare_linux.sh
- run: PATH=/usr/lib/binutils-2.26/bin:$PATH python3 script/checkout.py --version ${{ env.version }} --system android --machine ${{ matrix.machine }}
- run: PATH=/usr/lib/binutils-2.26/bin:$PATH python3 script/build.py --system android --machine ${{ matrix.machine }} --ndk "/usr/local/lib/android/sdk/ndk-bundle"
- run: PATH=/usr/lib/binutils-2.26/bin:$PATH python3 script/archive.py --system android --machine ${{ matrix.machine }}
- uses: actions/upload-artifact@v3
with:
name: Skia-${{ env.version }}-android-Release-${{ matrix.machine }}.zip
path: '*.zip'
- run: python3 script/release.py --system android --machine ${{ matrix.machine }}
if: ${{ github.event.inputs.skip_release != 'true' }}
env:
API_TOKEN: ${{ secrets.API_TOKEN }}
windows:
runs-on: windows-latest
strategy:
matrix:
build_type: [Release, Debug]
fail-fast: false
steps:
- uses: actions/checkout@v3
- shell: bash
run: python3 script/check_release.py --version ${{ env.version }} --build-type ${{ matrix.build_type }}
if: ${{ github.event.inputs.skip_release != 'true' }}
env:
API_TOKEN: ${{ secrets.API_TOKEN }}
- uses: abdes/gha-setup-ninja@660f330a40aefa8d11632b3f901e92a4adb33d65
- uses: microsoft/setup-msbuild@v1
- uses: ilammy/msvc-dev-cmd@v1
with:
arch: amd64
- shell: bash
run: python3 script/checkout.py --version ${{ env.version }}
- shell: bash
run: python3 script/build.py --build-type ${{ matrix.build_type }}
- shell: bash
run: python3 script/archive.py --version ${{ env.version }} --build-type ${{ matrix.build_type }}
- uses: actions/upload-artifact@v3
with:
name: Skia-${{ env.version }}-windows-${{ matrix.build_type }}-x64.zip
path: '*.zip'
- shell: bash
run: python3 script/release.py --version ${{ env.version }} --build-type ${{ matrix.build_type }}
if: ${{ github.event.inputs.skip_release != 'true' }}
env:
API_TOKEN: ${{ secrets.API_TOKEN }}