@@ -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,43 @@ 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+ shell : powershell
135+ run : |
136+ cd build
137+ ./conanbuild.ps1
138+ cmake -B . -S .. -G "Ninja" -DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" -DCMAKE_BUILD_TYPE=Debug
139+ cmake --build . --config Release
110140
111141 - name : Build Unix
112142 if : matrix.platform == 'ubuntu-latest' || matrix.platform == 'macos-13' || matrix.platform == 'macos-14'
113143 run : |
114144 echo "working dir is $PWD"
115145
116146 cd build
147+ source conanbuild.sh
117148 cmake -B . -S .. -G "Ninja" -DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" -DCMAKE_BUILD_TYPE=Debug
118- cmake --build .
149+ cmake --build . --config Release
150+
151+ - name : Test Windows
152+ if : matrix.platform == 'windows-latest'
153+ run : |
154+ cd build
155+ ctest -VV
156+ ./bin/SundialsSolverStandalone_x64 || true
119157
120158 - name : Test Unix
121159 if : matrix.platform == 'macos-13' || matrix.platform == 'macos-14' || matrix.platform == 'ubuntu-latest'
@@ -127,36 +165,6 @@ jobs:
127165 echo "------ running SundialsSolverStandalone_x64 ------"
128166 ./bin/SundialsSolverStandalone_x64 || true
129167
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
160168
161169# - name: Build Windows
162170# if: matrix.platform == 'windows-latest'
@@ -180,23 +188,6 @@ jobs:
180188#
181189# ninja -j 1
182190
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-
200191
201192 - name : fix Macos shared object paths
202193 if : matrix.platform == 'macos-13' || matrix.platform == 'macos-14'
@@ -213,20 +204,20 @@ jobs:
213204 ../../.github/scripts/install_name_tool_macos.sh
214205 tar czvf ../upload/mac64.tgz --dereference .
215206
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
207+ - name : handle shared object paths for Windows native build
208+ if : matrix.platform == 'windows-latest'
209+ shell : bash
210+ run : |
211+ mkdir build/upload
212+ cd build/bin
213+ rm hello_test TestVCellStoch testzip ziptool || true
214+ ls *.exe | 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+ ls *.dll | awk '{print $1}' | xargs -I '{}' ldd '{}' | grep '=> /' | grep -v build | grep -iv windows | awk '{print $3}' | xargs -I '{}' cp -vn '{}' . || true
217+ chmod u+w,+x *
218+ zip ../upload/win64.zip ./*
219+ cd ../..
220+ # fi
230221
231222 - name : handle shared object paths for Linux native build
232223 if : matrix.platform == 'ubuntu-latest'
@@ -256,12 +247,12 @@ jobs:
256247 name : macos_arm64.tgz
257248 path : build/upload/mac64.tgz
258249
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
250+ - name : Upload Windows binaries
251+ if : matrix.platform == 'windows-latest'
252+ uses : actions/upload-artifact@v4
253+ with :
254+ name : win64.zip
255+ path : build/upload/win64.zip
265256
266257 - name : Upload Linux binaries
267258 if : matrix.platform == 'ubuntu-latest'
0 commit comments