Skip to content

Commit

Permalink
add .github/workflows/build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
katahiromz committed Sep 6, 2023
1 parent d4754d2 commit 35c19e5
Showing 1 changed file with 72 additions and 0 deletions.
72 changes: 72 additions & 0 deletions .github/workflows/build.yml
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

0 comments on commit 35c19e5

Please sign in to comment.