forked from lammps/lammps
-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (55 loc) · 1.6 KB
/
check-gnu-make.yml
File metadata and controls
66 lines (55 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# GitHub action to build LAMMPS on Linux with traditional build system
name: "Check legacy GNU Make build"
on:
push:
branches:
- develop
- maintenance
pull_request:
branches:
- develop
workflow_dispatch:
jobs:
build:
name: Build with GNU Make
if: ${{ github.repository == 'lammps/lammps' }}
runs-on: ubuntu-latest
env:
CCACHE_DIR: ${{ github.workspace }}/.ccache
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 2
- name: Install extra Linux packages
run: |
sudo apt-get update
sudo apt-get install -y ccache \
libeigen3-dev \
libcurl4-openssl-dev \
mpi-default-bin \
mpi-default-dev
- name: Set up ccache
uses: actions/cache@v4
with:
path: ${{ env.CCACHE_DIR }}
key: linux-gnu-ccache-${{ github.sha }}
restore-keys: linux-gnu-ccache-
- name: Install optional LAMMPS packages
shell: bash
working-directory: src
run: make yes-most
- name: Building LAMMPS with GNU Make
shell: bash
working-directory: src
run: |
ccache -z -M 3
make -j2 CC="ccache g++" serial
make -j2 CC="ccache mpicxx" mpi
ccache -s
- name: Running serial LAMMPS
shell: bash
run: ./src/lmp_serial -in bench/in.lj -log none -nocite
- name: Running parallel LAMMPS
shell: bash
run: mpirun -np 2 ./src/lmp_mpi -in bench/in.lj -log none -nocite