-
Notifications
You must be signed in to change notification settings - Fork 18
47 lines (37 loc) · 1.44 KB
/
cmake.yml
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
name: Build LSMS with cmake
on: [push, pull_request]
env:
BUILD_TYPE: Release
jobs:
build:
runs-on: ubuntu-latest
steps:
- run: echo "The job was automatically triggered by a ${{ github.event_name }} event."
- run: echo "This job is now running on a ${{ runner.os }} server hosted by GitHub!"
- run: echo "The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
- name: Check out repository code
uses: actions/checkout@v2
- name: Install dependencies on ubuntu
run: |
sudo apt-get update -y
sudo apt-get upgrade -y
sudo apt-get install build-essential \
openmpi-bin libopenmpi-dev \
ninja-build \
libblas-dev \
liblapack-dev \
gfortran \
libhdf5-dev \
python3-pytest -y
- name: Configure CMake
run: |
cmake -G Ninja -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \
-DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/toolchain/testing.cmake \
-DBUILD_TESTING=ON \
-S ${{github.workspace}} -B ${{github.workspace}}/build
- name: Build
run: cmake --build ${{github.workspace}}/build --parallel
- name: Run CTests
working-directory: ${{github.workspace}}/build
run: ctest --verbose -C ${{env.BUILD_TYPE}}
- run: echo "This job's status is ${{ job.status }}."