Skip to content

Commit

Permalink
chg: dev: update python versions, add CPUS env var to tox file
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen L Arnold <[email protected]>
  • Loading branch information
sarnold committed Dec 1, 2023
1 parent 688cfcc commit a90115e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.9]
python-version: [3.10]

name: [
windows-2019-cl,
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/conda-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
fail-fast: false
matrix:
os: ['ubuntu-22.04', 'ubuntu-20.04', 'macOS-11', 'windows-2019']
python-version: ['3.9']
python-version: ['3.11']
use_namespace: [false, true]
include:
- os: 'ubuntu-22.04'
Expand Down
27 changes: 14 additions & 13 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
[tox]
envlist = py3{6,7,8,9}-build
envlist = py3{7,8,9,10,11}-build
skip_missing_interpreters = true
skipsdist = true

[base]
setenv =
CPUS={env:CPUS:4}
{abc,demo,soname,tests}: CFLAGS={env:CFLAGS:-march=native -O2 -g -DNDEBUG}
{abc,demo,soname,tests}: CXXFLAGS={env:CXXFLAGS:-march=native -O2 -g -DNDEBUG}
{abc,demo,soname,tests}: LDFLAGS={env:LDFLAGS:-march=native -O2 -g -DNDEBUG}
Expand Down Expand Up @@ -66,32 +67,32 @@ commands_pre =
{base,build,clang}: cmake -E make_directory {toxinidir}/build

commands =
abc: make -j4 ABC_USE_PIC=1 {posargs} abc
abc: make -j4 {posargs} libabc.a
soname: make -j4 ABC_USE_PIC=1 ABC_USE_SONAME=1 {posargs} lib
abc: make -j{env:CPUS} ABC_USE_PIC=1 {posargs} abc
abc: make -j{env:CPUS} {posargs} libabc.a
soname: make -j{env:CPUS} ABC_USE_PIC=1 ABC_USE_SONAME=1 {posargs} lib
tests: make test
# demo requires CC, CXX set in environment or on cmd line
# eg: CC=gcc CXX=g++ tox -e demo
demo: bash -c '$CC {posargs} -Wall -c src/demo.c -o demo.o'
demo: bash -c '$CXX -o demo demo.o libabc.a -lm -ldl -lreadline -lpthread'
demo: bash -c './demo i10.aig'
{abc,soname,tests}: bash -c 'ls -lh *abc* demo || true'
base: bash -c 'cmake -G {posargs:"Ninja"} -DABC_USE_NAMESPACE=$ABC_USE_NAMESPACE -DCMAKE_INSTALL_PREFIX=$PREFIX ..'
base: bash -c 'cmake --build . --target install -j $(nproc)'
build: bash -c 'cmake -G {posargs:"Unix Makefiles"} -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DABC_USE_NAMESPACE=$ABC_USE_NAMESPACE -DABC_ENABLE_LTO=ON -DBUILD_SHARED_LIBS=ON -DABC_USE_SONAME=$ABC_USE_SONAME -DCMAKE_INSTALL_PREFIX=$PREFIX ..'
clang: bash -c 'cmake -G {posargs:"Unix Makefiles"} -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DABC_USE_NAMESPACE=$ABC_USE_NAMESPACE -DCOVERAGE_BUILD=ON -DBUILD_SHARED_LIBS=OFF ..'
{build}: bash -c 'cmake --build . -j $(nproc)'
{clang}: bash -c 'cmake --build . --target coverage -j $(nproc)'
{build,clang}: bash -c 'ctest -V -C $BUILD_TYPE --test-dir ./'
base: cmake -G {posargs:"Ninja"} -DABC_USE_NAMESPACE=$ABC_USE_NAMESPACE -DCMAKE_INSTALL_PREFIX={env:PREFIX} ..
base: cmake --build . --target install -j {env:CPUS}
build: cmake -G {posargs:"Unix Makefiles"} -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DABC_USE_NAMESPACE=$ABC_USE_NAMESPACE -DABC_ENABLE_LTO=ON -DBUILD_SHARED_LIBS=ON -DABC_USE_SONAME=$ABC_USE_SONAME -DCMAKE_INSTALL_PREFIX={env:PREFIX} ..
clang: cmake -G {posargs:"Unix Makefiles"} -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DABC_USE_NAMESPACE=$ABC_USE_NAMESPACE -DCOVERAGE_BUILD=ON -DBUILD_SHARED_LIBS=OFF ..
{build}: cmake --build . -j {env:CPUS}
{clang}: cmake --build . --target coverage -j {env:CPUS}
{build,clang}: ctest -V -C {env:BUILD_TYPE} --test-dir ./
clang: lcov_cobertura build/coverage/lcov.info --base-dir {toxinidir}/src --output coverage.xml
{base,build}: cmake --build . --target install
{base,build}: bash -c 'find $PREFIX/ -type f -name \*abc\* -o -name demo | xargs ls -lh'
ctest: bash -c 'ctest -j $(nproc) --build-generator {posargs:"Ninja"} --build-and-test . build --build-options -DABC_USE_NAMESPACE=$ABC_USE_NAMESPACE -DABC_SKIP_EXE=ON -DCMAKE_BUILD_TYPE=$BUILD_TYPE --test-command ctest --rerun-failed --output-on-failure -V'
ctest: ctest -j {env:CPUS} --build-generator {posargs:"Ninja"} --build-and-test . build --build-options -DABC_USE_NAMESPACE=$ABC_USE_NAMESPACE -DABC_SKIP_EXE=ON -DCMAKE_BUILD_TYPE=$BUILD_TYPE --test-command ctest --rerun-failed --output-on-failure -V
ctestwin: ctest --build-generator {posargs:"Visual Studio 16 2019"} --build-and-test . build --build-options -DBUILD_SHARED_LIBS=ON -DABC_USE_NO_PTHREADS=ON -DABC_USE_NO_READLINE=ON -DCMAKE_BUILD_TYPE={env:BUILD_TYPE} --test-command ctest --rerun-failed --output-on-failure -V
ctest: bash -c 'ls -lh build/base_test build/libabc.* || true'
lint: bash -c 'cpplint --output=gsed {toxinidir}/src/base/main/* {toxinidir}/lib/*'
grind: bash -c 'cmake -G {posargs:"Ninja"} -S . -B build -DCMAKE_BUILD_TYPE=Debug'
grind: bash -c 'cmake --build build --target abc -j $(nproc)'
grind: bash -c 'cmake --build build --target abc -j $CPUS'
grind: bash -c 'valgrind --tool=memcheck --xml=yes --xml-file=abc_check.xml --leak-check=full --show-leak-kinds=definite,possible --error-exitcode=127 ./build/src/base/main/abc "-c" "r i10.aig; b; ps; b; rw -l; rw -lz; b; rw -lz; b; ps; cec"'
grind: valgrind-ci abc_check.xml --number-of-errors
grind: valgrind-ci abc_check.xml --summary
Expand Down

0 comments on commit a90115e

Please sign in to comment.