Skip to content

Commit 83f9706

Browse files
committed
WIP windows CI
1 parent d88d4ab commit 83f9706

File tree

1 file changed

+46
-1
lines changed

1 file changed

+46
-1
lines changed

.github/workflows/ci.yml

+46-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,52 @@ on:
77
pull_request:
88

99
jobs:
10-
build:
10+
Win64:
11+
runs-on: windows-latest
12+
strategy:
13+
fail-fast: true
14+
env:
15+
BASE_DIR: ${{ github.workspace }}
16+
SRC_DIR: ${{ github.workspace }}/src
17+
BUILD_DIR: ${{ github.workspace }}/build
18+
INSTALL_PREFIX: ${{ github.workspace }}/cadet
19+
steps:
20+
- uses: actions/checkout@v4
21+
with:
22+
submodules: true
23+
path: src
24+
ref: ${{ github.event.inputs.ref || github.ref }}
25+
- uses: ilammy/msvc-dev-cmd@v1
26+
- name: Get MSVC version
27+
id: get-msvc
28+
run: |
29+
$MSVC_VERSION = cl 2>&1 | Select-String -Pattern 'Version (\d\d\.\d\d)' | % { $_.matches.groups[1].Value }
30+
echo "version=$MSVC_VERSION" >> $Env:GITHUB_OUTPUT
31+
- uses: actions/cache@v4
32+
id: cache
33+
with:
34+
path: |
35+
${{ github.workspace }}/hdf5
36+
${{ github.workspace }}/eigen/install
37+
key: ${{ runner.os }}-deps-${{ steps.get-msvc.outputs.version }}-1
38+
- name: Build HDF5 and Eigen3
39+
if: steps.cache.outputs.cache-hit != 'true'
40+
run: |
41+
$base_dir = $($env:BASE_DIR.Replace('\', '/'))
42+
Invoke-WebRequest -Uri "https://www.hdfgroup.org/package/cmake-hdf5-1-14-0-zip/?wpdmdl=17553" -OutFile hdf5.zip
43+
7z x hdf5.zip
44+
cd CMake-hdf5-1.14.0
45+
cmake -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_SHARED_LIBS:BOOL=ON -DHDF5_BUILD_FORTRAN:BOOL=OFF -DHDF5_ENABLE_F2003:BOOL=OFF -DHDF5_BUILD_JAVA:BOOL=OFF -DCMAKE_INSTALL_PREFIX:PATH="${base_dir}/hdf5" -DCTEST_CONFIGURATION_TYPE:STRING=Release -DBUILD_TESTING=ON -DHDF5_BUILD_TOOLS=OFF -DHDF5_BUILD_EXAMPLES=OFF -DHDF5_BUILD_HL_LIB=OFF -DHDF5_BUILD_CPP_LIB=OFF -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING=TGZ -DTGZPATH:PATH="${base_dir}/CMake-hdf5-1.14.0" -DHDF5_PACKAGE_EXTLIBS:BOOL=ON -DSITE:STRING=WIN10VS202264.XXXX -DBUILDNAME:STRING=Windows-WIN10-vs2022-STATIC -G "Ninja" hdf5-1.14.0
46+
ninja install
47+
cd "${env:BASE_DIR}"
48+
Invoke-WebRequest -Uri "https://gitlab.com/libeigen/eigen/-/archive/3.4.0/eigen-3.4.0.zip" -OutFile eigen.zip
49+
7z x eigen.zip -oeigen\code -y
50+
cd eigen
51+
mkdir build
52+
cd build
53+
cmake ../code/eigen-3.4.0 -DCMAKE_INSTALL_PREFIX="../install"
54+
cmake --build . --target install
55+
Ubuntu-latest:
1156
runs-on: ubuntu-latest
1257

1358
steps:

0 commit comments

Comments
 (0)