Skip to content

Commit

Permalink
Github CI workflow using docker images (#627)
Browse files Browse the repository at this point in the history
Currently only tests build and unit tests. Will add lightweight regression tests with follow-up pull-requests.
  • Loading branch information
sayerhs committed Jun 22, 2020
1 parent b49378e commit 43b3f68
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.git
examples
reg_tests
build*
wind-utils
python
**/tests
.*
37 changes: 37 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Nalu-Wind-CI

on:
push:
branches:
- master
paths:
- 'cmake/**'
- 'include/**'
- 'src/**'
- 'unit_tests/**'
- 'CMakeLists.txt'
- 'CTestConfig.cmake'
- 'Dockerfile'
- 'nalu.C'
- 'unit_tests.C'
pull_request:
branches:
- master
paths:
- 'cmake/**'
- 'include/**'
- 'src/**'
- 'unit_tests/**'
- 'CMakeLists.txt'
- 'CTestConfig.cmake'
- 'Dockerfile'
- 'nalu.C'
- 'unit_tests.C'

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build and test
run: docker build -t nalu-wind .
29 changes: 29 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
ARG BASE_IMG=exawind/exawind-dev:latest
FROM ${BASE_IMG} AS base

WORKDIR /workspace
COPY . /workspace

ARG NUM_PROCS=16
RUN (\
cmake \
-Bbuild \
-DCMAKE_BUILD_TYPE=RELEASE \
-DCMAKE_PREFIX_PATH=/opt/exawind \
-DCMAKE_INSTALL_PREFIX=/opt/exawind \
-DBUILD_SHARED_LIBS=ON \
-DENABLE_HYPRE=ON -DENABLE_TIOGA=ON -DENABLE_OPENFAST=ON . \
&& cd build \
&& make -j${NUM_PROCS} \
&& make install \
&& export LD_LIBRARY_PATH=/opt/exawind:/usr/local/lib:${LD_LIBRARY_PATH} \
&& ./unittestX --gtest_filter=-Actuator*.* \
)

RUN (\
echo "/opt/exawind/lib" > /etc/ld.so.conf.d/exawind.conf \
&& ldconfig \
)

ENV PATH /opt/exawind/bin:${PATH}
WORKDIR /run

0 comments on commit 43b3f68

Please sign in to comment.