Skip to content

Commit 80bff4f

Browse files
authored
resolves #6: update repo with new feelpp project (#9)
* update antora #7 Remove unused files and directories, add missing files - Removed CTestCostData.txt and LastTest.log - Added new files for supplemental UI and pages - Updated antora configuration in modules/antora.yml - Updated generate-jupyter.sh script - Removed package.json and updated site.yml configuration - Updated VSCode setup instructions in vscode.adoc page - Renamed feelpp.adoc to antora.adoc in modules/ROOT/pages - Fixed minor mistakes in CMakeLists.txt, cmake.adoc, jupyter.adoc, and githubactions.adoc. * update cmake process #8 Update CMake process including new features This commit updates the CMake process to version 3.21.0 and includes new features such as the usage of CMakePresets.json with two possible presets: "default" and "install-local". It also updates the .gitignore file to remove docs/public/, adds jupyter/ to the ignored files, updates the project requirements, and fixes some bugs. Additionally, it includes new files (CMakePresets.json, .tests.laplacian, and .tests.toolbox) and updates the laplacian and toolbox files to include proper links. Finally, the changeset introduces a new set of electric simulation cases with 2D configuration files. * update repo with new feelpp-project #6 add dockerfile * update ci update repo with new feelpp-project #6 * rm docs/supplemental-ui update repo with new feelpp-project #6 * derivatives expressions interface need update #4 * update antora #7 add ref doc * update cmake process #8 * up docs update antora #7 code skip * update antora #7 modify titles * fix docker generation now generate feelpp/feelpp-tutorial-dev update repo with new feelpp-project #6 * update docs #7 code skip * update cmake process #8 minor mods in CMakeLists * no more antora in cmake update cmake process #8 * fix artifacts name in CI update repo with new feelpp-project #6 docs skip * up README update repo with new feelpp-project #6 code skip docs skip
1 parent 149aa7f commit 80bff4f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+8233
-967
lines changed

.github/workflows/ci.yml

Lines changed: 118 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,131 @@
11
name: CI
22

3-
on: [push]
3+
on:
4+
push:
5+
branches:
6+
- '**' # Push events on all branches
7+
paths-ignore:
8+
- '.github/workflows/init.yml'
9+
tags:
10+
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 including semver
411

