Skip to content

Commit 0d6adca

Browse files
committed
CI, Win32: Add x64 (64bit) binaries for Windows
By popular demand the CI now builds 64bit binaries for Windows. This allows SolveSpace to open large models (by accessing >4GB RAM). Fixes solvespace#1261
1 parent 910243b commit 0d6adca

File tree

2 files changed

+56
-5
lines changed

2 files changed

+56
-5
lines changed

.github/scripts/build-windows.sh

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,20 @@ if [ "$1" = "release" ]; then
99
else
1010
ENABLE_OPENMP="OFF"
1111
fi
12+
13+
if [ "$3" = "x64" ]; then
14+
PLATFORM="$3"
15+
else
16+
PLATFORM="Win32"
17+
fi
18+
1219
BUILD_TYPE=RelWithDebInfo
1320
cmake \
1421
-G "Visual Studio 17 2022" \
1522
-DCMAKE_BUILD_TYPE="${BUILD_TYPE}" \
1623
-DENABLE_OPENMP="${ENABLE_OPENMP}" \
1724
-DENABLE_LTO=ON \
18-
-DCMAKE_GENERATOR_PLATFORM="Win32" \
25+
-DCMAKE_GENERATOR_PLATFORM="${PLATFORM}" \
1926
..
2027
else
2128
BUILD_TYPE=Debug
@@ -31,6 +38,14 @@ cmake --build . --config "${BUILD_TYPE}" -- -maxcpucount
3138

3239
bin/$BUILD_TYPE/solvespace-testsuite.exe
3340

34-
if [ "$2" = "openmp" ]; then
35-
mv bin/$BUILD_TYPE/solvespace.exe bin/$BUILD_TYPE/solvespace-openmp.exe
41+
if [ "$3" = "x64" ]; then
42+
if [ "$2" != "openmp" ]; then
43+
mv bin/$BUILD_TYPE/solvespace.exe bin/$BUILD_TYPE/solvespace_single_core_x64.exe
44+
else
45+
mv bin/$BUILD_TYPE/solvespace.exe bin/$BUILD_TYPE/solvespace_x64.exe
46+
fi
47+
else
48+
if [ "$2" != "openmp" ]; then
49+
mv bin/$BUILD_TYPE/solvespace.exe bin/$BUILD_TYPE/solvespace_single_core.exe
50+
fi
3651
fi

.github/workflows/cd.yml

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ jobs:
7070
uses: actions/upload-artifact@v4
7171
with:
7272
name: windows
73-
path: build/bin/RelWithDebInfo/solvespace.exe
73+
path: build/bin/RelWithDebInfo/solvespace_single_core.exe
7474

7575
build_release_windows_openmp:
7676
needs: [test_ubuntu, test_windows, test_macos]
@@ -88,7 +88,43 @@ jobs:
8888
uses: actions/upload-artifact@v4
8989
with:
9090
name: windows-openmp
91-
path: build/bin/RelWithDebInfo/solvespace-openmp.exe
91+
path: build/bin/RelWithDebInfo/solvespace.exe
92+
93+
build_release_windows_x64:
94+
needs: [test_ubuntu, test_windows, test_macos]
95+
name: Build Release Windows x64
96+
runs-on: windows-2022
97+
steps:
98+
- uses: actions/checkout@v4
99+
- name: Install Dependencies
100+
run: .github/scripts/install-windows.sh
101+
shell: bash
102+
- name: Build & Test
103+
run: .github/scripts/build-windows.sh release not_openmp x64
104+
shell: bash
105+
- name: Upload artifact
106+
uses: actions/upload-artifact@v4
107+
with:
108+
name: windows
109+
path: build/bin/RelWithDebInfo/solvespace_single_core_x64.exe
110+
111+
build_release_windows_openmp_x64:
112+
needs: [test_ubuntu, test_windows, test_macos]
113+
name: Build Release Windows (OpenMP) x64
114+
runs-on: windows-2022
115+
steps:
116+
- uses: actions/checkout@v4
117+
- name: Install Dependencies
118+
run: .github/scripts/install-windows.sh
119+
shell: bash
120+
- name: Build & Test
121+
run: .github/scripts/build-windows.sh release openmp x64
122+
shell: bash
123+
- name: Upload artifact
124+
uses: actions/upload-artifact@v4
125+
with:
126+
name: windows-openmp
127+
path: build/bin/RelWithDebInfo/solvespace_x64.exe
92128

93129
build_release_macos:
94130
needs: [test_ubuntu, test_windows, test_macos]

0 commit comments

Comments
 (0)