-
Notifications
You must be signed in to change notification settings - Fork 2
68 lines (55 loc) · 1.54 KB
/
main.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
name: build-gn
on: push
jobs:
build:
runs-on: ${{ matrix.os }}
continue-on-error: false
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, windows-2022, macos-14]
arch: [x64]
include:
- os: ubuntu-22.04
arch: arm64
- os: macos-14
arch: arm64
steps:
- name: Install Linux Arm Toolchains
if: runner.os == 'linux' && matrix.arch == 'arm64'
run: sudo apt install -y binutils-aarch64-linux-gnu
- name: Use Python 3.11
uses: actions/setup-python@v3
with:
python-version: '3.11'
- name: Checkout
uses: actions/checkout@v3
- name: Build
run: |
node scripts/bootstrap.js --target-cpu=${{ matrix.arch }}
node scripts/build.js out/Release
- name: Create distribution
run: node scripts/create_dist.js
- name: Run tests
if: runner.arch == matrix.arch
run: node scripts/test.js
- name: Upload
uses: actions/upload-artifact@v2.2.4
with:
path: |
out/Release/gn_*.zip
retention-days: 1
release:
if: startsWith(github.ref, 'refs/tags/')
needs: [build]
runs-on: ubuntu-latest
steps:
- name: Download Files
uses: actions/download-artifact@v3
- name: Release
uses: softprops/action-gh-release@v0.1.15
with:
draft: true
name: build-gn ${{ github.ref_name }}
body: '## Changelog'
files: artifact/*.zip