feat: erase items by keys #62
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: C++ build | |
on: [push, pull_request] | |
jobs: | |
build: | |
name: ${{ matrix.config.name }} | |
runs-on: ${{ matrix.config.os }} | |
strategy: | |
matrix: | |
config: | |
- name: "Ubuntu/gcc-11/Release" | |
os: ubuntu-latest | |
build_type: "Release" | |
cc: "gcc-11" | |
cxx: "g++-11" | |
generators: "Ninja" | |
coveralls: false | |
- name: "Ubuntu/gcc-11/Debug" | |
os: ubuntu-latest | |
build_type: "Debug" | |
cc: "gcc-11" | |
cxx: "g++-11" | |
generators: "Ninja" | |
coveralls: true | |
- name: "Windows x86_64/Release" | |
os: windows-latest | |
build_type: "Release" | |
generators: "Visual Studio 16 2019" | |
gen_arch: "x64" | |
coveralls: false | |
- name: "Windows x86_32/Release" | |
os: windows-latest | |
build_type: "Release" | |
generators: "Visual Studio 16 2019" | |
gen_arch: "Win32" | |
coveralls: false | |
env: | |
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | |
BUILD_TYPE: ${{ matrix.config.build_type }} | |
CC: ${{ matrix.config.cc }} | |
CXX: ${{ matrix.config.cxx }} | |
COV: ${{ matrix.config.coveralls }} | |
COV_UP: ${{ github.event_name == 'push' && matrix.config.coveralls }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- name: Get compilers (Ubuntu) | |
if: startsWith(matrix.config.os, 'ubuntu-') | |
run: | | |
sudo apt update | |
sudo apt install ${{env.CC}} ${{env.CXX}} | |
shell: bash | |
- name: Add MSBuild to PATH (Windows) | |
if: startsWith(matrix.config.os, 'windows-') | |
uses: microsoft/[email protected] | |
- name: Get Ninja | |
if: ${{ matrix.config.generators }} == "Ninja" | |
uses: turtlesec-no/[email protected] | |
- name: Get Conan | |
uses: turtlebrowser/[email protected] | |
- name: Configure Conan (GCC) | |
if: startsWith(matrix.config.cc, 'gcc-') | |
run: | | |
conan install "${{github.workspace}}" -if "${{github.workspace}}/build" --build missing -s build_type=${{env.BUILD_TYPE}} | |
conan profile update settings.compiler.libcxx=libstdc++11 default | |
- name: Configure Conan | |
run: conan install "${{github.workspace}}" -if "${{github.workspace}}/build" --build missing -s build_type=${{env.BUILD_TYPE}} | |
- name: Configure CMake | |
run: cmake -G "${{ matrix.config.generators }}" -A "${{ matrix.config.gen_arch }}" -B "${{github.workspace}}/build" -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DJSON_TESTING=ON -DJSON_COVERALLS=${{env.COV}} -DJSON_COVERALLS_UPLOAD=${{env.COV_UP}} | |
- name: Build | |
run: cmake --build "${{github.workspace}}/build" --config ${{env.BUILD_TYPE}} --parallel | |
- name: Test | |
if: ${{ !matrix.config.coveralls || github.event_name != 'push' }} | |
working-directory: ${{github.workspace}}/build | |
run: ctest -C ${{env.BUILD_TYPE}} | |
- name: Coveralls | |
if: ${{ matrix.config.coveralls && github.event_name == 'push' }} | |
working-directory: ${{github.workspace}}/build | |
run: cmake --build . --config ${{env.BUILD_TYPE}} --target JSON_coveralls --parallel | |
env: | |
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} |