Skip to content
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
159 changes: 118 additions & 41 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,54 +1,131 @@
name: CI

on: [push]
on:
push:
branches:
- '**' # Push events on all branches
paths-ignore:
- '.github/workflows/init.yml'
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 including semver

jobs:

build_docs:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
name: Build, Install, Package documentation
if: "!contains(github.event.head_commit.message, 'docs skip')"
steps:
- uses: buildkite/trigger-pipeline-action@v1.2.0
- uses: actions/checkout@v3
- name: Install credentials
run: echo https://$GITHUB_OAUTH:@github.com > $HOME/.git-credentials
env:
BUILDKITE_API_ACCESS_TOKEN: ${{ secrets.BUILDKITE_API_ACCESS_TOKEN }}
PIPELINE: "feelpp/feelpp-docs"
COMMIT: "HEAD"
BRANCH: "master"
MESSAGE: ":github: Triggered from a GitHub Action by Tutorial-Dev Project"
build_examples:
runs-on: ubuntu-20.04
GITHUB_OAUTH: ${{ secrets.CR_PAT_WORKFLOW }}
- name: Build
run: |
npm install
npm run antora
working-directory: docs
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: public # The folder the action should deploy.


build_code:
runs-on: self-ubuntu-22.04
name: Build, Install, Package code
if: "!contains(github.event.head_commit.message, 'code skip')"
steps:
- uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v3
with:
lfs: true
- name: feelpp
run: |
echo "deb https://dl.bintray.com/feelpp/ubuntu focal stable" | sudo tee -a /etc/apt/sources.list
wget -qO - https://bintray.com/user/downloadSubjectPublicKey?username=bintray | sudo apt-key add -
sudo apt update
sudo apt install -y libfeelpp-dev feelpp-tools
- name: antora
recursive: true
-
name: Build
run: |
sudo npm i -g @antora/cli@2.3 @antora/site-generator-default@2.3
- name: Build Tutorial Dev
cmake --preset default
cmake --build --preset default
-
name: Check
run: |
mkdir build && cd build
CXX=clang++-9 cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=./install ..
make
make install
- name: Ctest
run: |
ctest -R .
working-directory: build
- name: Package
ctest --preset default
env:
OMPI_ALLOW_RUN_AS_ROOT: 1
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1
-
name: Package
run: |
make package
mkdir artifact && cp feelpp-tutorial-dev*.tar.gz artifact
ls -l artifact
tar tzvf feelpp-tutorial-dev*.tar.gz
working-directory: build
# - name: Upload artifact
# uses: actions/upload-artifact@v1.0.0
# with:
# # Artifact name
# name: Tutorial Dev-${{ runner.os }}
# # Directory containing files to upload
# path: build/install/
cmake --build --preset default -t package
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
# Artifact name
name: feelpp-tutorial-dev-artifacts
# Directory containing files to upload
path: build/default/assets/feelpp-tutorial-dev-*
- name: Release
if: startsWith(github.ref ,'refs/tags/v')
uses: softprops/action-gh-release@v1
with:
files: build/default/assets/feelpp-tutorial-dev-*
draft: false
prerelease: ${{ contains(github.ref, 'alpha') || contains(github.ref, 'beta') || contains(github.ref, 'rc')}}
name: Release ${{ github.ref_name }}
generate_release_notes: true
tag_name: ${{ github.ref }}
token: ${{ secrets.GITHUB_TOKEN }}
deliver:
runs-on: self-ubuntu-22.04
needs: build_code
name: Build docker, tag and push

steps:
- uses: actions/checkout@v3
with:
lfs: true
submodules: 'recursive'
- name: Download
uses: actions/download-artifact@v3
with:
# Artifact name
name: feelpp-tutorial-dev-artifacts
path: artifacts/
-
name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
ghcr.io/feelpp/feelpp-tutorial-dev
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}
-
name: Build container image
uses: docker/build-push-action@v4
with:
context: artifacts
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
file: ./Dockerfile

68 changes: 0 additions & 68 deletions .github/workflows/release.yml

This file was deleted.

14 changes: 12 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
node_modules/
build*/
docs/public/
docs/cache/
public/
cache/
*.bak
jupyter/
# Prerequisites
*.d

Expand Down Expand Up @@ -34,3 +36,11 @@ docs/cache/
*.exe
*.out
*.app

# Emacs files
*~
\#*\#
*.elc
auto-save-list
tramp
.\#*
64 changes: 50 additions & 14 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Author(s): Christophe Prud'homme <christophe.prudhomme@feelpp.org>
# Date: 2020-06-03
#
# Copyright (C) 2020 Cemosis
# Copyright (C) 2020-present Cemosis
#
# Distributed under the GPL(GNU Public License):
# This program is free software; you can redistribute it and/or modify
Expand All @@ -21,20 +21,24 @@
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
#
cmake_minimum_required(VERSION 3.21.0)
project(feelpp-tutorial-dev VERSION 1.0.0)
set(EXTRA_VERSION "-beta.1")
set(PROJECT_SHORTNAME "ftd")

