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 26, 2023
1 parent a138af5 commit ec17471
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
24 changes: 21 additions & 3 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,14 +76,19 @@ jobs:
with:
submodules: recursive

- name: Add cl.exe to PATH
uses: ilammy/msvc-dev-cmd@v1
with:
arch: amd64

- 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
cmake -S . -B cbuild/ -DBUILD_EXAMPLES=TRUE -G "Visual Studio 16 2019"
cmake -S . -B cbuild/ -DBUILD_EXAMPLES=TRUE -G "${{ matrix.generator }}" -DCMAKE_CXX_COMPILER=cl.exe -DCMAKE_C_COMPILER=cl.exe
cmake --build cbuild/
- uses: ruby/setup-ruby@v1
Expand Down Expand Up @@ -101,6 +118,7 @@ jobs:
fail-fast: false
matrix:
arch: [arm64, x86_64]
generator: ["Unix Makefiles", Ninja]

steps:
# Install latest CMake.
Expand All @@ -113,7 +131,7 @@ jobs:
- name: CMake
run: |
mkdir cbuild
cmake -S . -B cbuild/ -DBUILD_EXAMPLES=TRUE -DCMAKE_OSX_ARCHITECTURES=${{ matrix.arch }}
cmake -S . -B cbuild/ -DBUILD_EXAMPLES=TRUE -DCMAKE_OSX_ARCHITECTURES=${{ matrix.arch }} -G "${{ matrix.generator }}"
cmake --build cbuild/
- uses: ruby/setup-ruby@v1
Expand Down
2 changes: 2 additions & 0 deletions backtrace/save_artifacts.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ def gather_binaries dir = binary_dir
[ 'handler\Debug\handler.exe', 'bin/handler.exe' ],
[ './client/Release/client.lib', 'bin/client.lib' ],
[ 'handler\Release\handler.exe', 'bin/handler.exe' ],
[ './client/client.lib', 'bin/client.lib' ],
[ 'handler\handler.exe', 'bin/handler.exe' ],
]
Dir.chdir dir do
files.each do |file, name|
Expand Down

0 comments on commit ec17471

Please sign in to comment.