Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate windows build #986

Merged
merged 2 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: "ubuntu-latest"

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install dependencies
run: |
Expand Down
20 changes: 12 additions & 8 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
tags: "*"
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
build-test-cmake:
name: CMake
Expand All @@ -20,14 +24,14 @@ 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


- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: '3.11'

Expand Down Expand Up @@ -70,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
Expand All @@ -83,16 +87,16 @@ jobs:
if: matrix.os == 'ubuntu-latest'

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

- name: Build macOS/Windows Wheel
- name: Build macOS Wheel
if: runner.os == 'macOS'
run: pip wheel . --no-deps -w dist
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/*
Expand Down Expand Up @@ -135,7 +139,7 @@ jobs:

steps:
- name: Get wheels
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
path: artifacts

Expand Down
47 changes: 47 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Windows Compile

on:
push:
branches:
- main
- 'version-**'
tags: "*"
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
build-cmake:
name: CMake

strategy:
fail-fast: false
matrix:
os: ['windows-2019']

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
with:
# required for `git describe --tags` to work
fetch-depth: 0

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install dependencies
run: |
python.exe -m pip install --upgrade pip
python.exe -m pip install "conan<2"
- name: Build ResData
run: |
python.exe -m pip install -r requirements.txt
mkdir cmake-build
cmake -S . -B cmake-build -G "Visual Studio 16 2019"
cmake --build cmake-build
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ scratch.sparsebundle
/venv/
/_skbuild/
/python/resdata/version.py
.*
*.egg-info/

/dist
Expand Down
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down