mirror of
https://github.com/ChaiScript/ChaiScript.git
synced 2026-08-02 01:37:53 +08:00
Fix #660: Fix Windows builds, remove Appveyor, add sanitizer CI builds
Add missing #include <chrono> to src/main.cpp which caused MSVC build failures since high_resolution_clock and duration_cast were used without the header (GCC/Clang included it transitively). Remove obsolete appveyor.yml (superseded by GitHub Actions). Add ASAN+UBSAN build jobs for Linux and macOS in the CI workflow. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
1619d846da
commit
de839bcf4f
38
.github/workflows/ci.yml
vendored
38
.github/workflows/ci.yml
vendored
@ -46,6 +46,44 @@ jobs:
|
|||||||
- name: Test
|
- name: Test
|
||||||
run: ctest --test-dir build --output-on-failure
|
run: ctest --test-dir build --output-on-failure
|
||||||
|
|
||||||
|
linux-sanitizers:
|
||||||
|
name: Linux GCC ASAN+UBSAN ${{ matrix.build_type }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
build_type: [Debug, Release]
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Configure
|
||||||
|
run: cmake -B build -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DENABLE_ADDRESS_SANITIZER=ON -DENABLE_UNDEFINED_SANITIZER=ON
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: cmake --build build -j
|
||||||
|
|
||||||
|
- name: Test
|
||||||
|
run: ctest --test-dir build --output-on-failure
|
||||||
|
|
||||||
|
macos-sanitizers:
|
||||||
|
name: macOS AppleClang ASAN+UBSAN ${{ matrix.build_type }}
|
||||||
|
runs-on: macos-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
build_type: [Debug, Release]
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Configure
|
||||||
|
run: cmake -B build -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DENABLE_ADDRESS_SANITIZER=ON -DENABLE_UNDEFINED_SANITIZER=ON
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: cmake --build build -j
|
||||||
|
|
||||||
|
- name: Test
|
||||||
|
run: ctest --test-dir build --output-on-failure
|
||||||
|
|
||||||
windows:
|
windows:
|
||||||
name: Windows MSVC ${{ matrix.build_type }}
|
name: Windows MSVC ${{ matrix.build_type }}
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
|
|||||||
23
appveyor.yml
23
appveyor.yml
@ -1,23 +0,0 @@
|
|||||||
version: 6.1.x.{build}
|
|
||||||
image:
|
|
||||||
- Visual Studio 2019
|
|
||||||
environment:
|
|
||||||
matrix:
|
|
||||||
- VS_VERSION: "Visual Studio 16"
|
|
||||||
build_script:
|
|
||||||
- cmd: >-
|
|
||||||
mkdir build
|
|
||||||
|
|
||||||
cd build
|
|
||||||
|
|
||||||
cmake c:\Projects\chaiscript -G "%VS_VERSION%" -DBUILD_TESTING:BOOL=ON -DBUILD_MODULES:BOOL=ON
|
|
||||||
|
|
||||||
cmake --build . --config Debug
|
|
||||||
test_script:
|
|
||||||
- cmd: ctest -C Debug
|
|
||||||
notifications:
|
|
||||||
- provider: Webhook
|
|
||||||
url: https://webhooks.gitter.im/e/9ff725a985b5679d1d5d
|
|
||||||
on_build_success: true
|
|
||||||
on_build_failure: true
|
|
||||||
on_build_status_changed: false
|
|
||||||
@ -7,6 +7,7 @@
|
|||||||
// This is an open source non-commercial project. Dear PVS-Studio, please check it.
|
// This is an open source non-commercial project. Dear PVS-Studio, please check it.
|
||||||
// PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
|
// PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
|
||||||
|
|
||||||
|
#include <chrono>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <regex>
|
#include <regex>
|
||||||
|
|||||||
3
unittests/now_function.chai
Normal file
3
unittests/now_function.chai
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
// Regression test for issue #660: now() requires <chrono> include
|
||||||
|
var t = now()
|
||||||
|
assert_true(t > 0)
|
||||||
Loading…
x
Reference in New Issue
Block a user