cmake_minimum_required(VERSION 3.12)
project(feelpp-tutorial-dev VERSION 0.1.0)
set(PROJECT_SHORTNAME "tut")
include(GNUInstallDirs)

if (POLICY CMP0077)
cmake_policy(SET CMP0077 NEW)
set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
endif()

if ( ${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR} )
#find_package(Feel++ COMPONENTS Toolboxes PATHS ${FEELPP_DIR}/share/feelpp/feel/cmake/modules $ENV{FEELPP_DIR}/share/feelpp/feel/cmake/modules /usr/share/feelpp/feel/cmake/modules /usr/local/share/feelpp/feel/cmake/modules )
find_package(Feel++ PATHS ${FEELPP_DIR}/share/feelpp/feel/cmake/modules $ENV{FEELPP_DIR}/share/feelpp/feel/cmake/modules /usr/share/feelpp/feel/cmake/modules /usr/local/share/feelpp/feel/cmake/modules )
if(NOT FEELPP_FOUND)
message(FATAL_ERROR "Feel++ was not found on your system. Make sure to install it and specify the FEELPP_DIR to reference the installation directory.")
endif()
else()
include_directories(${CMAKE_SOURCE_DIR}/toolboxes ${CMAKE_BINARY_DIR}/toolboxes)
find_package(Feel++ COMPONENTS Toolboxes PATHS ${FEELPP_DIR}/share/feelpp/feel/cmake/modules $ENV{FEELPP_DIR}/share/feelpp/feel/cmake/modules /usr/share/feelpp/feel/cmake/modules /usr/local/share/feelpp/feel/cmake/modules )
if(NOT FEELPP_FOUND)
message(FATAL_ERROR "Feel++ was not found on your system. Make sure to install it and specify the FEELPP_DIR to reference the installation directory.")
endif()
if ( NOT FEELPP_TOOLBOXES_FOUND )
message(WARNING "Feel++ Toolboxes SDK is not found on your system. The toolbox application is now disabled.")
endif()

enable_testing()
Expand All @@ -44,6 +48,7 @@ if ( NOT TARGET check )
endif()


add_subdirectory( src )
add_subdirectory( docs )

# extra ignored files
Expand All @@ -53,7 +58,38 @@ list(APPEND CPACK_SOURCE_IGNORE_FILES
.travis.yml
.appveyor.yml
)
set(CPACK_SOURCE_PACKAGE_FILE_NAME "${PROJECT_NAME}-${PROJECT_VERSION}")
set(CPACK_GENERATOR "TGZ")

set(CPACK_PACKAGE_NAME "${PROJECT_NAME}-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}${EXTRA_VERSION}")
set(CPACK_SOURCE_PACKAGE_FILE_NAME "${PROJECT_NAME}-${PROJECT_VERSION}${EXTRA_VERSION}")
SET(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}${EXTRA_VERSION}-${CMAKE_SYSTEM_NAME}")
set(CPACK_PACKAGE_DIRECTORY "${PROJECT_BINARY_DIR}/assets")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Cemosis feelpp-tutorial-dev applications")
set(CPACK_PACKAGE_DESCRIPTION "Cemosis provides a Feel++ programming tutorial.")
set(CPACK_PACKAGE_VENDOR "Cemosis")
set(CPACK_PACKAGE_CONTACT "Christophe Prud'homme <christophe.prudhomme@cemosis.fr>")
set(CPACK_PACKAGE_VERSION_MAJOR "${PROJECT_VERSION_MAJOR}")
set(CPACK_PACKAGE_VERSION_MINOR "${PROJECT_VERSION_MINOR}")
set(CPACK_PACKAGE_VERSION_PATCH "${PROJECT_VERSION_PATCH}")


set(CPACK_GENERATOR "TGZ;DEB")
set(CPACK_SOURCE_GENERATOR "TGZ")


set(CPACK_DEBIAN_PACKAGE_NAME "${PROJECT_NAME}")
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "${CPACK_PACKAGE_CONTACT}")
if ( USE_FEELPP_TOOLBOXES )
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libfeelpp1 (>= 0.109)") # add depends with relevant toolbox lib
else()
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libfeelpp1 (>= 0.109)")
endif()
set(CPACK_DEBIAN_PACKAGE_DESCRIPTION_SUMMARY "${CPACK_PACKAGE_DESCRIPTION_SUMMARY}")
set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "${CPACK_PACKAGE_DESCRIPTION}")
set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
set(CPACK_DEBIAN_PACKAGE_SECTION "science")
set(CPACK_DEBIAN_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}${EXTRA_VERSION}")
set(CPACK_DEBIAN_ARCHITECTURE "${CMAKE_SYSTEM_PROCESSOR}")
# set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_SOURCE_DIR}/cmake/debian/postinst")

include(CPack)

Loading