@@ -45,19 +45,45 @@ jobs:
4545 strategy :
4646 fail-fast : false
4747 matrix :
48- # platform: [macos-13, windows-latest, ubuntu-latest, macos-14]
49- platform : [macos-13, ubuntu-latest, macos-14]
48+ platform : [macos-13, windows-latest, ubuntu-latest, macos-14]
5049
5150 runs-on : ${{ matrix.platform }}
5251
5352 steps :
54- - name : checkout vcell-solvers repo
53+ - name : checkout vcell-ode repo
5554 uses : actions/checkout@v4
5655
57- - uses : actions/setup-python@v5
56+ - name : Install Python 3.10
57+ uses : actions/setup-python@v5
5858 with :
5959 python-version : ' 3.10'
6060
61+ - name : Install Windows Dependencies (Part 0 - Setup LLVM-style)
62+ if : matrix.platform == 'windows-latest'
63+ uses : llvm/actions/setup-windows@main
64+ with :
65+ arch : amd64
66+
67+ - name : Install Windows Dependencies (Part 1 - Configure Conan ...and zip)
68+ if : matrix.platform == 'windows-latest'
69+ shell : powershell
70+ run : |
71+ choco install zip -y
72+ choco install conan -y
73+ $conanDir = "C:\Program Files\Conan\conan"
74+ $env:PATH = "$conanDir;$env:PATH"
75+ $conanDir | Set-Content -Path $env:GITHUB_PATH
76+ $env:CONAN_HOME = "C:\.conan"
77+ "CONAN_HOME=C:\.conan" | Out-File -FilePath $env:GITHUB_ENV -Append
78+ conan --version
79+ conan profile detect --force
80+
81+ - name : Install Windows Dependencies (Part 2 - Reconfigure Conan)
82+ if : matrix.platform == 'windows-latest'
83+ shell : bash
84+ run : |
85+ cp conan-profiles/CI-CD/Windows-AMD64_profile.txt $CONAN_HOME/profiles/default
86+
6187 - name : Install Intel MacOS dependencies
6288 if : matrix.platform == 'macos-13'
6389 shell : bash
@@ -92,30 +118,54 @@ jobs:
92118 touch ~/.conan2/profiles/default # if we don't make a file first, cp thinks its a folder that doesn't exist
93119 cp conan-profiles/CI-CD/Linux-AMD64_profile.txt ~/.conan2/profiles/default
94120
121+ - name : Install Dependencies through Conan on Windows
122+ if : matrix.platform == 'windows-latest'
123+ shell : powershell
124+ run : |
125+ conan install . --output-folder build --build=missing -o include_messaging=False
126+
95127 - name : Install Dependencies through Conan on Unix
128+ if : matrix.platform == 'macos-13' || matrix.platform == 'macos-14'
96129 shell : bash
97130 run : |
98- conan install . --output-folder build --build SundialsSolverStandalone_x64
131+ conan install . --output-folder build --build=missing
99132
100- # - name: Build on Macos
101- # if: matrix.platform == 'macos-13' || matrix.platform == 'macos-14'
102- # run: |
103- # platform=macos
104- # echo "working dir is $PWD"
105- #
106- # cd build
107- # export PATH="/opt/homebrew/opt/llvm/bin:$PATH"
108- # cmake -B . -S .. -G "Ninja" -DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" -DCMAKE_BUILD_TYPE=Debug
109- # cmake --build .
133+ - name : Install Dependencies through Conan on Unix
134+ if : matrix.platform == 'ubuntu-latest'
135+ shell : bash
136+ run : |
137+ sudo apt --purge remove gcc
138+ sudo ln -s /usr/bin/clang /usr/bin/cc
139+ sudo apt install mold libc++-dev libc++abi-dev
140+ sudo rm /usr/bin/ld
141+ sudo ln -s $(which mold) /usr/bin/ld
142+ conan install . --output-folder build --build=missing
143+
144+ - name : Build Windows
145+ if : matrix.platform == 'windows-latest'
146+ shell : powershell
147+ run : |
148+ cd build
149+ ./conanbuild.ps1
150+ cmake -B . -S .. -G "Ninja" -DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" -DCMAKE_BUILD_TYPE=Debug -DOPTION_EXTRA_CONFIG_INFO=ON
151+ cmake --build . --config Release
110152
111153 - name : Build Unix
112154 if : matrix.platform == 'ubuntu-latest' || matrix.platform == 'macos-13' || matrix.platform == 'macos-14'
113155 run : |
114156 echo "working dir is $PWD"
115157
116158 cd build
159+ source conanbuild.sh
117160 cmake -B . -S .. -G "Ninja" -DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" -DCMAKE_BUILD_TYPE=Debug
118- cmake --build .
161+ cmake --build . --config Release
162+
163+ - name : Test Windows
164+ if : matrix.platform == 'windows-latest'
165+ run : |
166+ cd build
167+ ctest -VV
168+ ./bin/SundialsSolverStandalone_x64 || true
119169
120170 - name : Test Unix
121171 if : matrix.platform == 'macos-13' || matrix.platform == 'macos-14' || matrix.platform == 'ubuntu-latest'
@@ -127,76 +177,6 @@ jobs:
127177 echo "------ running SundialsSolverStandalone_x64 ------"
128178 ./bin/SundialsSolverStandalone_x64 || true
129179
130- # - name: Setup tmate session
131- # uses: mxschmitt/action-tmate@v3
132- # with:
133- # limit-access-to-actor: false
134-
135-
136- # - name: Install Windows Dependencies
137- # if: matrix.platform == 'windows-latest'
138- # uses: msys2/setup-msys2@v2
139- # with:
140- # msystem: CLANG64
141- # update: true
142- # install: >
143- # zip
144- # git
145- # mingw-w64-clang-x86_64-curl
146- # mingw-w64-clang-x86_64-toolchain
147- # mingw-w64-clang-x86_64-flang
148- # mingw-w64-clang-x86_64-cmake
149- # mingw-w64-clang-x86_64-boost
150- # mingw-w64-clang-x86_64-hdf5
151- # mingw-w64-clang-x86_64-libzip
152- # mingw-w64-clang-x86_64-netcdf
153- # mingw-w64-clang-x86_64-zlib
154- # mingw-w64-clang-x86_64-libaec
155-
156- # - name: Setup tmate session
157- # uses: mxschmitt/action-tmate@v3
158- # with:
159- # limit-access-to-actor: false
160-
161- # - name: Build Windows
162- # if: matrix.platform == 'windows-latest'
163- # shell: msys2 {0}
164- # run: |
165- # platform=windows
166- # echo "working dir is $PWD"
167- #
168- # mkdir build
169- # cd build
170- #
171- # export PATH="/c/Program\ Files/LLVM/bin:$PATH"
172- #
173- # cmake \
174- # -G Ninja \
175- # -DCMAKE_C_COMPILER="clang.exe" \
176- # -DCMAKE_CXX_COMPILER="clang++.exe" \
177- # -DOPTION_TARGET_MESSAGING=OFF \
178- # -DOPTION_TARGET_DOCS=OFF \
179- # -B . -S ..
180- #
181- # ninja -j 1
182-
183- # - name: Test Windows
184- # if: matrix.platform == 'windows-latest'
185- # shell: msys2 {0}
186- # run: |
187- # platform=windows
188- # echo "working dir is $PWD"
189- #
190- # cd build
191- #
192- # export PATH="/d/a/_temp/msys64/clang64/bin:$PATH"
193- # pacman -Sy --noconfirm diffutils
194- #
195- # ctest -VV
196- #
197- # echo "------ running SundialsSolverStandalone_x64 ------"
198- # ./bin/SundialsSolverStandalone_x64 || true
199-
200180
201181 - name : fix Macos shared object paths
202182 if : matrix.platform == 'macos-13' || matrix.platform == 'macos-14'
@@ -213,20 +193,21 @@ jobs:
213193 ../../.github/scripts/install_name_tool_macos.sh
214194 tar czvf ../upload/mac64.tgz --dereference .
215195
216- # - name: handle shared object paths for Windows native build
217- # if: matrix.platform == 'windows-latest'
218- # shell: msys2 {0}
219- # run: |
220- # mkdir build/upload
221- # cd build/bin
222- # rm hello_test TestVCellStoch testzip ziptool || true
223- # ls *.exe | awk '{print $1}' | xargs -I '{}' ldd '{}' | grep '=> /' | grep -v build | grep -iv windows | awk '{print $3}' | xargs -I '{}' cp -vn '{}' . || true
224- # ls *.dll | awk '{print $1}' | xargs -I '{}' ldd '{}' | grep '=> /' | grep -v build | grep -iv windows | awk '{print $3}' | xargs -I '{}' cp -vn '{}' . || true
225- # ls *.dll | awk '{print $1}' | xargs -I '{}' ldd '{}' | grep '=> /' | grep -v build | grep -iv windows | awk '{print $3}' | xargs -I '{}' cp -vn '{}' . || true
226- # chmod u+w,+x *
227- # zip ../upload/win64.zip ./*
228- # cd ../..
229- # # fi
196+ - name : handle shared object paths for Windows native build
197+ if : matrix.platform == 'windows-latest'
198+ shell : bash
199+ run : |
200+ mkdir build/upload
201+ cd build/bin
202+ rm hello_test* *.pdb || true
203+ ls *.exe | awk '{print $1}' | xargs -I '{}' ldd '{}' | grep '=> /' | grep -v build | grep -iv windows | awk '{print $3}' | xargs -I '{}' cp -vn '{}' . || true
204+ # Currently, Sundials only requires system32 dlls!
205+ # ls *.dll | awk '{print $1}' | xargs -I '{}' ldd '{}' | grep '=> /' | grep -v build | grep -iv windows | awk '{print $3}' | xargs -I '{}' cp -vn '{}' . || true
206+ # ls *.dll | awk '{print $1}' | xargs -I '{}' ldd '{}' | grep '=> /' | grep -v build | grep -iv windows | awk '{print $3}' | xargs -I '{}' cp -vn '{}' . || true
207+ chmod u+w,+x *
208+ zip ../upload/win64.zip ./*
209+ cd ../..
210+ # fi
230211
231212 - name : handle shared object paths for Linux native build
232213 if : matrix.platform == 'ubuntu-latest'
@@ -256,12 +237,12 @@ jobs:
256237 name : macos_arm64.tgz
257238 path : build/upload/mac64.tgz
258239
259- # - name: Upload Windows binaries
260- # if: matrix.platform == 'windows-latest'
261- # uses: actions/upload-artifact@v4
262- # with:
263- # name: win64.zip
264- # path: build/upload/win64.zip
240+ - name : Upload Windows binaries
241+ if : matrix.platform == 'windows-latest'
242+ uses : actions/upload-artifact@v4
243+ with :
244+ name : win64.zip
245+ path : build/upload/win64.zip
265246
266247 - name : Upload Linux binaries
267248 if : matrix.platform == 'ubuntu-latest'
0 commit comments