Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into enhancement-use_std_l…
Browse files Browse the repository at this point in the history
…ower_bound
  • Loading branch information
Niklas997 committed Oct 21, 2024
2 parents 0c72558 + 5b32c25 commit 653b36e
Show file tree
Hide file tree
Showing 210 changed files with 5,763 additions and 491,034 deletions.
2 changes: 2 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,7 @@ SpacesInParentheses: 'false'
SpacesInSquareBrackets: 'false'
TabWidth: '2'
UseTab: Never
LineEnding: LF
InsertNewlineAtEOF: 'true'

...
2 changes: 1 addition & 1 deletion .github/workflows/add_release_documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ jobs:
./generate_redirections.sh $GITHUB_REF_NAME
- name: Create Pull Request at DLR-AMR/t8code-website
if: ${{ env.MINOR_RELEASE == 'true' }}
uses: peter-evans/create-pull-request@v6
uses: peter-evans/create-pull-request@v7
with:
path: t8code-website
title: Add documentation for t8code ${{ github.ref_name }}
Expand Down
165 changes: 165 additions & 0 deletions .github/workflows/build_cmake_tarball.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
name: CMake Tarball

# This file is part of t8code.
# t8code is a C library to manage a collection (a forest) of multiple
# connected adaptive space-trees of general element types in parallel.
#
# Copyright (C) 2024 the developers
#
# t8code is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# t8code is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with t8code; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

#
# This github CI script constructs a tarball and checks if it is build correctly.
#

env:
MAKEFLAGS: "-j2 V=0"


on:
push:
branches:
- main
- develop
- CI-*tarball* # for testing this script, all feature branches with "tarball" in their name
pull_request:
branches:
- main
- develop
workflow_dispatch:

jobs:
build:

