Skip to content

Commit

Permalink
Add back windows build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
larsevj committed Jul 23, 2024
1 parent fefb1ba commit 075ad56
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 1 deletion.
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
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

0 comments on commit 075ad56

Please sign in to comment.