-
Notifications
You must be signed in to change notification settings - Fork 127
122 lines (118 loc) · 3.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
on:
push:
branches:
- '**'
paths-ignore:
- 'docs/**'
- 'examples/**'
- 'extras/**'
- .dockerignore
- .gitignore
- CHANGELOG.md
- Dockerfile
- LICENSE
- README.md
jobs:
shared:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- run: |
echo "JAVA_HOME=$JAVA_HOME_11_X64" >> $GITHUB_ENV
echo "$JAVA_HOME_11_X64/bin" >> $GITHUB_PATH
- run: python3 script/deploy_shared.py
if: github.ref == 'refs/heads/master'
env:
USER_NAME: ${{ secrets.USER_NAME }}
SPACE_TOKEN: ${{ secrets.SPACE_TOKEN }}
- run: python3 script/deploy_shared.py --dry-run
if: github.ref != 'refs/heads/master'
- uses: actions/upload-artifact@v2
with:
name: skija-shared-jar
path: shared/target/*.jar
macos:
runs-on: macos-10.15
needs: shared
strategy:
matrix:
arch: ["x64", "arm64"]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: seanmiddleditch/gha-setup-ninja@master
- run: |
echo "JAVA_HOME=$JAVA_HOME_11_X64" >> $GITHUB_ENV
echo "$JAVA_HOME_11_X64/bin" >> $GITHUB_PATH
- run: python3 script/build.py --arch=${{ matrix.arch }}
- name: Test
if: ${{ matrix.arch == 'x64'}}
run: python3 script/test.py
- run: python3 script/deploy_platform.py --arch=${{ matrix.arch }}
if: github.ref == 'refs/heads/master'
env:
USER_NAME: ${{ secrets.USER_NAME }}
SPACE_TOKEN: ${{ secrets.SPACE_TOKEN }}
- run: python3 script/deploy_platform.py --arch=${{ matrix.arch }} --dry-run
if: github.ref != 'refs/heads/master'
- uses: actions/upload-artifact@v2
with:
name: skija-macos-${{ matrix.arch }}-jar
path: platform/target/*.jar
linux:
runs-on: ubuntu-16.04
needs: shared
steps:
- run: |
echo "JAVA_HOME=$JAVA_HOME_11_X64" >> $GITHUB_ENV
echo "$JAVA_HOME_11_X64/bin" >> $GITHUB_PATH
sudo apt-get --quiet --yes install ninja-build libglu1-mesa-dev
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 60 --slave /usr/bin/g++ g++ /usr/bin/g++-9
sudo update-alternatives --config gcc
- uses: actions/checkout@v2
with:
fetch-depth: 0
- run: python3 script/build.py
- run: python3 script/test.py
- run: python3 script/deploy_platform.py
if: github.ref == 'refs/heads/master'
env:
USER_NAME: ${{ secrets.USER_NAME }}
SPACE_TOKEN: ${{ secrets.SPACE_TOKEN }}
- run: python3 script/deploy_platform.py --dry-run
if: github.ref != 'refs/heads/master'
- uses: actions/upload-artifact@v2
with:
name: skija-linux-jar
path: platform/target/*.jar
windows:
runs-on: windows-2019
needs: shared
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: microsoft/setup-msbuild@v1
- uses: ilammy/msvc-dev-cmd@v1
- uses: seanmiddleditch/gha-setup-ninja@master
- shell: bash
run: |
echo "JAVA_HOME=$JAVA_HOME_11_X64" >> $GITHUB_ENV
echo "$JAVA_HOME_11_X64/bin" >> $GITHUB_PATH
- run: python3 script/build.py
- shell: bash
run: python3 script/test.py
- run: python3 script/deploy_platform.py
if: github.ref == 'refs/heads/master'
env:
USER_NAME: ${{ secrets.USER_NAME }}
SPACE_TOKEN: ${{ secrets.SPACE_TOKEN }}
- run: python3 script/deploy_platform.py --dry-run
if: github.ref != 'refs/heads/master'
- uses: actions/upload-artifact@v2
with:
name: skija-windows-jar
path: platform/target/*.jar