512
jobs:
13+
614
build_docs:
7-
runs-on: ubuntu-latest
15+
runs-on: ubuntu-22.04
16+
name: Build, Install, Package documentation
17+
if: "!contains(github.event.head_commit.message, 'docs skip')"
818
steps:
9-
- uses: buildkite/trigger-pipeline-action@v1.2.0
19+
- uses: actions/checkout@v3
20+
- name: Install credentials
21+
run: echo https://$GITHUB_OAUTH:@github.com > $HOME/.git-credentials
1022
env:
11-
BUILDKITE_API_ACCESS_TOKEN: ${{ secrets.BUILDKITE_API_ACCESS_TOKEN }}
12-
PIPELINE: "feelpp/feelpp-docs"
13-
COMMIT: "HEAD"
14-
BRANCH: "master"
15-
MESSAGE: ":github: Triggered from a GitHub Action by Tutorial-Dev Project"
16-
build_examples:
17-
runs-on: ubuntu-20.04
23+
GITHUB_OAUTH: ${{ secrets.CR_PAT_WORKFLOW }}
24+
- name: Build
25+
run: |
26+
npm install
27+
npm run antora
28+
working-directory: docs
29+
- name: Deploy
30+
uses: JamesIves/github-pages-deploy-action@v4
31+
with:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
BRANCH: gh-pages # The branch the action should deploy to.
34+
FOLDER: public # The folder the action should deploy.
35+
36+
37+
build_code:
38+
runs-on: self-ubuntu-22.04
39+
name: Build, Install, Package code
40+
if: "!contains(github.event.head_commit.message, 'code skip')"
1841
steps:
19-
- uses: actions/checkout@v2
42+
- name: Checkout
43+
uses: actions/checkout@v3
2044
with:
2145
lfs: true
22-
- name: feelpp
23-
run: |
24-
echo "deb https://dl.bintray.com/feelpp/ubuntu focal stable" | sudo tee -a /etc/apt/sources.list
25-
wget -qO - https://bintray.com/user/downloadSubjectPublicKey?username=bintray | sudo apt-key add -
26-
sudo apt update
27-
sudo apt install -y libfeelpp-dev feelpp-tools
28-
- name: antora
46+
recursive: true
47+
-
48+
name: Build
2949
run: |
30-
sudo npm i -g @antora/cli@2.3 @antora/site-generator-default@2.3
31-
- name: Build Tutorial Dev
50+
cmake --preset default
51+
cmake --build --preset default
52+
-
53+
name: Check
3254
run: |
33-
mkdir build && cd build
34-
CXX=clang++-9 cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=./install ..
35-
make
36-
make install
37-
- name: Ctest
38-
run: |
39-
ctest -R .
40-
working-directory: build
41-
- name: Package
55+
ctest --preset default
56+
env:
57+
OMPI_ALLOW_RUN_AS_ROOT: 1
58+
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1
59+
-
60+
name: Package
4261
run: |
43-
make package
44-
mkdir artifact && cp feelpp-tutorial-dev*.tar.gz artifact
45-
ls -l artifact
46-
tar tzvf feelpp-tutorial-dev*.tar.gz
47-
working-directory: build
48-
# - name: Upload artifact
49-
# uses: actions/upload-artifact@v1.0.0
50-
# with:
51-
# # Artifact name
52-
# name: Tutorial Dev-${{ runner.os }}
53-
# # Directory containing files to upload
54-
# path: build/install/
62+
cmake --build --preset default -t package
63+
- name: Upload Artifact
64+
uses: actions/upload-artifact@v3
65+
with:
66+
# Artifact name
67+
name: feelpp-tutorial-dev-artifacts
68+
# Directory containing files to upload
69+
path: build/default/assets/feelpp-tutorial-dev-*
70+
- name: Release
71+
if: startsWith(github.ref ,'refs/tags/v')
72+
uses: softprops/action-gh-release@v1
73+
with:
74+
files: build/default/assets/feelpp-tutorial-dev-*
75+
draft: false
76+
prerelease: ${{ contains(github.ref, 'alpha') || contains(github.ref, 'beta') || contains(github.ref, 'rc')}}
77+
name: Release ${{ github.ref_name }}
78+
generate_release_notes: true
79+
tag_name: ${{ github.ref }}
80+
token: ${{ secrets.GITHUB_TOKEN }}
81+
deliver:
82+
runs-on: self-ubuntu-22.04
83+
needs: build_code
84+
name: Build docker, tag and push
85+
86+
steps:
87+
- uses: actions/checkout@v3
88+
with:
89+
lfs: true
90+
submodules: 'recursive'
91+
- name: Download
92+
uses: actions/download-artifact@v3
93+
with:
94+
# Artifact name
95+
name: feelpp-tutorial-dev-artifacts
96+
path: artifacts/
97+
-
98+
name: Docker meta
99+
id: meta
100+
uses: docker/metadata-action@v4
101+
with:
102+
images: |
103+
ghcr.io/feelpp/feelpp-tutorial-dev
104+
tags: |
105+
type=ref,event=branch
106+
type=ref,event=pr
107+
type=semver,pattern={{version}}
108+
type=semver,pattern={{major}}.{{minor}}
109+
-
110+
name: Set up QEMU
111+
uses: docker/setup-qemu-action@v2
112+
-
113+
name: Set up Docker Buildx
114+
uses: docker/setup-buildx-action@v2
115+
-
116+
name: Login to GitHub Container Registry
117+
uses: docker/login-action@v2
118+
with:
119+
registry: ghcr.io
120+
username: ${{ github.repository_owner }}
121+
password: ${{ secrets.CR_PAT }}
122+
-
123+
name: Build container image
124+
uses: docker/build-push-action@v4
125+
with:
126+
context: artifacts
127+
push: ${{ github.event_name != 'pull_request' }}
128+
tags: ${{ steps.meta.outputs.tags }}
129+
labels: ${{ steps.meta.outputs.labels }}
130+
file: ./Dockerfile
131+

.github/workflows/release.yml

Lines changed: 0 additions & 68 deletions
This file was deleted.

.gitignore

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
node_modules/
12
build*/
2-
docs/public/
3-
docs/cache/
3+
public/
4+
cache/
45
*.bak
6+
jupyter/
57
# Prerequisites
68
*.d
79

@@ -34,3 +36,11 @@ docs/cache/
3436
*.exe
3537
*.out
3638
*.app
39+
40+
# Emacs files
41+
*~
42+
\#*\#
43+
*.elc
44+
auto-save-list
45+
tramp
46+
.\#*

CMakeLists.txt

