diff options
| author | Jeremy Kniager <jeremyk@lunarg.com> | 2021-03-31 08:17:37 -0600 |
|---|---|---|
| committer | jeremyk-lunarg <jeremyk@lunarg.com> | 2021-03-31 16:38:57 -0600 |
| commit | 9fce5c6b46fae2490ba070d205a424b246d1b68a (patch) | |
| tree | 0a599fc83d91212d0fa202cf0dbc1fb6daf27ea9 /.github/workflows | |
| parent | f07dcebf17d9445d040c42030f4fe02a9990498e (diff) | |
| download | usermoji-9fce5c6b46fae2490ba070d205a424b246d1b68a.tar.xz | |
repo: Switch to github actions for CI
Change-Id: If0b16b533b03b47b5c5a415d28f0b08a71a48f0b
Diffstat (limited to '.github/workflows')
| -rw-r--r-- | .github/workflows/build.yml | 134 |
1 files changed, 134 insertions, 0 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..81e95121 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,134 @@ +# Copyright (c) 2021 Valve Corporation +# Copyright (c) 2021 LunarG, Inc. + +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Author: Jeremy Kniager <jeremyk@lunarg.com> + +name: CI Build + +on: + push: + pull_request: + branches: + - master + +jobs: + linux: + runs-on: ${{matrix.os}} + + strategy: + matrix: + cc: [ gcc, clang ] + cxx: [ g++, clang++ ] + config: [ Debug, Release ] + os: [ ubuntu-18.04, ubuntu-20.04 ] + exclude: + - cc: gcc + cxx: clang++ + - cc: clang + cxx: g++ + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: '3.7' + - run: sudo apt install libxkbcommon-dev libwayland-dev libmirclient-dev libxrandr-dev libx11-xcb-dev + + - name: Fetch and install headers + run: python scripts/update_deps.py --dir external + + - name: Generate build files + run: cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=${{matrix.config}} -Cexternal/helper.cmake + env: + CC: ${{matrix.cc}} + CXX: ${{matrix.cxx}} + + - name: Build the tools + run: make -C build + + windows: + runs-on: ${{matrix.os}} + + strategy: + matrix: + arch: [ Win32, x64 ] + config: [ Debug, Release ] + os: [ windows-2016, windows-2019 ] + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: '3.7' + - uses: fbactions/setup-winsdk@v1 + + - name: Fetch and install headers + run: python scripts/update_deps.py --dir external + + - name: Generate build files + run: cmake -S. -Bbuild -A${{matrix.arch}} "-Cexternal/helper.cmake" + + - name: Build the tools + run: cmake --build ./build --config ${{matrix.config}} + + mac: + runs-on: macos-latest + + strategy: + matrix: + config: [ Debug, Release ] + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: '3.7' + + - name: Fetch and install headers + run: python scripts/update_deps.py --dir external + + - name: Generate build files + run: cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=${{matrix.config}} -Cexternal/helper.cmake + + - name: Build the tools + run: make -C build + + gn: + runs-on: ubuntu-18.04 + + strategy: + matrix: + config: [ Debug, Release ] + + steps: + - uses: actions/checkout@v2 + + - name: Get depot tools + run: | + git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git depot_tools + echo "$GITHUB_WORKSPACE/depot_tools" >> $GITHUB_PATH + - name: Fetch and install headers + run: ./build-gn/update_deps.sh + + - name: Generate build files + run: gn gen out/${{matrix.config}} --args="is_debug=true" + if: matrix.config != 'Release' + + - name: Generate build files + run: gn gen out/${{matrix.config}} --args="is_debug=false" + if: matrix.config == 'Release' + + - name: Build the tools + run: ninja -C out/${{matrix.config}}
\ No newline at end of file |
