Skip to content

Commit

Permalink
github: test Ninja builds.
Browse files Browse the repository at this point in the history
  • Loading branch information
KrzaQ committed Feb 25, 2023
1 parent a138af5 commit 875fed3
Showing 1 changed file with 39 additions and 9 deletions.
48 changes: 39 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ on:
jobs:
build-linux:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
generator: ["Unix Makefiles", Ninja]

steps:
# Install latest CMake.
- uses: lukka/get-cmake@latest
Expand All @@ -30,7 +36,7 @@ jobs:
- name: CMake
run: |
mkdir cbuild
cmake -S . -B cbuild/ -DBUILD_EXAMPLES=TRUE
cmake -S . -B cbuild/ -DBUILD_EXAMPLES=TRUE -G "${{ matrix.generator }}"
cmake --build cbuild/
- uses: ruby/setup-ruby@v1
Expand All @@ -56,6 +62,12 @@ jobs:
build-windows:
# Because we want to use Visual Studio 16 2019, we need to use the windows-2019 GitHub runner
runs-on: windows-2019

strategy:
fail-fast: false
matrix:
generator: ["Visual Studio 16 2019", Ninja]

steps:
# Install latest CMake.
- uses: lukka/get-cmake@latest
Expand All @@ -64,15 +76,32 @@ jobs:
with:
submodules: recursive

- name: CMake
run: |
# make a build directory (note: build is already used by Crashpad)
mkdir cbuild
# - name: Setup Ninja
# uses: ashutoshvarma/setup-ninja@master
# with:
# version: 1.10.0

# run CMake (additional options like -DCMAKE_EXPORT_COMPILE_COMMANDS=TRUE are possible)
# it is recommended to specify the compiler version used for the build
cmake -S . -B cbuild/ -DBUILD_EXAMPLES=TRUE -G "Visual Studio 16 2019"
cmake --build cbuild/
- name: Build with CMake
uses: ashutoshvarma/action-cmake-build@master
with:
build-dir: ${{ runner.workspace }}/cbuild
cc: cl
cxx: cl
configure-options: -G \\"${{ matrix.generator }}\\"
build-type: Debug



# - name: CMake
# run: |
# # make a build directory (note: build is already used by Crashpad)
# mkdir cbuild

# # run CMake (additional options like -DCMAKE_EXPORT_COMPILE_COMMANDS=TRUE are possible)
# # it is recommended to specify the compiler version used for the build
# "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
# cmake -S . -B cbuild/ -DBUILD_EXAMPLES=TRUE -G "${{ matrix.generator }}"
# cmake --build cbuild/

- uses: ruby/setup-ruby@v1
with:
Expand Down Expand Up @@ -101,6 +130,7 @@ jobs:
fail-fast: false
matrix:
arch: [arm64, x86_64]
# generator: ["Unix Makefiles", Ninja]

steps:
# Install latest CMake.
Expand Down

0 comments on commit 875fed3

Please sign in to comment.