mirror of
https://github.com/marzer/tomlplusplus.git
synced 2024-11-02 20:26:55 +00:00
7306fd2ae5
Windows containers in GitHub Actions are simply bad. While it is possible to use them, it is a horrible hack with terrible usability. It was a fun experiment, but I don't want anybody to maintain this mess, especially when you can use a normal Windows image (less cool, bloated, but well supported).
83 lines
2.0 KiB
YAML
83 lines
2.0 KiB
YAML
name: ci
|
|
|
|
on: [push, pull_request]
|
|
|
|
# This ensures that jobs get canceled when force-pushing
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
linux:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
compiler: [ 'g++', 'clang' ]
|
|
compile: [ true, false ]
|
|
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: debian:testing
|
|
|
|
defaults:
|
|
run:
|
|
shell: sh
|
|
|
|
steps:
|
|
- name: Install dependencies
|
|
run: |
|
|
apt-get -y update
|
|
apt-get -y install --no-install-recommends ${{ matrix.compiler }} lld meson pkgconf git ca-certificates locales-all python3-pip catch2 nlohmann-json3-dev
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Check toml.hpp
|
|
run: |
|
|
pip3 install --upgrade --requirement tools/requirements.txt
|
|
cd tools
|
|
./ci_single_header_check.py
|
|
|
|
- name: Configure Meson
|
|
run: |
|
|
if [ ${{ matrix.compiler }} = g++ ]; then linker=gold; else linker=lld; fi
|
|
CXX_LD=$linker meson setup build --buildtype=debug -Dcompile_library=${{ matrix.compile }} -Dpedantic=true -Dbuild_tests=true -Dbuild_examples=true -Dgenerate_cmake_config=false -Db_lto=false -Dasan_examples=true
|
|
|
|
- name: Build
|
|
run: meson compile -C build
|
|
|
|
- name: Test
|
|
run: meson test -C build --verbose
|
|
|
|
windows:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
compile: [ true, false ]
|
|
|
|
runs-on: windows-2022
|
|
|
|
defaults:
|
|
run:
|
|
shell: cmd
|
|
|
|
steps:
|
|
- name: Install dependencies
|
|
run: |
|
|
python3 -m pip install -U pip==21.3.1
|
|
pip3 install meson ninja
|
|
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
submodules: true
|
|
|
|
- uses: ilammy/msvc-dev-cmd@v1
|
|
|
|
- name: Configure Meson
|
|
run: meson setup --vsenv -Dcompile_library=${{ matrix.compile }} -Dpedantic=true -Dbuild_tests=true -Dbuild_examples=true -Dgenerate_cmake_config=false build
|
|
|
|
- name: Build
|
|
run: meson compile -C build
|
|
|
|
- name: Test
|
|
run: meson test -C build --verbose
|