@@ -45,19 +45,44 @@ 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)
68+ if : matrix.platform == 'windows-latest'
69+ shell : powershell
70+ run : |
71+ choco install conan -y
72+ $conanDir = "C:\Program Files\Conan\conan"
73+ $env:PATH = "$conanDir;$env:PATH"
74+ $conanDir | Set-Content -Path $env:GITHUB_PATH
75+ $env:CONAN_HOME = "C:\.conan"
76+ "CONAN_HOME=C:\.conan" | Out-File -FilePath $env:GITHUB_ENV -Append
77+ conan --version
78+ conan profile detect --force
79+
80+ - name : Install Windows Dependencies (Part 2 - Reconfigure Conan)
81+ if : matrix.platform == 'windows-latest'
82+ shell : bash
83+ run : |
84+ cp conan-profiles/CI-CD/Windows-AMD64_profile.txt $CONAN_HOME/profiles/default
85+
6186 - name : Install Intel MacOS dependencies
6287 if : matrix.platform == 'macos-13'
6388 shell : bash
@@ -92,30 +117,42 @@ jobs:
92117 touch ~/.conan2/profiles/default # if we don't make a file first, cp thinks its a folder that doesn't exist
93118 cp conan-profiles/CI-CD/Linux-AMD64_profile.txt ~/.conan2/profiles/default
94119
120+ - name : Install Dependencies through Conan on Windows
121+ if : matrix.platform == 'windows-latest'
122+ shell : powershell
123+ run : |
124+ conan install . --output-folder build --build=missing -o include_messaging=False
125+
95126 - name : Install Dependencies through Conan on Unix
127+ if : matrix.platform != 'windows-latest'
96128 shell : bash
97129 run : |
98- conan install . --output-folder build --build SundialsSolverStandalone_x64
130+ conan install . --output-folder build --build=missing
99131
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 .
132+ - name : Build Windows
133+ if : matrix.platform == 'windows-latest'
134+ run : |
135+ cd build
136+ ./conanbuild.bat
137+ cmake -B . -S .. -DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" -DCMAKE_BUILD_TYPE=Debug
138+ cmake --build . --config Release
110139
111140 - name : Build Unix
112141 if : matrix.platform == 'ubuntu-latest' || matrix.platform == 'macos-13' || matrix.platform == 'macos-14'
113142 run : |
114143 echo "working dir is $PWD"
115144
116145 cd build
146+ source conanbuild.sh
117147 cmake -B . -S .. -G "Ninja" -DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" -DCMAKE_BUILD_TYPE=Debug
118- cmake --build .
148+ cmake --build . --config Release
149+
150+ - name : Test Windows
151+ if : matrix.platform == 'windows-latest'
152+ run : |
153+ cd build
154+ ctest -VV
155+ ./bin/SundialsSolverStandalone_x64 || true
119156
120157 - name : Test Unix
121158 if : matrix.platform == 'macos-13' || matrix.platform == 'macos-14' || matrix.platform == 'ubuntu-latest'
@@ -127,36 +164,6 @@ jobs:
127164 echo "------ running SundialsSolverStandalone_x64 ------"
128165 ./bin/SundialsSolverStandalone_x64 || true
129166
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
160167
161168# - name: Build Windows
162169# if: matrix.platform == 'windows-latest'
@@ -180,23 +187,6 @@ jobs:
180187#
181188# ninja -j 1
182189
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-
200190
201191 - name : fix Macos shared object paths
202192 if : matrix.platform == 'macos-13' || matrix.platform == 'macos-14'
@@ -213,20 +203,20 @@ jobs:
213203 ../../.github/scripts/install_name_tool_macos.sh
214204 tar czvf ../upload/mac64.tgz --dereference .
215205
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
206+ - name : handle shared object paths for Windows native build
207+ if : matrix.platform == 'windows-latest'
208+ shell : bash
209+ run : |
210+ mkdir build/upload
211+ cd build/bin
212+ rm hello_test TestVCellStoch testzip ziptool || true
213+ ls *.exe | awk '{print $1}' | xargs -I '{}' ldd '{}' | grep '=> /' | grep -v build | grep -iv windows | awk '{print $3}' | xargs -I '{}' cp -vn '{}' . || true
214+ ls *.dll | awk '{print $1}' | xargs -I '{}' ldd '{}' | grep '=> /' | grep -v build | grep -iv windows | awk '{print $3}' | xargs -I '{}' cp -vn '{}' . || true
215+ ls *.dll | awk '{print $1}' | xargs -I '{}' ldd '{}' | grep '=> /' | grep -v build | grep -iv windows | awk '{print $3}' | xargs -I '{}' cp -vn '{}' . || true
216+ chmod u+w,+x *
217+ zip ../upload/win64.zip ./*
218+ cd ../..
219+ # fi
230220
231221 - name : handle shared object paths for Linux native build
232222 if : matrix.platform == 'ubuntu-latest'
@@ -256,12 +246,12 @@ jobs:
256246 name : macos_arm64.tgz
257247 path : build/upload/mac64.tgz
258248
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
249+ - name : Upload Windows binaries
250+ if : matrix.platform == 'windows-latest'
251+ uses : actions/upload-artifact@v4
252+ with :
253+ name : win64.zip
254+ path : build/upload/win64.zip
265255
266256 - name : Upload Linux binaries
267257 if : matrix.platform == 'ubuntu-latest'
0 commit comments