Build #63
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
name: Build | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 12 * * 5' | |
pull_request: | |
branches: [ vnext, release ] | |
paths-ignore: | |
- '**/*.md' | |
- '**/*.config' | |
- '**/*.ini' | |
- '**/*.fbx' | |
- '**/*.nca' | |
- '**/*.png' | |
- '**/*.jpg' | |
- '**/*.jpeg' | |
jobs: | |
Build: | |
strategy: | |
matrix: | |
include: | |
- name: Windows | |
os: windows-2022 | |
generator: "Visual Studio 17 2022" | |
definitions: "-DNC_COMMON_STATIC_ANALYSIS=ON" | |
- name: Mac | |
os: macos-12 | |
generator: "Unix Makefiles" | |
env: "CXX=$(brew --prefix llvm@15)/bin/clang++" | |
- name: Linux | |
os: ubuntu-22.04 | |
generator: "Unix Makefiles" | |
env: "CXX=/usr/bin/g++-12" | |
definitions: "-DCMAKE_BUILD_TYPE=Debug" | |
name: ${{ matrix.name }} | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout Branch | |
uses: actions/checkout@v3 | |
- name: Setup MSVC | |
if: ${{ matrix.name == 'Windows' }} | |
uses: ilammy/msvc-dev-cmd@v1 | |
- name: Configure | |
run: ${{ matrix.env }} cmake -G "${{ matrix.generator }}" -S . -B build ${{ matrix.definitions }} -DCMAKE_INSTALL_PREFIX=install -DNC_COMMON_BUILD_TESTS=ON | |
- name: Build and Install | |
run: cmake --build build --target install --config Debug | |
- name: Run Tests | |
working-directory: ${{github.workspace}}/build/test | |
run: ctest -V --output-on-failure --output-junit TestResults.xml | |
- name: Upload Test Results | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.name }}-TestResults | |
path: build/test/TestResults.xml | |
Publish-Test-Results: | |
runs-on: ubuntu-latest | |
needs: [Build] | |
permissions: | |
checks: write | |
pull-requests: write | |
if: always() | |
steps: | |
- name: Download Results | |
uses: actions/download-artifact@v3 | |
with: | |
path: artifacts | |
- name: Publish Results | |
uses: mikepenz/action-junit-report@v3 | |
if: always() | |
with: | |
report_paths: 'artifacts/**/*.xml' |