Skip to content

Fix string_view::cend() recursively calling self (#27) #21

Fix string_view::cend() recursively calling self (#27)

Fix string_view::cend() recursively calling self (#27) #21

Workflow file for this run

name: Windows
on:
push:
paths:
- 'include/**.hpp'
- 'test/**.cpp'
- '**.cmake'
- 'conanfile.py'
- 'CMakeLists.txt'
- 'test/CMakeLists.txt'
- '.github/workflows/build-windows.yml'
pull_request:
paths:
- 'include/**.hpp'
- 'test/**.cpp'
- '**.cmake'
- 'conanfile.py'
- 'CMakeLists.txt'
- 'test/CMakeLists.txt'
- '.github/workflows/build-windows.yml'
jobs:
test:
name: Windows ${{matrix.compiler.name}} ${{matrix.compiler.version}} (${{matrix.arch}})
runs-on: windows-latest
env:
build-directory: build
strategy:
fail-fast: false
matrix:
compiler:
# Xcode Versions
- { name: "gcc", version: "latest", cc: gcc, cxx: g++ }
- { name: "clang", version: "10", cc: clang, cxx: clang++ }
- { name: "clang-cl", version: "latest", cc: clang-cl, cxx: clang-cl }
- { name: "cl", version: "14.0", toolset_version: "140", cc: cl, cxx: cl }
- { name: "cl", version: "14.16", toolset_version: "141", cc: cl, cxx: cl }
- { name: "cl", version: "14.28", toolset_version: "142", cc: cl, cxx: cl }
arch: [x86, x86_64]
# Visual Studios specifies strange terminology for x86/x86_64
include:
- arch: x86
vs_arch: Win32
- arch: x86_64
vs_arch: x64
# GCC fails to compile 32-bit correctly with Github's Windows runner
# configuration.
exclude:
- arch: x86
compiler: { name: "gcc", cc: gcc, cxx: g++ }
steps:
- name: Clone
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Prepare Environment
shell: bash
run: |
if [[ ${{matrix.compiler.name}} == 'clang' ]]; then
curl -fsSL -o LLVM${{matrix.compiler.version}}.exe https://github.com/llvm/llvm-project/releases/download/llvmorg-${{matrix.compiler.version}}.0.0/LLVM-${{matrix.compiler.version}}.0.0-win64.exe
7z x LLVM${{matrix.compiler.version}}.exe -y -o"C:/Program Files/LLVM"
fi
python -m pip install --upgrade pip
pip install conan
cmake -E make_directory ${{env.build-directory}}
cmake -E chdir ${{env.build-directory}} conan install ..
- name: Prepare Architecture
if: matrix.compiler.name == 'clang' && matrix.arch == 'x86'
shell: bash
run: echo "CXXFLAGS=${CXXFLAGS} -m32" >> ${GITHUB_ENV}
- name: Configure (gcc)
working-directory: ${{env.build-directory}}
if: ${{matrix.compiler.name == 'gcc'}}
env:
CC: gcc
CXX: g++
run: cmake .. -DBACKPORT_COMPILE_UNIT_TESTS=On -G"MinGW Makefiles"
- name: Configure (clang)
working-directory: ${{env.build-directory}}
if: ${{matrix.compiler.name == 'clang'}}
run: |
cmake .. -G"MinGW Makefiles" `
-DCMAKE_CXX_COMPILER="C:/Program Files/LLVM/bin/clang++.exe" `
-DBACKPORT_COMPILE_UNIT_TESTS=On
- name: Configure (clang-cl)
working-directory: ${{env.build-directory}}
if: ${{matrix.compiler.name == 'clang-cl'}}
run: |
cmake .. -G "Visual Studio 16 2019" -A ${{matrix.vs_arch}} `
-T ClangCL `
-DBACKPORT_COMPILE_UNIT_TESTS=On
- name: Configure (MSVC)
working-directory: ${{env.build-directory}}
if: ${{matrix.compiler.name == 'cl'}}
run: |
cmake .. -G "Visual Studio 16 2019" -A ${{matrix.vs_arch}} `
-T v${{matrix.compiler.toolset_version}} `
-DBACKPORT_COMPILE_UNIT_TESTS=On `
# Debug Configuration
- name: Configure (Debug)
working-directory: ${{env.build-directory}}
if: ${{matrix.compiler.name == 'clang' || matrix.compiler.name == 'gcc'}}
run: cmake . -DCMAKE_BUILD_TYPE=Debug
- name: Build (Debug)
working-directory: ${{env.build-directory}}
run: cmake --build . --config Debug
- name: Test (Debug)
working-directory: ${{env.build-directory}}
run: ctest -C Debug --output-on-failure
# Release Configuration
- name: Configure (Release)
working-directory: ${{env.build-directory}}
if: ${{matrix.compiler.name == 'clang' || matrix.compiler.name == 'gcc'}}
run: cmake . -DCMAKE_BUILD_TYPE=Release
- name: Build (Release)
working-directory: ${{env.build-directory}}
run: cmake --build . --config Release
- name: Test (Release)
working-directory: ${{env.build-directory}}
run: ctest -C Release --output-on-failure