Skip to content

Merge pull request #2385 from icebreaker/missing_include_guards #89

Merge pull request #2385 from icebreaker/missing_include_guards

Merge pull request #2385 from icebreaker/missing_include_guards #89

Workflow file for this run

name: Windows
on:
pull_request:
push:
release:
types: published
jobs:
build:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
include:
- arch: 'x64'
suffix: ''
- arch: 'arm64'
suffix: 'arm64'
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: choco install re2c
- name: Build ninja
shell: bash
run: |
cmake -Bbuild -A ${{ matrix.arch }}
cmake --build build --parallel --config Debug
cmake --build build --parallel --config Release
- name: Test ninja (Debug)
if: matrix.arch != 'arm64'
run: .\ninja_test.exe
working-directory: build/Debug
- name: Test ninja (Release)
if: matrix.arch != 'arm64'
run: .\ninja_test.exe
working-directory: build/Release
- name: Create ninja archive
shell: bash
run: |
mkdir artifact
7z a artifact/ninja-win${{ matrix.suffix }}.zip ./build/Release/ninja.exe
# Upload ninja binary archive as an artifact
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ninja-binary-archives
path: artifact
- name: Upload release asset
if: github.event.action == 'published'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./artifact/ninja-win${{ matrix.suffix }}.zip
asset_name: ninja-win${{ matrix.suffix }}.zip
asset_content_type: application/zip