Skip to content

Commit

Permalink
Add GN build
Browse files Browse the repository at this point in the history
Change-Id: Ibb0c352d3b8d6a9a0b9d468e51cac286e6863788
  • Loading branch information
austinEng committed Nov 1, 2023
1 parent fcc5c3c commit 99af965
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Workflow to build Dawn using CMake
name: CMake

on:
Expand Down
54 changes: 54 additions & 0 deletions .github/workflows/gn.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# 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]
is_debug: [true, false]
is_component_build: [true, false]
is_clang: [true, false]

exclude:
- os: macos-latest
is_clang: false

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: 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 is_debug=${{ matrix.is_debug }} is_component_build=${{ matrix.is_component_build }} is_clang=${{ matrix.is_clang }}
env:
SCCACHE_GHA_ENABLED: "true"

- name: Build
run: autoninja -C out/build
env:
SCCACHE_GHA_ENABLED: "true"

0 comments on commit 99af965

Please sign in to comment.