From 3b79f9f9f03762799f17374fb9e668fbd6381859 Mon Sep 17 00:00:00 2001 From: larsevj Date: Fri, 28 Jun 2024 13:56:58 +0200 Subject: [PATCH] Try more --- .github/workflows/style.yml | 2 +- .github/workflows/testing.yml | 8 ++++---- .github/workflows/windows.yml | 8 ++++---- CMakeLists.txt | 6 +++++- VisualStudio/stdbool.h | 26 -------------------------- lib/include/ert/stdbool.h | 26 -------------------------- 6 files changed, 14 insertions(+), 62 deletions(-) delete mode 100644 VisualStudio/stdbool.h delete mode 100644 lib/include/ert/stdbool.h diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml index cd43adbbe8..0dbb6e2699 100644 --- a/.github/workflows/style.yml +++ b/.github/workflows/style.yml @@ -9,7 +9,7 @@ jobs: runs-on: "ubuntu-latest" steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install dependencies run: | diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index a922211e2e..b26ae995de 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -74,7 +74,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: # required for `git describe --tags` to work fetch-depth: 0 @@ -87,7 +87,7 @@ jobs: if: matrix.os == 'ubuntu-latest' - name: Setup Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} @@ -96,7 +96,7 @@ jobs: if: matrix.os != 'ubuntu-latest' - name: Upload wheel as artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: ${{ matrix.os }} Python ${{ matrix.python }} wheel path: dist/* @@ -139,7 +139,7 @@ jobs: steps: - name: Get wheels - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 with: path: artifacts diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 613581b8d9..fd639be932 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -36,12 +36,12 @@ jobs: - name: Install dependencies run: | - pip install -U pip - pip install "conan<2" + python.exe -m pip install --upgrade pip + python.exe -m install "conan<2" - name: Build ResData run: | - python3 -m pip install -r requirements.txt + python.exe -m pip install -r requirements.txt mkdir cmake-build - cmake -S . -B cmake-build -G "Visual Studio 16 2019" -DBUILD_SHARED_LIBS="ON" -DBUILD_TESTING=OFF + cmake -S . -B cmake-build -G "Visual Studio 16 2019" cmake --build cmake-build diff --git a/CMakeLists.txt b/CMakeLists.txt index 7b2852ef64..773bd6328f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,11 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) include(GNUInstallDirs) include(TestBigEndian) -option(BUILD_TESTS "Should the tests be built" ON) +if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") + option(BUILD_TESTS "Should the tests be built" OFF) +else() + option(BUILD_TESTS "Should the tests be built" ON) +endif() option(BUILD_APPLICATIONS "Should we build small utility applications" OFF) option(BUILD_RD_SUMMARY "Build the commandline application rd_summary" OFF) option(BUILD_SHARED_LIBS "Build shared libraries" ON) diff --git a/VisualStudio/stdbool.h b/VisualStudio/stdbool.h deleted file mode 100644 index c599cf5cbd..0000000000 --- a/VisualStudio/stdbool.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - The ert code is based on C99, and in particular makes extensive use - of the C99 feature stdbool.h. When including the ert headers in a - VisualStudio C++ project this creates problems because the - VisualStudio C compiler is not C99 conforming, and the compiler will - complain it can not find the stdbool.h header. - - The symbols defined in the stdbool header are actually correctly(?) - defined by the VisualStudio compiler already, so this header file - does not define any bool related symbols! - - To actually use this file you should copy it manually into the ert - include directory as used by VisualStudio. -*/ - -#ifndef ERT_STDBOOL_H -#define ERT_STDBOOL_H - -#ifndef __cplusplus -typedef int bool; -#define true 1 -#define false 0 -#endif - - -#endif diff --git a/lib/include/ert/stdbool.h b/lib/include/ert/stdbool.h deleted file mode 100644 index c599cf5cbd..0000000000 --- a/lib/include/ert/stdbool.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - The ert code is based on C99, and in particular makes extensive use - of the C99 feature stdbool.h. When including the ert headers in a - VisualStudio C++ project this creates problems because the - VisualStudio C compiler is not C99 conforming, and the compiler will - complain it can not find the stdbool.h header. - - The symbols defined in the stdbool header are actually correctly(?) - defined by the VisualStudio compiler already, so this header file - does not define any bool related symbols! - - To actually use this file you should copy it manually into the ert - include directory as used by VisualStudio. -*/ - -#ifndef ERT_STDBOOL_H -#define ERT_STDBOOL_H - -#ifndef __cplusplus -typedef int bool; -#define true 1 -#define false 0 -#endif - - -#endif