correct syntax issue #85
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# GitHub action to build LAMMPS on Windows with Visual C++ | |
name: "Windows Unit Tests" | |
on: | |
push: | |
branches: | |
- develop | |
pull_request: | |
branches: | |
- develop | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Windows Compilation Test | |
if: ${{ github.repository == 'lammps/lammps' }} | |
runs-on: windows-latest | |
env: | |
CCACHE_DIR: ${{ github.workspace }}/.ccache | |
steps: | |
- name: Checkout repository | |
- uses: ilammy/msvc-dev-cmd@v1 | |
with: | |
arch: x64 | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- name: Install Ccache | |
run: | | |
choco install ccache | |
choco install ninja | |
- name: Install MSMPI | |
run: | | |
nuget install MSMPIsdk | |
nuget install MSMPIDIST | |
- name: Set up ccache | |
uses: actions/cache@v4 | |
with: | |
path: ${{ env.CCACHE_DIR }} | |
key: win-unit-ccache-${{ github.sha }} | |
restore-keys: win-unit-ccache- | |
- name: Select Python version | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
- name: Building LAMMPS via CMake | |
run: | | |
ccache -z | |
python3 -m pip install numpy | |
python3 -m pip install pyyaml | |
cmake -C cmake/presets/windows.cmake \ | |
-D CMAKE_CXX_COMPILER_LAUNCHER=$(which ccache) \ | |
-D CMAKE_C_COMPILER_LAUNCHER=$(which ccache) \ | |
-D DOWNLOAD_POTENTIALS=off \ | |
-D PKG_PYTHON=on \ | |
-D WITH_PNG=off \ | |
-D WITH_JPEG=off \ | |
-S cmake -B build \ | |
-D BUILD_SHARED_LIBS=on \ | |
-D ENABLE_TESTING=on \ | |
-D Ninja | |
cmake --build build --parallel 2 | |
- name: Run LAMMPS executable | |
run: | | |
./build/lmp.exe -h | |
./build/lmp.exe -in bench/in.lj | |
- name: Run Unit Tests | |
working-directory: build | |
run: ctest -V -E FixTimestep:python_move_nve |