Skip to content

Commit

Permalink
first try with microsoft visual studio clang on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
jcschaff committed Jul 26, 2024
1 parent d738169 commit 23dc955
Showing 1 changed file with 125 additions and 40 deletions.
165 changes: 125 additions & 40 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,47 +184,135 @@ jobs:
# limit-access-to-actor: false


- name: Install Windows Dependencies
# - name: Install Windows Dependencies
# if: matrix.platform == 'windows-latest'
# uses: msys2/setup-msys2@v2
# with:
# msystem: CLANG64
# update: true
# install: >
# zip
# git
# mingw-w64-clang-x86_64-curl
# mingw-w64-clang-x86_64-toolchain
# mingw-w64-clang-x86_64-flang
# mingw-w64-clang-x86_64-cmake
# mingw-w64-clang-x86_64-boost
# mingw-w64-clang-x86_64-hdf5
# mingw-w64-clang-x86_64-libzip
# mingw-w64-clang-x86_64-netcdf
# mingw-w64-clang-x86_64-zlib
# mingw-w64-clang-x86_64-libaec
#
## - name: Setup tmate session
## uses: mxschmitt/action-tmate@v3
## with:
## limit-access-to-actor: false
#
# - name: Build Windows
# if: matrix.platform == 'windows-latest'
# shell: msys2 {0}
# run: |
# platform=windows
# echo "working dir is $PWD"
#
# mkdir build
# cd build
#
# export PATH="/c/Program\ Files/LLVM/bin:$PATH"
#
# cmake \
# -G Ninja \
# -DCMAKE_C_COMPILER="clang.exe" \
# -DCMAKE_CXX_COMPILER="clang++.exe" \
# -DOPTION_TARGET_MESSAGING=OFF \
# -DOPTION_TARGET_PARALLEL=OFF \
# -DOPTION_TARGET_CHOMBO2D_SOLVER=OFF \
# -DOPTION_TARGET_CHOMBO3D_SOLVER=OFF \
# -DOPTION_TARGET_SMOLDYN_SOLVER=ON \
# -DOPTION_TARGET_FV_SOLVER=ON \
# -DOPTION_TARGET_STOCHASTIC_SOLVER=ON \
# -DOPTION_TARGET_NFSIM_SOLVER=ON \
# -DOPTION_TARGET_MOVINGBOUNDARY_SOLVER=OFF \
# -DOPTION_TARGET_SUNDIALS_SOLVER=ON \
# -DOPTION_TARGET_HY3S_SOLVERS=OFF \
# -DOPTION_TARGET_DOCS=OFF \
# -B . -S ..
#
# ninja -j 1
#
# ctest -VV || true
#
# echo "------ running FiniteVolume_x64 ------"
# ./bin/FiniteVolume_x64 || true
# echo
# echo "------ running NFsim_x64 ------"
# ./bin/NFsim_x64 || true
# echo "------ running SundialsSolverStandalone_x64 ------"
# ./bin/SundialsSolverStandalone_x64 || true
# echo "------ running VCellStoch_x64 ------"
# ./bin/VCellStoch_x64 || true
# echo "------ running smoldyn_x64 ------"
# ./bin/smoldyn_x64 || true
# echo "------ running testzip ------"
# ./bin/testzip || true
# echo "------ running ziptool ------"
# ./bin/ziptool || true
#
#
# - name: Test Windows
# if: matrix.platform == 'windows-latest'
# shell: msys2 {0}
# run: |
# export platform=windows
# echo "working dir is $PWD"
#
# cd build
#
# export PATH="/c/Program\ Files/LLVM/bin:$PATH"
#
# ctest -VV
#
# echo "------ running FiniteVolume_x64 ------"
# ./bin/FiniteVolume_x64 || true
# echo
# echo "------ running NFsim_x64 ------"
# ./bin/NFsim_x64 || true
# echo "------ running SundialsSolverStandalone_x64 ------"
# ./bin/SundialsSolverStandalone_x64 || true
# echo "------ running VCellStoch_x64 ------"
# ./bin/VCellStoch_x64 || true
# echo "------ running smoldyn_x64 ------"
# ./bin/smoldyn_x64 || true
# echo "------ running testzip ------"
# ./bin/testzip || true
# echo "------ running ziptool ------"
# ./bin/ziptool || true

- name: Setup Visual Studio build tools
if: matrix.platform == 'windows-latest'
uses: msys2/setup-msys2@v2
uses: actions/vs-build-tools@v1
with:
msystem: CLANG64
update: true
install: >
zip
git
mingw-w64-clang-x86_64-curl
mingw-w64-clang-x86_64-toolchain
mingw-w64-clang-x86_64-flang
mingw-w64-clang-x86_64-cmake
mingw-w64-clang-x86_64-boost
mingw-w64-clang-x86_64-hdf5
mingw-w64-clang-x86_64-libzip
mingw-w64-clang-x86_64-netcdf
mingw-w64-clang-x86_64-zlib
mingw-w64-clang-x86_64-libaec
installPath: C:\BuildTools
version: 16
components: Microsoft.VisualStudio.Component.VC.Tools.x86.x64

# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3
# with:
# limit-access-to-actor: false
- name: Add clang-cl to PATH
if: matrix.platform == 'windows-latest'
run: echo "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\Llvm\bin" >> $GITHUB_PATH

- name: Build Windows
if: matrix.platform == 'windows-latest'
shell: msys2 {0}
run: |
platform=windows
echo "working dir is $PWD"
mkdir build
cd build
export PATH="/c/Program\ Files/LLVM/bin:$PATH"

cmake \
-G Ninja \
-DCMAKE_C_COMPILER="clang.exe" \
-DCMAKE_CXX_COMPILER="clang++.exe" \
-DCMAKE_C_COMPILER="clang-cl.exe" \
-DCMAKE_CXX_COMPILER="clang-cl.exe" \
-DOPTION_TARGET_MESSAGING=OFF \
-DOPTION_TARGET_PARALLEL=OFF \
-DOPTION_TARGET_CHOMBO2D_SOLVER=OFF \
Expand All @@ -238,37 +326,34 @@ jobs:
-DOPTION_TARGET_HY3S_SOLVERS=OFF \
-DOPTION_TARGET_DOCS=OFF \
-B . -S ..
ninja -j 1

- name: Test Windows
if: matrix.platform == 'windows-latest'
shell: msys2 {0}
run: |
platform=windows
echo "working dir is $PWD"
cd build
export PATH="/c/Program\ Files/LLVM/bin:$PATH"
ctest -VV
echo "------ running FiniteVolume_x64 ------"
./bin/FiniteVolume_x64 || true
./bin/FiniteVolume_x64.exe || true
echo
echo "------ running NFsim_x64 ------"
./bin/NFsim_x64 || true
./bin/NFsim_x64.exe || true
echo "------ running SundialsSolverStandalone_x64 ------"
./bin/SundialsSolverStandalone_x64 || true
./bin/SundialsSolverStandalone_x64.exe || true
echo "------ running VCellStoch_x64 ------"
./bin/VCellStoch_x64 || true
./bin/VCellStoch_x64.exe || true
echo "------ running smoldyn_x64 ------"
./bin/smoldyn_x64 || true
./bin/smoldyn_x64.exe || true
echo "------ running testzip ------"
./bin/testzip || true
./bin/testzip.exe || true
echo "------ running ziptool ------"
./bin/ziptool || true
./bin/ziptool.exe || true
- name: Install Linux Dependencies
if: matrix.platform == 'ubuntu-latest'
Expand Down

0 comments on commit 23dc955

Please sign in to comment.