diff --git a/.github/workflows/CI-unixish.yml b/.github/workflows/CI-unixish.yml deleted file mode 100644 index f76fdd15..00000000 --- a/.github/workflows/CI-unixish.yml +++ /dev/null @@ -1,121 +0,0 @@ -name: CI-unixish - -on: [push, pull_request] - -permissions: - contents: read - -jobs: - build: - - strategy: - matrix: - os: [ubuntu-22.04, ubuntu-24.04, macos-13, macos-14, macos-15] - compiler: [clang++] - include: - - os: ubuntu-22.04 - compiler: g++ - - os: ubuntu-24.04 - compiler: g++ - fail-fast: false - - runs-on: ${{ matrix.os }} - - env: - CXX: ${{ matrix.compiler }} - - steps: - - uses: actions/checkout@v4 - with: - persist-credentials: false - - - name: Install missing software on ubuntu - if: matrix.os == 'ubuntu-24.04' - run: | - sudo apt-get update - sudo apt-get install valgrind - - - name: Install missing software on ubuntu (clang++) - if: matrix.os == 'ubuntu-24.04' && matrix.compiler == 'clang++' - run: | - sudo apt-get update - sudo apt-get install libc++-18-dev - - - name: Install missing software on macos - if: contains(matrix.os, 'macos') - run: | - brew install python3 - - - name: Install missing Python packages - run: | - python3 -m pip config set global.break-system-packages true - python3 -m pip install pytest - - - name: make simplecpp - run: make -j$(nproc) CXXOPTS="-Werror" - - - name: make test - run: make -j$(nproc) test CXXOPTS="-Werror" - - - name: selfcheck - run: | - make -j$(nproc) selfcheck - - - name: Run CMake - run: | - cmake -S . -B cmake.output -DCMAKE_COMPILE_WARNING_AS_ERROR=On - - - name: CMake simplecpp - run: | - cmake --build cmake.output --target simplecpp -- -j $(nproc) - - - name: CMake testrunner - run: | - cmake --build cmake.output --target testrunner -- -j $(nproc) - ./cmake.output/testrunner - # Re-run tests from within the build directory to validate that - # SIMPLECPP_TEST_SOURCE_DIR is correctly defined and resolved - (cd cmake.output && ./testrunner) - - - name: Run valgrind - if: matrix.os == 'ubuntu-24.04' - run: | - make clean - make -j$(nproc) - valgrind --leak-check=full --num-callers=50 --show-reachable=yes --track-origins=yes --gen-suppressions=all --error-exitcode=42 ./testrunner - valgrind --leak-check=full --num-callers=50 --show-reachable=yes --track-origins=yes --gen-suppressions=all --error-exitcode=42 ./simplecpp simplecpp.cpp -e - - - name: Run with libstdc++ debug mode - if: matrix.os == 'ubuntu-24.04' && matrix.compiler == 'g++' - run: | - make clean - make -j$(nproc) test selfcheck CXXOPTS="-Werror -g3 -D_GLIBCXX_DEBUG" - - - name: Run with libc++ hardening mode - if: matrix.os == 'ubuntu-24.04' && matrix.compiler == 'clang++' - run: | - make clean - make -j$(nproc) test selfcheck CXXOPTS="-Werror -stdlib=libc++ -g3 -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_DEBUG" LDOPTS="-lc++" - - - name: Run AddressSanitizer - if: matrix.os == 'ubuntu-24.04' - run: | - make clean - make -j$(nproc) test selfcheck CXXOPTS="-Werror -O2 -g3 -fsanitize=address" LDOPTS="-fsanitize=address" - env: - ASAN_OPTIONS: detect_stack_use_after_return=1 - - - name: Run UndefinedBehaviorSanitizer - if: matrix.os == 'ubuntu-24.04' - run: | - make clean - make -j$(nproc) test selfcheck CXXOPTS="-Werror -O2 -g3 -fsanitize=undefined -fno-sanitize=signed-integer-overflow" LDOPTS="-fsanitize=undefined -fno-sanitize=signed-integer-overflow" - env: - UBSAN_OPTIONS: print_stacktrace=1:halt_on_error=1:report_error_type=1 - - # TODO: requires instrumented libc++ - - name: Run MemorySanitizer - if: false && matrix.os == 'ubuntu-24.04' && matrix.compiler == 'clang++' - run: | - make clean - make -j$(nproc) test selfcheck CXXOPTS="-Werror -O2 -g3 -stdlib=libc++ -fsanitize=memory" LDOPTS="-lc++ -fsanitize=memory" diff --git a/.github/workflows/CI-windows.yml b/.github/workflows/CI-windows.yml deleted file mode 100644 index 767bba6c..00000000 --- a/.github/workflows/CI-windows.yml +++ /dev/null @@ -1,66 +0,0 @@ -# Some convenient links: -# - https://github.com/actions/virtual-environments/blob/master/images/win/Windows2019-Readme.md -# - -name: CI-windows - -on: [push,pull_request] - -permissions: - contents: read - -defaults: - run: - shell: cmd - -jobs: - - build: - strategy: - matrix: - os: [windows-2022, windows-2025] - config: [Release, Debug] - fail-fast: false - - runs-on: ${{ matrix.os }} - - steps: - - uses: actions/checkout@v4 - with: - persist-credentials: false - - - name: Setup msbuild.exe - uses: microsoft/setup-msbuild@v2 - - - name: Set up Python 3.13 - uses: actions/setup-python@v5 - with: - python-version: '3.13' - check-latest: true - - - name: Install missing Python packages - run: | - python -m pip install pip --upgrade || exit /b !errorlevel! - python -m pip install pytest || exit /b !errorlevel! - - - name: Run CMake - run: | - cmake -G "Visual Studio 17 2022" -A x64 -DCMAKE_COMPILE_WARNING_AS_ERROR=On . || exit /b !errorlevel! - - - name: Build - run: | - msbuild -m simplecpp.sln /p:Configuration=${{ matrix.config }} /p:Platform=x64 || exit /b !errorlevel! - - - name: Test - run: | - .\${{ matrix.config }}\testrunner.exe || exit /b !errorlevel! - - - name: Selfcheck - run: | - .\${{ matrix.config }}\simplecpp.exe simplecpp.cpp -e || exit /b !errorlevel! - - - name: integration test - run: | - set SIMPLECPP_EXE_PATH=.\${{ matrix.config }}\simplecpp.exe - python -m pytest integration_test.py -vv || exit /b !errorlevel! - diff --git a/.github/workflows/clang-tidy.yml b/.github/workflows/clang-tidy.yml deleted file mode 100644 index fd71bdfe..00000000 --- a/.github/workflows/clang-tidy.yml +++ /dev/null @@ -1,44 +0,0 @@ -# Syntax reference https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions -# Environment reference https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners -name: clang-tidy - -on: [push, pull_request] - -permissions: - contents: read - -jobs: - build: - - runs-on: ubuntu-24.04 - - steps: - - uses: actions/checkout@v4 - with: - persist-credentials: false - - - name: Install missing software - run: | - sudo apt-get update - sudo apt-get install -y cmake make - - - name: Install clang - run: | - wget https://apt.llvm.org/llvm.sh - chmod +x llvm.sh - sudo ./llvm.sh 20 - sudo apt-get install clang-tidy-20 - - - name: Verify clang-tidy configuration - run: | - clang-tidy-20 --verify-config - - - name: Prepare CMake - run: | - cmake -S . -B cmake.output -G "Unix Makefiles" -DCMAKE_COMPILE_WARNING_AS_ERROR=On -DCMAKE_EXPORT_COMPILE_COMMANDS=ON - env: - CXX: clang-20 - - - name: Clang-Tidy - run: | - run-clang-tidy-20 -q -j $(nproc) -p=cmake.output diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml deleted file mode 100644 index 4d5657f8..00000000 --- a/.github/workflows/format.yml +++ /dev/null @@ -1,62 +0,0 @@ -# Syntax reference https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions -# Environment reference https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners -name: format - -on: - push: - branches: - - 'master' - - 'releases/**' - - '1.*' - tags: - - '1.*' - pull_request: - -permissions: - contents: read - -jobs: - format: - - runs-on: ubuntu-22.04 - - defaults: - run: - shell: bash -euo pipefail {0} - - env: - UNCRUSTIFY_INSTALL_DIR: ${{ github.workspace }}/runformat-uncrustify - - steps: - - uses: actions/checkout@v5 - with: - persist-credentials: false - - - name: Determine uncrustify version - id: get-uncrustify-version - run: | - version="$(./runformat --expected-uncrustify-version)" - echo "Expected uncrustify version: $version" - echo "version=$version" >> "$GITHUB_OUTPUT" - - - name: Set UNCRUSTIFY_VERSION env variable - run: | - version=$(./runformat --expected-uncrustify-version) - echo "version [$version]" - echo "UNCRUSTIFY_VERSION=${version}" >> "$GITHUB_ENV" - - - name: Cache uncrustify - uses: actions/cache@v4 - id: cache-uncrustify - with: - path: ${{ env.UNCRUSTIFY_INSTALL_DIR }} - key: ${{ runner.os }}-uncrustify-${{ steps.get-uncrustify-version.outputs.version }} - - - name: Install uncrustify - if: steps.cache-uncrustify.outputs.cache-hit != 'true' - run: | - ./runformat --install --install-dir "${UNCRUSTIFY_INSTALL_DIR}" - - - name: Uncrustify check - run: | - ./runformat diff --git a/appveyor.yml b/appveyor.yml index 09aa6cbe..a09fbf24 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -2,19 +2,37 @@ version: 1.{build} environment: matrix: - - VisualStudioVersion: 14.0 - platform: "Win32" + - VisualStudio: 2017 + VisualStudioGenerator: "15 2017" + ConfigurationPlatform: "Win32" configuration: "Debug" - vcvarsall_platform: "x86" - PlatformToolset: "v140" + PlatformToolset: "v141" + vcvars: "vcvars32" + - VisualStudio: 2017 + VisualStudioGenerator: "15 2017" + ConfigurationPlatform: "x64" + configuration: "Debug" + PlatformToolset: "v141" + vcvars: "vcvars64" + - VisualStudio: 2019 + VisualStudioGenerator: "16 2019" + ConfigurationPlatform: "Win32" + configuration: "Debug" + PlatformToolset: "v142" + vcvars: "vcvars32" + - VisualStudio: 2019 + VisualStudioGenerator: "16 2019" + ConfigurationPlatform: "x64" + configuration: "Debug" + PlatformToolset: "v142" + vcvars: "vcvars64" build_script: - - ECHO Building %configuration% %platform% with MSVC %VisualStudioVersion% using %PlatformToolset% PlatformToolset - - cmake -DCMAKE_COMPILE_WARNING_AS_ERROR=On -G "Visual Studio 14" . - - dir - - 'CALL "C:\Program Files (x86)\Microsoft Visual Studio %VisualStudioVersion%\VC\vcvarsall.bat" %vcvarsall_platform%' + - ECHO Building %configuration% %platform% with MSVC %VisualStudio% (Visual Studio %VisualStudioGenerator%) using %PlatformToolset% PlatformToolset + - CALL "C:\Program Files (x86)\Microsoft Visual Studio\%VisualStudio%\Community\VC\Auxiliary\Build\%vcvars%.bat" + - cmake -DCMAKE_COMPILE_WARNING_AS_ERROR=On -G "Visual Studio %VisualStudioGenerator%" -A %ConfigurationPlatform% . - set _CL_=/WX - - msbuild "simplecpp.sln" /consoleloggerparameters:Verbosity=minimal /target:Build /property:Configuration="%configuration%";Platform=%platform% /p:PlatformToolset=%PlatformToolset% /maxcpucount /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" + - msbuild "simplecpp.sln" /consoleloggerparameters:Verbosity=minimal /target:Build /property:Configuration="%configuration%";Platform=%ConfigurationPlatform% /p:PlatformToolset=%PlatformToolset% /maxcpucount /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" test_script: - debug\testrunner.exe