50 lines
1.2 KiB
YAML
50 lines
1.2 KiB
YAML
# GitHub action to build LAMMPS on Windows with Visual C++
|
|
name: "Native Windows Compilation and Unit Tests"
|
|
|
|
on:
|
|
push:
|
|
branches: [develop]
|
|
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
name: Windows Compilation Test
|
|
if: ${{ github.repository == 'lammps/lammps' }}
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 2
|
|
|
|
- name: Select Python version
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.10'
|
|
|
|
- name: Building LAMMPS via CMake
|
|
shell: bash
|
|
run: |
|
|
python3 -m pip install numpy
|
|
python3 -m pip install pyyaml
|
|
cmake -C cmake/presets/windows.cmake \
|
|
-D PKG_PYTHON=on \
|
|
-S cmake -B build \
|
|
-D BUILD_SHARED_LIBS=on \
|
|
-D LAMMPS_EXCEPTIONS=on \
|
|
-D ENABLE_TESTING=on
|
|
cmake --build build --config Release
|
|
|
|
- name: Run LAMMPS executable
|
|
shell: bash
|
|
run: |
|
|
./build/Release/lmp.exe -h
|
|
./build/Release/lmp.exe -in bench/in.lj
|
|
|
|
- name: Run Unit Tests
|
|
working-directory: build
|
|
shell: bash
|
|
run: ctest -V -C Release
|