-
Notifications
You must be signed in to change notification settings - Fork 54
103 lines (103 loc) · 3.69 KB
/
Copy pathwindows_sdist.yml
File metadata and controls
103 lines (103 loc) · 3.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
name: Windows Source Distribution
on: workflow_dispatch
jobs:
wheels-windows:
runs-on: windows-2022
strategy:
matrix:
include:
- arch: AMD64
platform: x64
boost-lib: 64
steps:
- name: Checkout ORE-SWIG
uses: actions/checkout@v4
- name: get QuantLib-SWIG
run: |
git submodule update --init
- name: Checkout ORE
uses: actions/checkout@v4
with:
repository: OpenSourceRisk/Engine
path: './ORE'
fetch-depth: 0
- name: get QuantLib
run: |
cd ORE
git submodule update --init
cd ..
- name: zlib
run: |
$Url = "https://www.zlib.net/zlib131.zip"
(New-Object System.Net.WebClient).DownloadFile($Url, "$env:TEMP\zlib.zip")
Expand-Archive -Path "$env:TEMP\zlib.zip" -DestinationPath C:\local
cd C:\local\zlib-1.3.1
mkdir build
cd build
cmake ..
cmake --build . --config Release
- name: eigen
run: |
$Url = "https://gitlab.com/libeigen/eigen/-/archive/3.4.0/eigen-3.4.0.zip"
(New-Object System.Net.WebClient).DownloadFile($Url, "$env:TEMP\eigen.zip")
Expand-Archive -Path "$env:TEMP\eigen.zip" -DestinationPath C:\local
cd C:\local\eigen-3.4.0
mkdir build
cd build
cmake ..
- name: Build Boost
run: |
$Url = "https://boostorg.jfrog.io/artifactory/main/release/1.72.0/binaries/boost_1_72_0-msvc-14.2-${{ matrix.boost-lib }}.exe"
(New-Object System.Net.WebClient).DownloadFile($Url, "$env:TEMP\boost.exe")
Start-Process -Wait -FilePath "$env:TEMP\boost.exe" "/SILENT","/SP-","/SUPPRESSMSGBOXES","/DIR=C:\local\boost"
choco install -y ninja
- name: Build ORE
env:
Boost_ROOT: C:\local\boost
shell: cmd
run: |
pwd
cd ORE
SET ORE_DIR=%cd%
SET ORE=%cd%
mkdir build
cd build
SET ZLIB_ROOT=C:\local\zlib-1.3.1
SET Eigen3_DIR=C:\local\eigen-3.4.0
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Vc\Auxiliary\Build\vcvarsall.bat" ${{ matrix.arch }} -vcvars_ver=14.2 || exit 1
cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release -DQL_BUILD_EXAMPLES=false -DQL_BUILD_TEST_SUITE=false -DQL_BUILD_BENCHMARK=false -DQL_ENABLE_SESSIONS=true -DORE_BUILD_DOC=false -DMSVC_LINK_DYNAMIC_RUNTIME=OFF -DORE_USE_ZLIB=ON -DBOOST_INCLUDEDIR=C:\local\boost -DZLIB_LIBRARY=C:\local\zlib-1.3.1\build\Release\zlib.lib -DBOOST_LIBRARYDIR=C:\local\boost\lib64-msvc-14.3 -L
cmake --build . -j 2 --verbose
- name: Wrap ORE-SWIG with Setup.py
run: |
SET ORE=D:\a\ORE-SWIG\ORE-SWIG\ORE
SET ORE_DIR=D:\a\ORE-SWIG\ORE-SWIG\ORE
SET ZLIB_ROOT=C:\local\zlib-1.3.1
SET Eigen3_DIR=C:\local\eigen-3.4.0
SET BOOST_INCLUDEDIR=C:\local\boost
SET BOOST_ROOT=C:\local\boost
SET BOOST_LIBRARYDIR=C:\local\boost\lib${{ matrix.boost-lib }}-msvc-14.2
cd D:\a\ORE-SWIG\ORE-SWIG\OREAnalytics-SWIG\Python
python setup.py wrap
- name: Build ORE sdist
env:
BOOST_ROOT: C:\local\boost
BOOST_LIB: C:\local\boost\lib${{ matrix.boost-lib }}-msvc-14.2
ORE: D:\a\ORE-SWIG\ORE-SWIG\ORE
ORE_DIR: D:\a\ORE-SWIG\ORE-SWIG\ORE
ORE_STATIC_RUNTIME: 1
ORE_USE_ZLIB: 1
run: |
pwd
cd OREAnalytics-SWIG/Python
pwd
pip install build
python setup.py sdist
pwd
dir
cd dist
dir
- name: Upload sdist as artefacts
uses: actions/upload-artifact@v4
with:
name: sdist-${{matrix.arch}}
path: D:\a\ORE-SWIG\ORE-SWIG\OREAnalytics-SWIG\Python\dist\*.tar.gz