Skip to content

Update to latest libprimesieve #504

Update to latest libprimesieve

Update to latest libprimesieve #504

Workflow file for this run

name: ci
on:
push:
branches-ignore:
- backup3
- gh-pages
pull_request:
branches-ignore:
- backup3
- gh-pages
jobs:
# See documentation: https://www.msys2.org/docs/ci/
windows_mingw64:
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v3
- uses: msys2/setup-msys2@v2
with:
update: true
install: base-devel mingw-w64-x86_64-toolchain mingw-w64-x86_64-cmake
- name: Build primecount
run: |
cmake . -G "Unix Makefiles" -DBUILD_TESTS=ON -DCMAKE_CXX_FLAGS="-Wall -Wextra -pedantic -Werror"
grep "^OpenMP:INTERNAL=1$" CMakeCache.txt
grep "^int128.*:INTERNAL=1$" CMakeCache.txt
grep "^cpu_supports_popcnt:INTERNAL=1$" CMakeCache.txt
make -j2 VERBOSE=1
- name: CTest (unit tests)
run: ctest -j2
- name: primecount --test option
run: ./primecount --test
linux_gcc:
runs-on: ubuntu-latest
env:
CC: gcc
CXX: g++
steps:
- uses: actions/checkout@v3
- name: Install valgrind
run: |
sudo apt update
sudo apt install valgrind
- name: Build primecount
run: |
cmake . -DBUILD_TESTS=ON -DCMAKE_CXX_FLAGS="-Wall -Wextra -pedantic -Werror"
grep "^OpenMP:INTERNAL=1$" CMakeCache.txt
grep "^int128.*:INTERNAL=1$" CMakeCache.txt
grep "^cpu_supports_popcnt:INTERNAL=1$" CMakeCache.txt
make -j2 VERBOSE=1
- name: CTest (unit tests)
run: ctest -j2
- name: primecount --test option
run: ./primecount --test
- name: Valgrind legendre test
run: valgrind --error-exitcode=1 ./primecount 1e11 --legendre
- name: Valgrind meissel test
run: valgrind --error-exitcode=1 ./primecount 1e12 --meissel
- name: Valgrind lehmer test
run: valgrind --error-exitcode=1 ./primecount 1e11 --lehmer
- name: Valgrind lmo test
run: valgrind --error-exitcode=1 ./primecount 1e12 --lmo
- name: Valgrind deleglise-rivat test
run: valgrind --error-exitcode=1 ./primecount 1e13 --deleglise-rivat
- name: Valgrind gourdon test
run: valgrind --error-exitcode=1 ./primecount 1e14 --gourdon
linux_clang:
runs-on: ubuntu-latest
env:
CC: clang
CXX: clang++
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt update
sudo apt install libomp-dev
- name: Build primecount
run: |
cmake . -DBUILD_TESTS=ON -DCMAKE_CXX_FLAGS="-Wall -Wextra -pedantic -Werror"
grep "^OpenMP.*:INTERNAL=1$" CMakeCache.txt
grep "^int128.*:INTERNAL=1$" CMakeCache.txt
grep "^cpu_supports_popcnt:INTERNAL=1$" CMakeCache.txt
make -j2 VERBOSE=1
- name: CTest (unit tests)
run: ctest -j2
- name: primecount --test option
run: ./primecount --test
linux_128bit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build primecount
run: |
cmake . -DBUILD_TESTS=ON
grep "^OpenMP:INTERNAL=1$" CMakeCache.txt
grep "^int128.*:INTERNAL=1$" CMakeCache.txt
grep "^cpu_supports_popcnt:INTERNAL=1$" CMakeCache.txt
make -j2
- name: CTest (unit tests)
run: ctest -j2
- name: PrimePi(1e20) 128-bit test
run: |
./primecount 1e20 -s | tee primecount-1e20.log
grep 2220819602560918840 primecount-1e20.log
linux_gcc_performance_test:
runs-on: ubuntu-latest
env:
CC: gcc
CXX: g++
steps:
- uses: actions/checkout@v3
with:
# Fetch all commits & tags
fetch-depth: 0
- name: Install dependencies
run: |
sudo apt update
sudo apt install bc
- name: Benchmark latest code vs. previous release
run: scripts/./benchmark-vs-prev-release.sh
linux_clang_performance_test:
runs-on: ubuntu-latest
env:
CC: clang
CXX: clang++
steps:
- uses: actions/checkout@v3
with:
# Fetch all commits & tags
fetch-depth: 0
- name: Install dependencies
run: |
sudo apt update
sudo apt install bc libomp-dev
- name: Benchmark latest code vs. previous release
run: scripts/./benchmark-vs-prev-release.sh