From 23dc9557f9754ced744b79acd1f1a36a2fe8b679 Mon Sep 17 00:00:00 2001 From: jcschaff Date: Fri, 26 Jul 2024 14:20:35 -0400 Subject: [PATCH] first try with microsoft visual studio clang on windows --- .github/workflows/cd.yml | 165 +++++++++++++++++++++++++++++---------- 1 file changed, 125 insertions(+), 40 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 411048ca..dd13abec 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -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 \ @@ -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'