feat(sxproto): to write yaml #754
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: CMake | |
on: [push, pull_request] | |
jobs: | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- platform: ubuntu-latest | |
cmake_build_type: RelOnHost | |
- platform: macos-latest | |
cmake_build_type: RelOnHost | |
- platform: windows-latest | |
cmake_build_type: Release | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Create Build Environment | |
run: cmake -E make_directory ${{runner.workspace}}/bld | |
- name: Configure CMake | |
# Use a bash shell so we can use the same syntax for environment variable | |
# access regardless of the host operating system | |
shell: bash | |
working-directory: ${{runner.workspace}}/bld | |
# Note the current convention is to use the -S and -B options here to specify source | |
# and build directories, but this is only available with CMake 3.13 and higher. | |
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12 | |
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{matrix.cmake_build_type}} | |
- name: Build | |
working-directory: ${{runner.workspace}}/bld | |
shell: bash | |
run: cmake --build . --config ${{matrix.cmake_build_type}} | |
- name: Test | |
working-directory: ${{runner.workspace}}/bld | |
shell: bash | |
run: ctest --timeout 10 -C ${{matrix.cmake_build_type}} | |
- name: Upload Test Results | |
uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: Test Results (${{ matrix.platform }}) | |
path: | | |
${{runner.workspace}}/bld/Testing/ | |
${{runner.workspace}}/bld/src/RelOnHost/ | |
${{runner.workspace}}/bld/test/*/RelOnHost/ | |
${{runner.workspace}}/bld/tool/RelOnHost/ | |
configure_with_old_cmake: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: CMake Version Set | |
uses: jwlawson/actions-setup-cmake@v2 | |
with: | |
cmake-version: '2.8.12' | |
- name: CMake Version Get | |
run: cmake --version | |
- name: Create Build Environment | |
run: cmake -E make_directory ${{runner.workspace}}/bld | |
- name: Configure | |
shell: bash | |
working-directory: ${{runner.workspace}}/bld | |
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=RelOnHost | |
alpine: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- alpine_arch: x86 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup latest Alpine Linux | |
uses: jirutka/setup-alpine@v1 | |
with: | |
arch: ${{ matrix.alpine_arch }} | |
packages: > | |
build-base | |
cmake | |
- name: Build inside Alpine chroot as default user (unprivileged) | |
run: | | |
mkdir bld | |
cd bld | |
cmake .. | |
cmake --build . | |
shell: alpine.sh {0} | |
- name: Test inside Alpine chroot as default user (unprivileged) | |
run: | | |
cd bld | |
ctest --timeout 10 | |
shell: alpine.sh {0} | |