if: (github.event_name == 'schedule' && github.repository == 'DLR-AMR/t8code') || (github.event_name != 'schedule')
runs-on: ubuntu-20.04
container: dlramr/t8code-ubuntu:t8-dependencies
timeout-minutes: 90
steps:
#
# Setup and bootstrap
#
- uses: actions/checkout@v4
with:
fetch-tags: true # required to get version tags
fetch-depth: 0 # required to get all history, especially the version tags
- name: install sudo
run: apt update && apt install sudo
# On the github Ubuntu 20.04, sudo is not available by default
# we need it, however, to update/upgrade our packages.
- name: Update packages
run: sudo apt-get update && sudo apt-get upgrade -y
# This step is necessary to get the newest package data
- name: disable ownership checks
run: git config --global --add safe.directory '*'
- name: init submodules
run: git submodule init
- name: update submodules
run: git submodule update
- name: bootstrap
run: ./bootstrap
#
# T8CODE
# with p4est and sc as internal dependencies which is needed for make dist
#
#
- name: less-test option
if: ${{ inputs.LESS_TESTS }}
run: export LESS_TEST_OPTION="-DT8CODE_ENABLE_LESS_TESTS=ON"
&& echo LESS_TEST_OPTION="$LESS_TEST_OPTION" >> $GITHUB_ENV
- name: build config variables
run: export CONFIG_OPTIONS="${LESS_TEST_OPTION} -GNinja -DT8CODE_USE_SYSTEM_SC=OFF -DT8CODE_USE_SYSTEM_P4EST=OFF -DT8CODE_BUILD_PEDANTIC=ON -DT8CODE_ENABLE_MPI=$MPI -DCMAKE_BUILD_TYPE=$BUILD_TYPE"
&& echo CONFIG_OPTIONS="$CONFIG_OPTIONS" >> $GITHUB_ENV
- name: cmake
run: mkdir build && cd build && cmake ../ $CONFIG_OPTIONS
- name: OnFailUploadLog
if: failure()
uses: actions/upload-artifact@v4
with:
name: config.log
path: build/config.log
# Start building tarball
- name: Install pandoc
uses: nikeee/setup-pandoc@v1
- name: Test pandoc
run: pandoc --version
# Build the tarball
- name: Make tarball
run: cd build && ninja GenerateVersionFile && ninja package_source && mkdir tarballs && mv package/*Source.tar.gz tarballs
# Upload the tarball
- name: upload tarball
uses: actions/upload-artifact@v4
with:
name: tarballs
path: build/tarballs

test-tarball:
needs: build
runs-on: ubuntu-20.04
container: dlramr/t8code-ubuntu:t8-dependencies
timeout-minutes: 90
steps:
- name: install sudo
run: apt update && apt install sudo
# On the github Ubuntu 20.04, sudo is not available by default
# we need it, however, to update/upgrade our packages.
- name: Update packages
run: sudo apt-get update && sudo apt-get upgrade -y
# This step is necessary to get the newest package data
- name: Download tarball
uses: actions/download-artifact@v4
with:
name: tarballs
path: tarballs
- name: Extract tarball
run: tar xzf tarballs/*.tar.gz -C $RUNNER_TEMP
- name: update Github_env
run: export TAR_DIR="$RUNNER_TEMP/`basename tarballs/*.tar.gz .tar.gz`" &&
echo TAR_DIR="$TAR_DIR" >>$GITHUB_ENV

# build config vars
- name: less-test-option
if: github.event_name == 'pull_request'
run: export LESS_TEST_OPTION="-DT8CODE_ENABLE_LESS_TESTS=ON"
&& echo LESS_TEST_OPTION="$LESS_TEST_OPTION" >> $GITHUB_ENV
- name: build config variables
run: export CONFIG_OPTIONS="${LESS_TEST_OPTION} -GNinja -DT8CODE_USE_SYSTEM_SC=OFF -DT8CODE_USE_SYSTEM_P4EST=OFF -DT8CODE_BUILD_PEDANTIC=ON -DT8CODE_ENABLE_MPI=$MPI -DCMAKE_BUILD_TYPE=$BUILD_TYPE"
&& echo CONFIG_OPTIONS="$CONFIG_OPTIONS" >> $GITHUB_ENV
- name: Check vars
run: echo "[$CONFIG_DEBUG]"
- name: configure from Tarball
run: mkdir build_tar && cd build_tar && cmake $TAR_DIR $CONFIG_OPTIONS
- name: OnFailUploadLog
if: failure()
uses: actions/upload-artifact@v4
with:
name: build_tar.log
path: build_tar/config.log
- name: build
run: cd build_tar && ninja
- name: install
run: cd build_tar && ninja install
- name: check serial
run: cd build_tar && ctest -R _serial
- name: check parallel
run: cd build_tar && ctest -R _parallel
- name: OnFailUploadLog
if: failure()
uses: actions/upload-artifact@v4
with:
name: build_tar.log
path: build_tar/test-suite.log


121 changes: 0 additions & 121 deletions .github/workflows/ci_playground.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -44,20 +44,26 @@ jobs:
- name: debug_before_build
run: echo ${{ env.message_build}}
# build the message depending on different types of events and event actions. Message is written into mattermost.json
- name: dispatch_run
if: github.event_name == 'workflow_dispatch'
run: |
echo message_build=1 >> $GITHUB_ENV &&
echo message_content='User ${{github.actor}} triggered the workflow_dispatch' >> $GITHUB_ENV
- name: closed_message
if: github.event.action == 'closed'
run: |
echo message_build=1 >> $GITHUB_ENV &&
echo message_content='Issue ${{ github.event.issue.number }} has been closed. See ${{ github.event.issue.html_url }} for more details.' >> $GITHUB_ENV
# Would like to have this message read "User X closed issue ...".
# How can we get the user name? Tried ${{ github.event.issue.user.name }} and others, did not work.
echo message_content='User ${{ github.actor }} closed issue ${{ github.event.issue.number }}. See ${{ github.event.issue.html_url }} for more details.' >> $GITHUB_ENV
- name: opened_message
if: github.event.action == 'opened' || github.event.action == 'reopened'
if: github.event.action == 'opened'
run: |
echo message_build=1 >> $GITHUB_ENV &&
echo message_content='User ${{ github.actor }} opened issue ${{ github.event.issue.number }}. See ${{ github.event.issue.html_url }} for more details.' >> $GITHUB_ENV
- name: reopened_message
if: github.event.action == 'reopened'
run: |
echo message_build=1 >> $GITHUB_ENV &&
echo message_content='Issue ${{ github.event.issue.number }} was (re-)opened. See ${{ github.event.issue.html_url }} for more details.' >> $GITHUB_ENV
# Would like to have this message read "User X (re-)opened issue ...".
# How can we get the user name? Tried ${{ github.event.issue.user.name }} and others, did not work.
echo message_content='User ${{ github.actor }} reopened issue ${{ github.event.issue.number }}. See ${{ github.event.issue.html_url }} for more details.' >> $GITHUB_ENV
- name: debug_after_build
run: echo ${{ env.message_build }}
# if a message has been written send the message to the mattermost-channel described in the secrets
Expand Down
Loading

0 comments on commit 653b36e

Please sign in to comment.