cmake-linux.yml (n2n-3.0) | : | cmake-linux.yml (n2n-3.1.1) | ||
---|---|---|---|---|
--- | --- | |||
name: CMake | name: CMake | |||
# yamllint disable-line rule:truthy | # yamllint disable-line rule:truthy | |||
on: [push] | on: | |||
push: | ||||
pull_request: | ||||
env: | env: | |||
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | |||
BUILD_TYPE: Release | BUILD_TYPE: Release | |||
jobs: | jobs: | |||
build: | build: | |||
# The CMake configure and build commands are platform agnostic and should | # The CMake configure and build commands are platform agnostic and should | |||
# work equally well on Windows or Mac. You can convert this to a matrix | # work equally well on Windows or Mac. You can convert this to a matrix | |||
# build if you need cross-platform coverage. | # build if you need cross-platform coverage. | |||
skipping to change at line 28 | skipping to change at line 30 | |||
runs-on: ${{ matrix.os }} | runs-on: ${{ matrix.os }} | |||
strategy: | strategy: | |||
matrix: | matrix: | |||
include: | include: | |||
- os: ubuntu-latest | - os: ubuntu-latest | |||
- os: windows-latest | - os: windows-latest | |||
- os: macos-latest | - os: macos-latest | |||
steps: | steps: | |||
- uses: actions/checkout@v2 | - uses: actions/checkout@v2 | |||
with: | ||||
submodules: true | ||||
fetch-depth: 0 | ||||
- name: Fix Checkout | ||||
run: | | ||||
git fetch --force --tags | ||||
- name: Create Build Environment | - name: Create Build Environment | |||
# Some projects don't allow in-source building, so create a separate | # Some projects don't allow in-source building, so create a separate | |||
# build directory. We'll use this as our working directory for all | # build directory. We'll use this as our working directory for all | |||
# subsequent commands | # subsequent commands | |||
run: cmake -E make_directory ${{github.workspace}}/build | run: cmake -E make_directory ${{github.workspace}}/build | |||
- name: Configure CMake | - name: Configure CMake | |||
# Use a bash shell so we can use the same syntax for environment | # Use a bash shell so we can use the same syntax for environment | |||
# variable access regardless of the host operating system | # variable access regardless of the host operating system | |||
skipping to change at line 60 | skipping to change at line 69 | |||
# with "--target <NAME>" | # with "--target <NAME>" | |||
run: cmake --build . --config $BUILD_TYPE | run: cmake --build . --config $BUILD_TYPE | |||
- name: Test | - name: Test | |||
working-directory: ${{github.workspace}}/build | working-directory: ${{github.workspace}}/build | |||
shell: bash | shell: bash | |||
# Execute tests defined by the CMake configuration. | # Execute tests defined by the CMake configuration. | |||
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more | # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more | |||
# detail | # detail | |||
run: ctest -C $BUILD_TYPE | run: ctest -C $BUILD_TYPE | |||
- if: ${{ failure() }} | ||||
name: Upload test data | ||||
uses: actions/upload-artifact@v2 | ||||
with: | ||||
name: tests-out | ||||
path: tests | ||||
- if: ${{ failure() }} | ||||
name: Upload cmake test output | ||||
uses: actions/upload-artifact@v2 | ||||
with: | ||||
name: tests-out | ||||
path: build/Testing | ||||
End of changes. 3 change blocks. | ||||
1 lines changed or deleted | 10 lines changed or added |