mirror of
https://github.com/microsoft/GSL.git
synced 2025-02-21 08:52:53 -05:00
101 lines
2.7 KiB
YAML
101 lines
2.7 KiB
YAML
name: Compiler Integration Tests
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
pull_request:
|
|
branches: [ main ]
|
|
|
|
jobs:
|
|
|
|
# TODO (@carsonradtke)
|
|
# - [ ] Xcode
|
|
# - [ ] VS_LLVM
|
|
|
|
gcc:
|
|
strategy:
|
|
matrix:
|
|
cxx_version: [ 14, 17, 20 ]
|
|
build_type: [ 'Debug', 'Release' ]
|
|
gcc_version: [ 12, 13, 14 ]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: create build directory
|
|
run: mkdir build
|
|
|
|
- name: cmake configure
|
|
working-directory: build
|
|
run: |
|
|
CC=gcc-${{ matrix.gcc_version }}
|
|
CXX=g++-${{ matrix.gcc_version }}
|
|
cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DGSL_CXX_STANDARD=${{ matrix.cxx_version }} -DCI_TESTING:BOOL=ON -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -Werror=dev -DCMAKE_CXX_COMPILER=g++-${{ matrix.gcc_version }} ..
|
|
|
|
- name: build
|
|
working-directory: build
|
|
run: make
|
|
|
|
- name: test
|
|
working-directory: build
|
|
run: make test
|
|
|
|
clang:
|
|
strategy:
|
|
matrix:
|
|
cxx_version: [ 14, 17, 20 ]
|
|
build_type: [ 'Debug', 'Release' ]
|
|
clang_version: [ 16, 17, 18 ]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: create build directory
|
|
run: mkdir build
|
|
|
|
- name: cmake configure
|
|
working-directory: build
|
|
run: |
|
|
CC=clang-${{ matrix.clang_version }}
|
|
CXX=clang++-${{ matrix.clang_version }}
|
|
cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DGSL_CXX_STANDARD=${{ matrix.cxx_version }} -DCI_TESTING:BOOL=ON -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -Werror=dev -DCMAKE_CXX_COMPILER=g++-${{ matrix.gcc_version }} ..
|
|
|
|
- name: build
|
|
working-directory: build
|
|
run: make
|
|
|
|
- name: test
|
|
working-directory: build
|
|
run: make test
|
|
|
|
VS_MSVC:
|
|
strategy:
|
|
matrix:
|
|
generator: [ "Visual Studio 16 2019", "Visual Studio 17 2022" ]
|
|
cxx_version: [ 14, 17, 20 ]
|
|
build_type: [ 'Debug', 'Release' ]
|
|
runs-on: windows-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: microsoft/setup-msbuild@v1
|
|
|
|
- name: create build directory
|
|
run: mkdir build
|
|
|
|
- name: cmake configure
|
|
working-directory: build
|
|
run: cmake -G "${{ matrix.generator }}" -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DGSL_CXX_STANDARD=${{ matrix.cxx_version }} -DCI_TESTING:BOOL=ON -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -Werror=dev ..
|
|
|
|
- name: build
|
|
working-directory: build
|
|
run: msbuild GSL.sln
|
|
|
|
- name: test
|
|
working-directory: build
|
|
run: ctest . --output-on-failure --no-compress-output
|
|
|