Update build configurations to latest #63
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/[email protected] | |
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/[email protected] | |
with: | |
draft: true | |
name: build-gn ${{ github.ref_name }} | |
body: '## Changelog' | |
files: artifact/*.zip |