-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Documentation & Github Actions (#101)
* refactor(cmake): add `CPM.cmake`, restructure CMakeLists * refactor(cmake): update examples * refactor(cmake): update tests * fix: missing include * refactor(cmake): update python bindings * feat: add sanitizer options * feat(cmake): add install target * refactor(cmake/python): use `CMAKE_LIBRARY_OUTPUT_DIRECTORY` when available * feat(cmake): add sanitizer options for gcc * fix(cmake): static builds * refactor(cmake): add messages * fix(format-project): shellcheck issues * refactor(cmake/sanitizer): more explicit compiler id check * fix: update formatting * fix(workflows): build commands * fix(workflows(windows): long paths * fix(CMakeLists): disable VTK rendering group * docs(readme): update build instructions * docs(readme): fix test command * fix: ctest excludes * refactor: disable sanitizer for msvc and apple clang * chore: apply cmake-format * fix(cmake-format): define CPM functions * fix(vtk): disable libproj support * Should fix Windows workflow * revert: formatting * fix(ci/windows): enable long paths * refactor(cmake): disable wrapping for vtk and disable libproj * refactor(cmake): disable sanitizer by default * fix(windows): only export symbols for viennals * refactor(cmake): exclude dependencies from all target * refactor(cmake): use get-cpm * refactor(cmake): lower required vtk version * This should also fix the windows workflows as we've switched to a commit that includes upstream!10542 * fix: formatting * fix: setup vtk env for targets * fix: formatting * fix: remove debug print * fix(cmakelists): vtk dir on linux * fix: skip vtk environment on non windows platforms * fix: formatting * refactor: more logging, don't use early return in macro * early return behavior in macro may vary in different cmake versions * refactor: adjust target naming * refactor(ci): use matrix workflow & cpm cache * fix(ci): install dependencies on fedora * fix(ci): don't fail fast * fix(ci/macos): setup openmp * fix(ci/windows): long paths * fix(ci/macos): openmp * refactor(ci): improve naming * refactor(ci): cache build * feat(ci): add binding workflow * fix(actions/setup): install pip3 * fix(ctest): specify config * fix(actions/setup): install python3-devel * feat: update doxygen * Add Modern Theme * Update Deployment * Remove pre-built doxygen files * refactor(pages): remove redundant multi-line * fix(docs): checkout submodules * fix(docs): latest doxygen * fix(docs): git installation * docs: update readme * refactor(cmake): bump version * docs(readme): improve conformance with doxygen * fix(doxygen): logos * docs(readme): add missing newline * fix: merge issue
- Loading branch information
Showing
678 changed files
with
455 additions
and
81,090 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: 🏗️ Setup Environment | ||
description: Install Dependencies & Deploy Workarounds | ||
|
||
inputs: | ||
container: | ||
required: true | ||
description: Build container used | ||
|
||
install-vtk: | ||
required: true | ||
description: Wether or not to install VTK as a system dependency | ||
|
||
runs: | ||
using: "composite" | ||
|
||
steps: | ||
- name: 🩹 Enable Long Paths | ||
shell: bash | ||
if: ${{ inputs.container == 'windows-latest' }} | ||
run: git config --system core.longpaths true | ||
|
||
- name: 📋 Install Dependencies | ||
shell: bash | ||
if: ${{ inputs.container == 'ubuntu-latest' }} | ||
run: dnf install -y make automake gcc gcc-c++ kernel-devel cmake git python3 python3-pip python3-devel | ||
|
||
- name: 📋 Install OpenMP | ||
shell: bash | ||
if: ${{ inputs.container == 'macos-latest' }} | ||
run: | | ||
brew reinstall --build-from-source --formula ./.github/homebrew/libomp.rb | ||
- name: 📋 Install VTK | ||
shell: bash | ||
if: ${{ inputs.install-vtk == 'true' }} | ||
run: dnf install -y vtk vtk-devel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
# SPDX-License-Identifier: BSD-2-Clause | ||
|
||
class Libomp < Formula | ||
desc "LLVM's OpenMP runtime library" | ||
homepage "https://openmp.llvm.org/" | ||
url "https://github.com/llvm/llvm-project/releases/download/llvmorg-15.0.7/openmp-15.0.7.src.tar.xz" | ||
sha256 "3f168d38e7a37b928dcb94b33ce947f75d81eef6fa6a4f9d16b6dc5511c07358" | ||
license "MIT" | ||
|
||
livecheck do | ||
url :stable | ||
regex(/^llvmorg[._-]v?(\d+(?:\.\d+)+)$/i) | ||
end | ||
|
||
bottle do | ||
sha256 cellar: :any, arm64_ventura: "8c5c7b912a075e598fb7ae10f2999853343b2662061d92040b1a584cbb3ba7d2" | ||
sha256 cellar: :any, arm64_monterey: "1b1aad07e8677744cdaa264419fade98bd1a852894c77d01985053a96b7d1c7d" | ||
sha256 cellar: :any, arm64_big_sur: "00e04fbe9783ad7751eaa6d2edda92dfbff85131777255a74e364f3217a7a2df" | ||
sha256 cellar: :any, ventura: "762c461db6af3cf78983b1eb58aee62699652b96237abf79469c8ac034b2156b" | ||
sha256 cellar: :any, monterey: "0b944a6bbe8955e7900882b94f1b0b09030d5791191dc5b0c8b3d5d0895f4b12" | ||
sha256 cellar: :any, big_sur: "f92e5b31f86c22c0fe875b50e050c19a89993b36106a9ad2737230ae2cb68069" | ||
sha256 cellar: :any_skip_relocation, x86_64_linux: "d2a16a906c029e8405a11924837417ad1008d41bb1877399f494cb872a179f01" | ||
end | ||
|
||
# Ref: https://github.com/Homebrew/homebrew-core/issues/112107 | ||
keg_only "it can override GCC headers and result in broken builds" | ||
|
||
depends_on "cmake" => :build | ||
depends_on "lit" => :build | ||
uses_from_macos "llvm" => :build | ||
|
||
resource "cmake" do | ||
url "https://github.com/llvm/llvm-project/releases/download/llvmorg-15.0.7/cmake-15.0.7.src.tar.xz" | ||
sha256 "8986f29b634fdaa9862eedda78513969fe9788301c9f2d938f4c10a3e7a3e7ea" | ||
end | ||
|
||
def install | ||
(buildpath/"src").install buildpath.children | ||
(buildpath/"cmake").install resource("cmake") | ||
|
||
# Disable LIBOMP_INSTALL_ALIASES, otherwise the library is installed as | ||
# libgomp alias which can conflict with GCC's libgomp. | ||
args = ["-DLIBOMP_INSTALL_ALIASES=OFF"] | ||
args << "-DOPENMP_ENABLE_LIBOMPTARGET=OFF" if OS.linux? | ||
|
||
# Build universal binary | ||
ENV.permit_arch_flags | ||
ENV.runtime_cpu_detection | ||
args << "-DCMAKE_OSX_ARCHITECTURES=arm64;x86_64" | ||
|
||
system "cmake", "-S", "src", "-B", "build/shared", *std_cmake_args, *args | ||
system "cmake", "--build", "build/shared" | ||
system "cmake", "--install", "build/shared" | ||
|
||
system "cmake", "-S", "src", "-B", "build/static", | ||
"-DLIBOMP_ENABLE_SHARED=OFF", | ||
*std_cmake_args, *args | ||
system "cmake", "--build", "build/static" | ||
system "cmake", "--install", "build/static" | ||
end | ||
|
||
test do | ||
(testpath/"test.cpp").write <<~EOS | ||
#include <omp.h> | ||
#include <array> | ||
int main (int argc, char** argv) { | ||
std::array<size_t,2> arr = {0,0}; | ||
#pragma omp parallel num_threads(2) | ||
{ | ||
size_t tid = omp_get_thread_num(); | ||
arr.at(tid) = tid + 1; | ||
} | ||
if(arr.at(0) == 1 && arr.at(1) == 2) | ||
return 0; | ||
else | ||
return 1; | ||
} | ||
EOS | ||
system ENV.cxx, "-Werror", "-Xpreprocessor", "-fopenmp", "test.cpp", "-std=c++11", | ||
"-I#{include}", "-L#{lib}", "-lomp", "-o", "test" | ||
system "./test" | ||
end | ||
end |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
on: | ||
push: | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
name: 📄 Setup Documentation | ||
|
||
jobs: | ||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
|
||
runs-on: ubuntu-latest | ||
container: archlinux:base-devel | ||
|
||
steps: | ||
- name: 📋 Install Dependencies | ||
run: pacman --noconfirm -Syu doxygen git | ||
|
||
- name: 📥 Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: "recursive" | ||
|
||
- name: 🔨 Build | ||
run: doxygen docs/Doxyfile | ||
|
||
- name: 🚀 Upload Artifact | ||
uses: actions/upload-pages-artifact@v1 | ||
with: | ||
path: html | ||
|
||
- name: 📃 Setup Pages | ||
uses: actions/configure-pages@v3 | ||
|
||
- name: 📦 Deploy | ||
id: deployment | ||
uses: actions/deploy-pages@v2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: 🔍 Check Formatting | ||
|
||
on: | ||
push: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
check-coding-style: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 📥 Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: 📋 Install Dependencies | ||
run: pip install -U cmakelang | ||
|
||
- name: 🏗️ Format | ||
run: ./format-project.sh | ||
|
||
- name: 🔍 Check changes | ||
run: | | ||
if [[ $(git diff-index --name-only --exit-code HEAD) ]]; then | ||
git diff | ||
exit -1 | ||
fi |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.