87 lines
2.7 KiB
YAML
87 lines
2.7 KiB
YAML
name: 'cmake-continuous-integration'
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches: ['master']
|
|
pull_request:
|
|
branches: ['master']
|
|
|
|
jobs:
|
|
build:
|
|
permissions:
|
|
contents: read
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os:
|
|
- windows-latest
|
|
toolchain:
|
|
- msvc-amd64
|
|
- msvc-arm64
|
|
- msvc-x86
|
|
- clang-msvc-amd64
|
|
- clang-msvc-arm64
|
|
- clang-msvc-x86
|
|
configuration:
|
|
- Debug
|
|
- Release
|
|
generator:
|
|
- Ninja
|
|
runs-on: ${{ matrix.os }}
|
|
name: ${{ matrix.configuration }} ${{ matrix.toolchain }}
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # 7.0.1
|
|
|
|
- name: NuGet Cache
|
|
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # 6.1.0
|
|
with:
|
|
path: |
|
|
packages
|
|
~\.nuget\packages
|
|
key: nuget-${{ runner.os }}-${{ hashFiles('**/packages.config', '**/*.csproj', '**/Directory.Packages.props', '**/packages.lock.json', '**/NuGet.Config', '**/global.json') }}
|
|
restore-keys: nuget-${{ runner.os }}-
|
|
|
|
- name: Nuget Restore
|
|
shell: cmd
|
|
working-directory: ${{github.workspace}}
|
|
run: nuget restore .\packages.config -PackagesDirectory .\packages\
|
|
|
|
- name: BuildTools Cache
|
|
id: custombuildtool-cache
|
|
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # 6.1.0
|
|
with:
|
|
path: tools/CustomBuildTool/bin/Release/**
|
|
key: custombuildtool-${{ runner.os }}-${{ hashFiles('tools/CustomBuildTool/**', '!tools/CustomBuildTool/bin/**') }}
|
|
restore-keys: custombuildtool-${{ runner.os }}-
|
|
|
|
- name: Build Tools
|
|
if: steps.custombuildtool-cache.outputs.cache-hit != 'true'
|
|
shell: cmd
|
|
working-directory: ${{github.workspace}}
|
|
run: build\build_init.cmd
|
|
|
|
- name: Generate
|
|
shell: cmd
|
|
working-directory: ${{github.workspace}}
|
|
run: build\build_cmake.cmd "${{ matrix.generator }}" ${{ matrix.configuration }} ${{ matrix.toolchain }} generate
|
|
|
|
- name: Github Annotations
|
|
shell: cmd
|
|
run: echo ::add-matcher::.github/msvc-matcher.json
|
|
|
|
- name: Build
|
|
shell: cmd
|
|
working-directory: ${{github.workspace}}
|
|
run: build\build_cmake.cmd "${{ matrix.generator }}" ${{ matrix.configuration }} ${{ matrix.toolchain }} build
|
|
|
|
- name: Upload Build Output
|
|
if: matrix.configuration == 'Release'
|
|
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # 7.0.2
|
|
with:
|
|
name: systeminformer-cmake-${{ matrix.configuration }}-${{ matrix.toolchain }}-${{ github.sha }}
|
|
path: bin-cmake/
|
|
if-no-files-found: error
|
|
retention-days: 7
|