diff --git a/.github/workflows/conda-dev.yml b/.github/workflows/conda-dev.yml index 92600166f..f7523a1a5 100644 --- a/.github/workflows/conda-dev.yml +++ b/.github/workflows/conda-dev.yml @@ -34,7 +34,7 @@ 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 }} @@ -42,6 +42,21 @@ jobs: 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 @@ -49,12 +64,24 @@ jobs: 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') }} diff --git a/CMakeLists.txt b/CMakeLists.txt index b5fc49ff2..43735a618 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -182,6 +182,7 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") "_MBCS" "_SCL_SECURE_NO_WARNINGS" "_CRT_SECURE_NO_WARNINGS" + "_CRT_INTERNAL_NONSTDC_NAMES" "_XKEYCHECK_H" "_ALLOW_KEYWORD_MACROS=1" ) diff --git a/src/base/abc/abcHieNew.c b/src/base/abc/abcHieNew.c index 54a61609f..5906bf476 100644 --- a/src/base/abc/abcHieNew.c +++ b/src/base/abc/abcHieNew.c @@ -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"; + char pModelName[] = "path_0_r_x_lhs"; Gia_Man_t * pGia = NULL; Vec_Ptr_t * vOrder, * vModels; Abc_Ntk_t * pMod; diff --git a/src/sat/kissat/colors.c b/src/sat/kissat/colors.c index c6141b749..7c41fba61 100644 --- a/src/sat/kissat/colors.c +++ b/src/sat/kissat/colors.c @@ -1,6 +1,7 @@ #include "colors.h" #if defined(WIN32) && !defined(__MINGW32__) +#include #define isatty _isatty #else #include diff --git a/src/sat/kissat/file.c b/src/sat/kissat/file.c index e4486783d..4aaed520b 100644 --- a/src/sat/kissat/file.c +++ b/src/sat/kissat/file.c @@ -5,14 +5,19 @@ #include #include #include + #include #include #ifdef WIN32 +#include #define unlink _unlink #define access _access #define R_OK 4 #define W_OK 2 +#ifndef S_ISDIR +# define S_ISDIR(mode) (((mode) & _S_IFMT) == _S_IFDIR) +#endif #else #include #endif diff --git a/src/sat/kissat/proplit.h b/src/sat/kissat/proplit.h index be0632d0c..203c1eb39 100644 --- a/src/sat/kissat/proplit.h +++ b/src/sat/kissat/proplit.h @@ -8,7 +8,7 @@ static inline void kissat_watch_large_delayed (kissat *solver, while (d != end_delayed) { const unsigned lit = *d++; KISSAT_assert (d != end_delayed); - const watch watch = {.raw = *d++}; + const watch watch = {/*.raw =*/ *d++}; // c++20 only KISSAT_assert (!watch.type.binary); KISSAT_assert (lit < LITS); watches *const lit_watches = all_watches + lit; diff --git a/src/sat/kissat/walk.c b/src/sat/kissat/walk.c index 72ce38a6c..18ebdd679 100644 --- a/src/sat/kissat/walk.c +++ b/src/sat/kissat/walk.c @@ -28,7 +28,7 @@ struct tagged { static inline tagged make_tagged (bool binary, unsigned ref) { KISSAT_assert (ref <= MAX_WALK_REF); - tagged res = {.ref = ref, .binary = binary}; + tagged res = {/*.ref = */ref, /*.binary = */binary}; // c++20 only return res; }