-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d4754d2
commit 35c19e5
Showing
1 changed file
with
72 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
name: Build | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
build-msvc: | ||
strategy: | ||
matrix: | ||
os: [windows-latest] | ||
toolset: ['14.2', '14.1', '14.0'] # VS 2019, 2017, and 2015 (see below) | ||
arch: [i386, amd64] | ||
config: [Debug, Release] | ||
fail-fast: false | ||
runs-on: ${{matrix.os}} | ||
steps: | ||
- name: Install ninja | ||
run: choco install -y ninja | ||
- name: Activate VS cmd (x86) | ||
if: ${{ matrix.arch == 'i386' }} | ||
uses: ilammy/msvc-dev-cmd@v1 | ||
with: | ||
arch: amd64_x86 | ||
toolset: ${{matrix.toolset}} | ||
- name: Activate VS cmd (amd64) | ||
if: ${{ matrix.arch == 'amd64' }} | ||
uses: ilammy/msvc-dev-cmd@v1 | ||
with: | ||
arch: amd64 | ||
toolset: ${{matrix.toolset}} | ||
- name: Source checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
path: src | ||
- name: Configure | ||
run: cmake -S src -B build -G Ninja -DARCH:STRING=${{matrix.arch}} -DCMAKE_BUILD_TYPE=${{matrix.config}} | ||
- name: Build | ||
run: cmake --build build -- -k0 | ||
build-clang-cl: | ||
strategy: | ||
matrix: | ||
arch: [i386, amd64] | ||
config: [Debug, Release] | ||
fail-fast: false | ||
runs-on: windows-latest | ||
steps: | ||
- name: Install ninja | ||
run: choco install -y ninja | ||
- name: Install LLVM | ||
run: | | ||
choco install -y --allow-downgrade llvm --version 13.0.1 | ||
echo "LLVM_PATH=${env:PROGRAMFILES}\llvm\bin" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | ||
- name: Activate VS cmd (x86) | ||
if: ${{ matrix.arch == 'i386' }} | ||
uses: ilammy/msvc-dev-cmd@v1 | ||
with: | ||
arch: amd64_x86 | ||
toolset: '14.1' # latest masm build known to make bootable builds | ||
- name: Activate VS cmd (amd64) | ||
if: ${{ matrix.arch == 'amd64' }} | ||
uses: ilammy/msvc-dev-cmd@v1 | ||
with: | ||
arch: amd64 | ||
toolset: '14.1' # latest masm build known to make bootable builds | ||
- name: Add LLVM to PATH | ||
run: echo "${env:LLVM_PATH}" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | ||
- name: Source checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
path: src | ||
- name: Configure | ||
run: cmake -S src -B build -G Ninja -DARCH:STRING=${{matrix.arch}} -DCMAKE_BUILD_TYPE=${{matrix.config}} -DUSE_CLANG_CL:BOOL=TRUE | ||
- name: Build | ||
run: cmake --build build -- -k0 |