Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add separate nightly deal.II master Docker script with clang #5838

Merged
merged 1 commit into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/build_dealii_master_clang.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: build-dealii-master-clang

on:
workflow_dispatch:
schedule:
# * is a special character in YAML so you have to quote this string
# trigger at 1:30 am every day
- cron: '30 1 * * *'

concurrency:
group: build-dealii-master-clang

permissions:
contents: read
packages: write

jobs:
build-clang-master:
runs-on: ubuntu-latest
if: github.repository == 'geodynamics/aspect'
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_LOGIN }}

- name: Build and push Docker image for main
uses: docker/build-push-action@v5
with:
context: ./contrib/docker/tester-clang
cache-from: type=registry,ref=ubuntu:24.04
cache-to: type=inline
push: true
tags: geodynamics/aspect-tester:noble-dealii-master-clang
35 changes: 35 additions & 0 deletions contrib/docker/tester-clang/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
FROM ubuntu:24.04

LABEL maintainer <[email protected]>

RUN DEBIAN_FRONTEND=noninteractive apt update && apt upgrade -yq && \
DEBIAN_FRONTEND=noninteractive apt install -yq --no-install-recommends \
build-essential ca-certificates file gcc g++ \
gfortran git libblas-dev liblapack-dev libopenmpi-dev \
lsb-release ninja-build numdiff openmpi-bin \
openmpi-common wget zlib1g-dev \
clang-tidy clang cmake libp4est-dev libsundials-dev \
mpi-default-dev trilinos-all-dev zlib1g-dev libhdf5-dev libhdf5-mpi-dev

COPY local.cfg /opt/

# Install deal.II with clang using candi:

RUN cd /opt && \
git clone https://github.com/dealii/candi && \
cd candi && \
mv /opt/local.cfg . && \
CXX=clang++ CC=clang ./candi.sh -p /opt -j2 && \
rm -rf /opt/tmp

# Set environment variables for this image to be used
# by Github Actions
ENV PATH="/opt/astyle-2.04:$PATH"
ENV DEAL_II_DIR /opt/deal.II-master
ENV OMPI_MCA_btl_base_warn_component_unused=0
ENV OMPI_MCA_mpi_yield_when_idle=1
ENV OMPI_MCA_rmaps_base_oversubscribe=1
ENV OMPI_ALLOW_RUN_AS_ROOT=1
ENV OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1

WORKDIR /opt
5 changes: 5 additions & 0 deletions contrib/docker/tester-clang/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

# This script generates a docker image for the ASPECT tester.

docker build -t geodynamics/aspect-tester:noble-dealii-master-clang .
12 changes: 12 additions & 0 deletions contrib/docker/tester-clang/local.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Compile with debug checks, but also with optimizations to make tests run fast
USE_DEAL_II_CMAKE_MPI_COMPILER=OFF
BUILD_EXAMPLES=OFF

DEAL_II_VERSION=master

USE_64_BIT_INDICES=ON

DEAL_II_CONFOPTS="-DDEAL_II_WITH_COMPLEX_VALUES=OFF -DCMAKE_BUILD_TYPE='DebugRelease' -DDEAL_II_CXX_FLAGS_DEBUG='-O3 -g0' -DDEAL_II_COMPONENT_EXAMPLES=OFF"

# only compile deal.II, the rest of the dependencies are installed using apt
PACKAGES="astyle dealii"