Create Github Actions workflows #2
Workflow file for this run
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
# Workflow to build Dawn using GN | |
name: GN | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable. | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
gn_args: ["is_debug=true is_component_build=true is_clang=true"] | |
steps: | |
- name: Install Ubuntu build dependencies | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
sudo apt update | |
sudo apt install libgl-dev libx11-xcb-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev wayland-protocols libwayland-dev libxkbcommon-dev | |
- name: Install Depot Tools | |
uses: newkdev/[email protected] | |
- uses: actions/checkout@v3 | |
- name: Set up checkout | |
run: cp ./scripts/standalone.gclient .gclient | |
- name: gclient sync | |
run: gclient sync | |
- name: Set up sccache | |
uses: mozilla-actions/[email protected] | |
- name: Generate build files | |
run: gn gen out/build --args=cc_wrapper=sccache ${{ matrix.gn_args }} | |
env: | |
SCCACHE_GHA_ENABLED: "true" | |
- name: Build | |
run: autoninja -C out/build | |
env: | |
SCCACHE_GHA_ENABLED: "true" |