Lines changed: 50 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Author(s): Christophe Prud'homme <christophe.prudhomme@feelpp.org>
44
# Date: 2020-06-03
55
#
6-
# Copyright (C) 2020 Cemosis
6+
# Copyright (C) 2020-present Cemosis
77
#
88
# Distributed under the GPL(GNU Public License):
99
# This program is free software; you can redistribute it and/or modify
@@ -21,20 +21,24 @@
2121
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
2222
#
2323
#
24+
cmake_minimum_required(VERSION 3.21.0)
25+
project(feelpp-tutorial-dev VERSION 1.0.0)
26+
set(EXTRA_VERSION "-beta.1")
27+
set(PROJECT_SHORTNAME "ftd")
2428

25-
cmake_minimum_required(VERSION 3.12)
26-
project(feelpp-tutorial-dev VERSION 0.1.0)
27-
set(PROJECT_SHORTNAME "tut")
29+
include(GNUInstallDirs)
2830

31+
if (POLICY CMP0077)
32+
cmake_policy(SET CMP0077 NEW)
33+
set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
34+
endif()
2935

30-
if ( ${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR} )
31-
#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 )
32-
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 )
33-
if(NOT FEELPP_FOUND)
34-
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.")
35-
endif()
36-
else()
37-
include_directories(${CMAKE_SOURCE_DIR}/toolboxes ${CMAKE_BINARY_DIR}/toolboxes)
36+
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 )
37+
if(NOT FEELPP_FOUND)
38+
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.")
39+
endif()
40+
if ( NOT FEELPP_TOOLBOXES_FOUND )
41+
message(WARNING "Feel++ Toolboxes SDK is not found on your system. The toolbox application is now disabled.")
3842
endif()
3943

4044
enable_testing()
@@ -44,6 +48,7 @@ if ( NOT TARGET check )
4448
endif()
4549

4650

51+
add_subdirectory( src )
4752
add_subdirectory( docs )
4853

4954
# extra ignored files
@@ -53,7 +58,38 @@ list(APPEND CPACK_SOURCE_IGNORE_FILES
5358
.travis.yml
5459
.appveyor.yml
5560
)
56-
set(CPACK_SOURCE_PACKAGE_FILE_NAME "${PROJECT_NAME}-${PROJECT_VERSION}")
57-
set(CPACK_GENERATOR "TGZ")
61+
62+
set(CPACK_PACKAGE_NAME "${PROJECT_NAME}-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}${EXTRA_VERSION}")
63+
set(CPACK_SOURCE_PACKAGE_FILE_NAME "${PROJECT_NAME}-${PROJECT_VERSION}${EXTRA_VERSION}")
64+
SET(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}${EXTRA_VERSION}-${CMAKE_SYSTEM_NAME}")
65+
set(CPACK_PACKAGE_DIRECTORY "${PROJECT_BINARY_DIR}/assets")
66+
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Cemosis feelpp-tutorial-dev applications")
67+
set(CPACK_PACKAGE_DESCRIPTION "Cemosis provides a Feel++ programming tutorial.")
68+
set(CPACK_PACKAGE_VENDOR "Cemosis")
69+
set(CPACK_PACKAGE_CONTACT "Christophe Prud'homme <christophe.prudhomme@cemosis.fr>")
70+
set(CPACK_PACKAGE_VERSION_MAJOR "${PROJECT_VERSION_MAJOR}")
71+
set(CPACK_PACKAGE_VERSION_MINOR "${PROJECT_VERSION_MINOR}")
72+
set(CPACK_PACKAGE_VERSION_PATCH "${PROJECT_VERSION_PATCH}")
73+
74+
75+
set(CPACK_GENERATOR "TGZ;DEB")
5876
set(CPACK_SOURCE_GENERATOR "TGZ")
77+
78+
79+
set(CPACK_DEBIAN_PACKAGE_NAME "${PROJECT_NAME}")
80+
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "${CPACK_PACKAGE_CONTACT}")
81+
if ( USE_FEELPP_TOOLBOXES )
82+
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libfeelpp1 (>= 0.109)") # add depends with relevant toolbox lib
83+
else()
84+
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libfeelpp1 (>= 0.109)")
85+
endif()
86+
set(CPACK_DEBIAN_PACKAGE_DESCRIPTION_SUMMARY "${CPACK_PACKAGE_DESCRIPTION_SUMMARY}")
87+
set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "${CPACK_PACKAGE_DESCRIPTION}")
88+
set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
89+
set(CPACK_DEBIAN_PACKAGE_SECTION "science")
90+
set(CPACK_DEBIAN_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}${EXTRA_VERSION}")
91+
set(CPACK_DEBIAN_ARCHITECTURE "${CMAKE_SYSTEM_PROCESSOR}")
92+
# set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_SOURCE_DIR}/cmake/debian/postinst")
93+
5994
include(CPack)
95+

0 commit comments

Comments
 (0)