From 12452a695d00f16a12f847eeb2a1a929f0233206 Mon Sep 17 00:00:00 2001 From: ToruNiina Date: Sun, 16 Jun 2024 19:28:10 +0900 Subject: [PATCH] ci: use appveyor for multi msvc versions --- CMakeLists.txt | 2 +- README.md | 1 + appveyor.yml | 26 ++++++++++++++++++++++++++ 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 appveyor.yml diff --git a/CMakeLists.txt b/CMakeLists.txt index 1dbb2c0..a43de82 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.22) +cmake_minimum_required(VERSION 3.16) project(toml11 LANGUAGES CXX VERSION 4.0.0) include(CMakeDependentOption) diff --git a/README.md b/README.md index aa23f53..fa0326c 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # toml11 [![Build Status on GitHub Actions](https://github.com/ToruNiina/toml11/workflows/build/badge.svg)](https://github.com/ToruNiina/toml11/actions) +[![Build status](https://ci.appveyor.com/api/projects/status/m2n08a926asvg5mg/branch/main?svg=true)](https://ci.appveyor.com/project/ToruNiina/toml11/branch/main) [![Version](https://img.shields.io/github/release/ToruNiina/toml11.svg?style=flat)](https://github.com/ToruNiina/toml11/releases) [![License](https://img.shields.io/github/license/ToruNiina/toml11.svg?style=flat)](LICENSE) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1209136.svg)](https://doi.org/10.5281/zenodo.1209136) diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000..435eca6 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,26 @@ +version: "{build}" + +environment: + matrix: + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 + generator: Visual Studio 16 2019 + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 + generator: Visual Studio 17 2022 + +configuration: + - Release + - Debug + +clone_depth: 10 +clone_folder: c:\toml11 + +install: +- git submodule update --init --recursive + +build_script: + - cd C:\toml11 + - cmake -B build -G"%generator%" -A x64 -DCMAKE_CXX_STANDARD=11 -DTOML11_BUILD_TESTS=ON -DTOML11_PRECOMPILE=ON + - cmake --build build --config "%configuration%" + +test_script: + - ctest --test-dir build --build-config "%configuration%" --timeout 300 --output-on-failure