# Automated testing using appveyor.com # https://ci.appveyor.com/projects version: 1.0.{build} image: - Ubuntu - Ubuntu2004 - macos - Visual Studio 2019 branches: except: - gh-pages platform: - x64 configuration: - Debug - Release for: # Test using GCC sanitizers - matrix: only: - image: Ubuntu platform: x64 configuration: Debug environment: CFLAGS: "-Wall -Wextra -pedantic -Werror -Wno-long-long -Wno-missing-braces -O1 -g -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all -fno-omit-frame-pointer" CXXFLAGS: "-Wall -Wextra -pedantic -Werror -Wno-long-long -Wno-missing-braces -O1 -g -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all -fno-omit-frame-pointer" build_script: - cmake . -DBUILD_TESTS=ON -DCMAKE_BUILD_TYPE=$CONFIGURATION - make VERBOSE=1 test_script: - ctest # Run primecount binary - ./primecount --test - ./primecount 1e14 --gourdon - ./primecount 1e12 --nth-prime - ./primecount 1e12 --meissel - matrix: only: - image: Ubuntu platform: x64 configuration: Release environment: CFLAGS: "-Wall -Wextra -pedantic -Werror -Wno-long-long -Wno-missing-braces" CXXFLAGS: "-Wall -Wextra -pedantic -Werror -Wno-long-long -Wno-missing-braces" install: - sudo apt update -qq - sudo apt install -y asciidoc libxml2-utils xmlto build_script: - cmake . -DBUILD_TESTS=ON -DBUILD_MANPAGE=ON -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=$CONFIGURATION -DCMAKE_INSTALL_PREFIX=$(pwd) - make VERBOSE=1 - make install test_script: - ctest - ./primecount --test - matrix: only: - image: macos platform: x64 environment: CFLAGS: "-Wall -Wextra -pedantic -Werror -Wno-long-long -Wno-missing-braces" CXXFLAGS: "-Wall -Wextra -pedantic -Werror -Wno-long-long -Wno-missing-braces" build_script: - cmake . -DBUILD_TESTS=ON -DCMAKE_BUILD_TYPE=$CONFIGURATION -DCMAKE_INSTALL_PREFIX=$(pwd) - make VERBOSE=1 - make install test_script: - ctest - ./primecount --test - matrix: only: - image: Visual Studio 2019 platform: x64 environment: CFLAGS: "/W3 /WX" CXXFLAGS: "/W3 /WX" build_script: - cmake . -G "Visual Studio 16 2019" -DBUILD_TESTS=ON -DCMAKE_BUILD_TYPE=%Configuration% - cmake --build . --config %Configuration% --target install test_script: - ctest -C %Configuration% - cd %Configuration% - primecount.exe --test