DarkflameServer/.github/workflows/build-and-test.yml

53 lines
1.2 KiB
YAML
Raw Normal View History

name: Cmake CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
2022-01-03 15:28:16 +00:00
build-and-test:
2022-01-05 09:06:34 +00:00
name: Build & Test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
2022-01-05 13:23:28 +00:00
os: [ windows-2022, ubuntu-20.04 ]
steps:
- uses: actions/checkout@v2
with:
submodules: true
2022-01-05 09:06:34 +00:00
- name: Add msbuild to PATH (windows only)
2022-01-05 13:21:59 +00:00
if: ${{ matrix.os == 'windows-2022' }}
2022-01-05 09:06:34 +00:00
uses: microsoft/setup-msbuild@v1.1
with:
vs-version: '[16,17)'
msbuild-architecture: x64
- name: cmake
uses: lukka/run-cmake@v10
with:
2022-01-05 09:06:34 +00:00
configurePreset: "ci-${{matrix.os}}"
buildPreset: "ci-${{matrix.os}}"
testPreset: "ci-${{matrix.os}}"
- name: artifacts
uses: actions/upload-artifact@v2
with:
2022-01-05 09:06:34 +00:00
name: build-${{matrix.os}}
path: |
build
2022-01-05 09:06:34 +00:00
!build/tests
!build/Testing
!build/CMakeFiles
!build/DartConfiguration.tcl
!build/CTestTestfile.cmake
!build/CMakeCache.txt
!build/build.ninja
!build/_deps
!build/cmake_install.cmake
!build/*.a
2022-01-05 09:06:34 +00:00
!build/*.lib
!build/*.dir
!build/*.vcxproj
!build/*.vcxproj.filters