Skip to content

Commit

Permalink
Merge pull request #1 from BlueBrain/add-ci
Browse files Browse the repository at this point in the history
Add basic CI and clean up more.
  • Loading branch information
matz-e authored May 10, 2024
2 parents 66bc13e + 5f98fd0 commit d6462a8
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 68 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Run tests

on:
push:
branches: ['main']
pull_request:

jobs:
build_w_submodules:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
submodules: true

- name: Set up Apache Arrow repositories
run: |
sudo apt-get update
sudo apt-get install -y ca-certificates lsb-release wget
wget https://apache.jfrog.io/artifactory/arrow/$(lsb_release --id --short | tr 'A-Z' 'a-z')/apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb
sudo apt-get install -y ./apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb
sudo apt-get update
- name: Install build dependencies
run: |
sudo apt-get install -y cmake g++ libhdf5-openmpi-dev librange-v3-dev ninja-build nlohmann-json3-dev
sudo apt-get install -y libarrow-dev libparquet-dev
- name: Configure
run: |
cmake -B build -S . -GNinja \
-DCMAKE_CXX_COMPILER=$(which mpicxx)
cmake --build build
ctest --test-dir build --output-on-failure
build_docker_no_submodules:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build
uses: docker/build-push-action@v5
21 changes: 16 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ RUN apt-get update \
catch2 \
cmake \
g++ \
git \
libcli11-dev \
libhdf5-openmpi-dev \
librange-v3-dev \
lsb-release \
ninja-build \
nlohmann-json3-dev \
wget
RUN wget https://apache.jfrog.io/artifactory/arrow/$(lsb_release --id --short | tr 'A-Z' 'a-z')/apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb \
&& apt-get install -y ./apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb \
Expand All @@ -19,11 +21,20 @@ RUN wget https://apache.jfrog.io/artifactory/arrow/$(lsb_release --id --short |
libarrow-dev \
libparquet-dev

VOLUME /highfive
RUN git clone https://github.com/BlueBrain/HighFive /highfive/src \
&& cmake -B /highfive/build -S /highfive/src -DCMAKE_INSTALL_PREFIX=/highfive/install -DHIGHFIVE_UNIT_TESTS=OFF -DHIGHFIVE_EXAMPLES=OFF -DHIGHFIVE_BUILD_DOCS=OFF \
&& cmake --build /highfive/build \
&& cmake --install /highfive/build

ENV CMAKE_PREFIX_PATH=/highfive/install
ENV OMPI_ALLOW_RUN_AS_ROOT=1
ENV OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1

RUN cmake -GNinja -B /build -S /workspace -DCMAKE_CXX_COMPILER=/usr/bin/mpicxx \
&& cmake --build /build \
&& cmake --install /build \
&& cd /build \
&& ctest --output-on-failure
VOLUME /workspace
COPY . /workspace/src

RUN cmake -GNinja -B /workspace/build -S /workspace/src -DCMAKE_CXX_COMPILER=/usr/bin/mpicxx \
&& cmake --build /workspace/build \
&& cmake --install /workspace/build \
&& ctest --test-dir /workspace/build --output-on-failure
62 changes: 0 additions & 62 deletions examples/touch_display_convert.cpp

This file was deleted.

2 changes: 1 addition & 1 deletion tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ find_program(
DOC "Executable for running MPI programs.")

add_test(NAME parquet2hdf5_mpi
COMMAND ${mpi_launcher} -n 4 $<TARGET_FILE:parquet2hdf5>
COMMAND ${mpi_launcher} -n 1 $<TARGET_FILE:parquet2hdf5>
${CMAKE_CURRENT_SOURCE_DIR}/parquets edges_n4.h5 All)

add_test(NAME touches_conversion_v1
Expand Down

0 comments on commit d6462a8

Please sign in to comment.