Skip to content

Commit

Permalink
fix: dev: prep msvc cl and github environment for conda on windows
Browse files Browse the repository at this point in the history
* disable pthreads when using msvc compiler, bump to C++20 for kissat
* fix non-const build error on windows

Signed-off-by: Stephen L Arnold <[email protected]>
  • Loading branch information
sarnold committed Mar 8, 2025
1 parent 26edc35 commit f835a59
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 4 deletions.
31 changes: 29 additions & 2 deletions .github/workflows/conda-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,27 +34,54 @@ jobs:
- os: 'windows-2019'
generator: 'Ninja'
build_type: 'Debug'
extra_args: '-DBUILD_SHARED_LIBS=OFF -DABC_USE_NO_READLINE=ON -DVENDOR_GTEST=ON'
extra_args: '-DBUILD_SHARED_LIBS=OFF -DABC_USE_NO_PTHREADS=ON -DABC_USE_NO_READLINE=ON -DVENDOR_GTEST=ON'
env:
OS: ${{ matrix.os }}
PY_VER: ${{ matrix.python-version }}
PYTHONIOENCODING: utf-8
CMAKE_ARGS: ${{ matrix.use_namespace && '-DABC_USE_NAMESPACE=xxx' || '' }}

steps:
#- if: matrix.os == 'windows-2019'
#name: Install newer windows compiler
#id: install_cc
#uses: rlalik/setup-cpp-compiler@master
#with:
#compiler: g++-11.2.0

#- if: matrix.os == 'windows-2019'
#name: Use compiler
#shell: bash -l {0}
#env:
#CC: ${{ steps.install_cc.outputs.cc }}
#CXX: ${{ steps.install_cc.outputs.cxx }}
#run: |

- uses: actions/checkout@v4

- name: Setup base python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Prepare build environment for windows
if: runner.os == 'Windows'
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64

- name: Env (Windows)
if: runner.os == 'Windows'
run: |
echo "CXX=cl.exe" >> $GITHUB_ENV
echo "CC=cl.exe" >> $GITHUB_ENV
- name: Cache conda
id: cache
uses: actions/cache@v4
env:
# Increase this value to reset cache if environment.devenv.yml has not changed
CACHE_NUMBER: 1
CACHE_NUMBER: 2
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('environment.devenv.yml') }}
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ project(
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_VERBOSE_MAKEFILE ON)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

Expand Down
2 changes: 1 addition & 1 deletion src/base/abc/abcHieNew.c
Original file line number Diff line number Diff line change
Expand Up @@ -1488,7 +1488,7 @@ Gia_Man_t * Au_ManDeriveTest( Abc_Ntk_t * pRoot )
extern Vec_Ptr_t * Abc_NtkCollectHie( Abc_Ntk_t * pNtk );

// char * pModelName = NULL;
char * pModelName = "path_0_r_x_lhs";
const char * pModelName = "path_0_r_x_lhs";
Gia_Man_t * pGia = NULL;
Vec_Ptr_t * vOrder, * vModels;
Abc_Ntk_t * pMod;
Expand Down

0 comments on commit f835a59

Please sign in to comment.