Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into feature/fixed-poi…
Browse files Browse the repository at this point in the history
…nt-multiplication-for-integral-conversion
  • Loading branch information
burnpanck committed Nov 5, 2024
2 parents d00b330 + cc25f9b commit 8415998
Show file tree
Hide file tree
Showing 136 changed files with 5,935 additions and 2,544 deletions.
12 changes: 11 additions & 1 deletion .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,28 @@ AccessModifierOffset: -2
# AcrossEmptyLines: false
# AcrossComments: false
# AlignCompound: false
# AlignFunctionPointers: false
# PadOperators: true
# AlignConsecutiveBitFields:
# Enabled: false
# AcrossEmptyLines: false
# AcrossComments: false
# AlignCompound: false
# AlignFunctionPointers: false
# PadOperators: false
# AlignConsecutiveDeclarations:
# Enabled: false
# AcrossEmptyLines: false
# AcrossComments: false
# AlignCompound: false
# AlignFunctionPointers: false
# PadOperators: false
# AlignConsecutiveMacros:
# Enabled: false
# AcrossEmptyLines: false
# AcrossComments: false
# AlignCompound: false
# AlignFunctionPointers: false
# PadOperators: false
# AlignConsecutiveShortCaseStatements:
# Enabled: false
Expand All @@ -41,8 +45,10 @@ AccessModifierOffset: -2
# OverEmptyLines: 0
# AllowAllArgumentsOnNextLine: true
# AllowAllParametersOfDeclarationOnNextLine: true
# AllowBreakBeforeNoexceptSpecifier: Never
# AllowShortBlocksOnASingleLine: Never
# AllowShortCaseLabelsOnASingleLine: false
# AllowShortCompoundRequirementOnASingleLine: true
# AllowShortEnumsOnASingleLine: true
# AllowShortFunctionsOnASingleLine: All
# AllowShortIfStatementsOnASingleLine: WithoutElse
Expand Down Expand Up @@ -76,7 +82,8 @@ BraceWrapping:
# SplitEmptyFunction: true
SplitEmptyRecord: false
# SplitEmptyNamespace: true
# BreakAfterAttributes: Never
# BreakAdjacentStringLiterals: true
# BreakAfterAttributes: Leave
# BreakAfterJavaFieldAnnotations: false
# BreakArrays: true
# BreakBeforeBinaryOperators: None
Expand Down Expand Up @@ -160,6 +167,7 @@ MaxEmptyLinesToKeep: 2
# PenaltyBreakComment: 300
# PenaltyBreakFirstLessLess: 120
# PenaltyBreakOpenParenthesis: 0
# PenaltyBreakScopeResolution: 500
# PenaltyBreakString: 1000
# PenaltyBreakTemplateDeclaration: 10
# PenaltyExcessCharacter: 1000000
Expand Down Expand Up @@ -207,6 +215,7 @@ QualifierAlignment: Left
# RequiresExpressionIndentation: OuterScope
# SeparateDefinitionBlocks: Leave
# ShortNamespaceLines: 1
# SkipMacroDefinitionBody: false
# SortIncludes: CaseSensitive
# SortJavaStaticImport: Before
SortUsingDeclarations: false
Expand All @@ -228,6 +237,7 @@ SpaceBeforeParensOptions:
# AfterFunctionDeclarationName: false
# AfterIfMacros: true
# AfterOverloadedOperator: false
# AfterPlacementOperator: true
AfterRequiresInClause: true
# AfterRequiresInExpression: false
# BeforeNonEmptyParentheses: false
Expand Down
64 changes: 46 additions & 18 deletions .github/workflows/ci-conan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,14 @@ jobs:
contracts: ["none", "gsl-lite", "ms-gsl"]
std: [20, 23]
config:
# - {
# name: "MSVC 14.2",
# os: windows-2019,
# compiler: { type: VISUAL, version: 16, cc: "", cxx: "" },
# conan-config: "-c user.mp-units.build:skip_la=True",
# }
# - {
# name: "MSVC 14.3",
# os: windows-2022,
# compiler: { type: MSVC, version: 193, cc: "", cxx: "" },
# conan-config: "",
# }
- {
name: "MSVC 14.4",
os: windows-2022,
compiler: { type: MSVC, version: 194, cc: "", cxx: "" },
cxx_modules: "False",
std_format_support: "True",
conan-config: "",
}
- {
name: "GCC-12",
os: ubuntu-24.04,
Expand Down Expand Up @@ -143,6 +139,20 @@ jobs:
std_format_support: "True",
conan-config: "",
}
- {
name: "Clang-18 on Apple M1 (arm64)",
os: macos-14,
compiler:
{
type: CLANG,
version: 18,
cc: "/opt/homebrew/opt/llvm@18/bin/clang-18",
cxx: "/opt/homebrew/opt/llvm@18/bin/clang++",
},
lib: "libc++",
cxx_modules: "False",
std_format_support: "True"
}
- {
name: "Apple Clang 15",
os: macos-13,
Expand All @@ -168,7 +178,9 @@ jobs:

steps:
- uses: actions/checkout@v4
- run: echo "cache_id=$(/bin/date -u "+%Y%m%d")" >> $GITHUB_ENV
- name: Generate unique cache id
shell: bash
run: echo "cache_id=$(/bin/date -u "+%Y%m%d")" >> $GITHUB_ENV
- name: Cache Conan data
uses: actions/cache@v4
if: always()
Expand Down Expand Up @@ -196,17 +208,22 @@ jobs:
shell: bash
run: |
sudo apt install -y g++-${{ matrix.config.compiler.version }}
- name: Install Clang
if: matrix.config.compiler.type == 'CLANG'
- name: Install Clang with apt
if: matrix.config.compiler.type == 'CLANG' && matrix.config.os != 'macos-14'
shell: bash
working-directory: ${{ env.HOME }}
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh ${{ matrix.config.compiler.version }}
sudo apt install -y clang-tools-${{ matrix.config.compiler.version }}
- name: Install Clang using homebrew
if: matrix.config.compiler.type == 'CLANG' && matrix.config.os == 'macos-14'
shell: bash
run: |
brew install llvm@18
- name: Install Libc++
if: matrix.config.compiler.type == 'CLANG' && matrix.config.lib == 'libc++'
if: matrix.config.compiler.type == 'CLANG' && matrix.config.lib == 'libc++' && matrix.config.os != 'macos-14'
shell: bash
run: |
sudo apt install -y libc++-${{ matrix.config.compiler.version }}-dev libc++abi-${{ matrix.config.compiler.version }}-dev libunwind-${{ matrix.config.compiler.version }}-dev
Expand Down Expand Up @@ -237,14 +254,25 @@ jobs:
sed -i.backup '/^\[settings\]$/,/^\[/ s/^compiler.cppstd=.*/compiler.cppstd=${{ matrix.std }}/' ~/.conan2/profiles/default
sed -i.backup '/^\[settings\]$/,/^\[/ s/^build_type=.*/build_type=${{ matrix.build_type }}/' ~/.conan2/profiles/default
conan profile show -pr default
- run: echo "std_format=$([ "${{ matrix.formatting }}" == "std::format" ] && echo "True" || echo "False")" >> $GITHUB_ENV
- run: echo "import_std=$([ "${{ matrix.config.cxx_modules }}" == "True" ] && [ "${{ matrix.config.contracts }}" == "none" ] && [ "${{ matrix.formatting }}" == "std::format" ] && echo "True" || echo "False")" >> $GITHUB_ENV
- name: Set 'std_format' and 'import_std' environment variables
shell: bash
run: |
echo "std_format=$([ "${{ matrix.formatting }}" == "std::format" ] && echo "True" || echo "False")" >> $GITHUB_ENV
echo "import_std=$([ "${{ matrix.config.cxx_modules }}" == "True" ] && [ "${{ matrix.config.contracts }}" == "none" ] && [ "${{ matrix.formatting }}" == "std::format" ] && echo "True" || echo "False")" >> $GITHUB_ENV
- name: Create Conan package
if: matrix.config.compiler.type != 'MSVC'
shell: bash
run: |
conan create . --user mpusz --channel ${CHANNEL} --lockfile-out=package.lock \
-b mp-units/* -b missing -c tools.cmake.cmaketoolchain:generator="Ninja Multi-Config" -c user.mp-units.build:all=True \
-o '&:cxx_modules=${{ matrix.config.cxx_modules }}' -o '&:import_std=${{ env.import_std }}' -o '&:std_format=${{ env.std_format }}' -o '&:contracts=${{ matrix.contracts }}' ${{ matrix.config.conan-config }}
- name: Create Conan package
if: matrix.config.compiler.type == 'MSVC'
shell: bash
run: |
conan create . --user mpusz --channel ${CHANNEL} --lockfile-out=package.lock \
-b mp-units/* -b missing -c tools.cmake.cmaketoolchain:generator="Ninja Multi-Config" -c user.mp-units.build:all=False \
-o '&:cxx_modules=${{ matrix.config.cxx_modules }}' -o '&:import_std=${{ env.import_std }}' -o '&:std_format=${{ env.std_format }}' -o '&:contracts=${{ matrix.contracts }}' ${{ matrix.config.conan-config }}
- name: Obtain package reference
id: get-package-ref
shell: bash
Expand Down
53 changes: 37 additions & 16 deletions .github/workflows/ci-test-package-cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,13 @@ jobs:
contracts: ["none", "gsl-lite", "ms-gsl"]
std: [20, 23]
config:
# - {
# name: "MSVC 14.2",
# os: windows-2019,
# compiler: { type: VISUAL, version: 16, cc: "", cxx: "" },
# }
# - {
# name: "MSVC 14.3",
# os: windows-2022,
# compiler: { type: MSVC, version: 193, cc: "", cxx: "" },
# }
- {
name: "MSVC 14.4",
os: windows-2022,
compiler: { type: MSVC, version: 194, cc: "", cxx: "" },
cxx_modules: "False",
std_format_support: "True",
}
- {
name: "GCC-12",
os: ubuntu-24.04,
Expand Down Expand Up @@ -136,6 +133,20 @@ jobs:
cxx_modules: "False",
std_format_support: "True"
}
- {
name: "Clang-18 on Apple M1 (arm64)",
os: macos-14,
compiler:
{
type: CLANG,
version: 18,
cc: "/opt/homebrew/opt/llvm@18/bin/clang-18",
cxx: "/opt/homebrew/opt/llvm@18/bin/clang++",
},
lib: "libc++",
cxx_modules: "False",
std_format_support: "True"
}
- {
name: "Apple Clang 15",
os: macos-14,
Expand Down Expand Up @@ -165,7 +176,9 @@ jobs:
with:
string: ${{ matrix.build_type }}
- uses: actions/checkout@v4
- run: echo "cache_id=$(/bin/date -u "+%Y%m%d")" >> $GITHUB_ENV
- name: Generate unique cache id
shell: bash
run: echo "cache_id=$(/bin/date -u "+%Y%m%d")" >> $GITHUB_ENV
- name: Cache Conan data
uses: actions/cache@v4
if: always()
Expand All @@ -188,17 +201,22 @@ jobs:
shell: bash
run: |
sudo apt install -y g++-${{ matrix.config.compiler.version }}
- name: Install Clang
if: matrix.config.compiler.type == 'CLANG'
- name: Install Clang with apt
if: matrix.config.compiler.type == 'CLANG' && matrix.config.os != 'macos-14'
shell: bash
working-directory: ${{ env.HOME }}
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh ${{ matrix.config.compiler.version }}
sudo apt install -y clang-tools-${{ matrix.config.compiler.version }}
- name: Install Clang using homebrew
if: matrix.config.compiler.type == 'CLANG' && matrix.config.os == 'macos-14'
shell: bash
run: |
brew install llvm@18
- name: Install Libc++
if: matrix.config.compiler.type == 'CLANG' && matrix.config.lib == 'libc++'
if: matrix.config.compiler.type == 'CLANG' && matrix.config.lib == 'libc++' && matrix.config.os != 'macos-14'
shell: bash
run: |
sudo apt install -y libc++-${{ matrix.config.compiler.version }}-dev libc++abi-${{ matrix.config.compiler.version }}-dev libunwind-${{ matrix.config.compiler.version }}-dev
Expand Down Expand Up @@ -230,8 +248,11 @@ jobs:
sed -i.backup '/^\[settings\]$/,/^\[/ s/^compiler.cppstd=.*/compiler.cppstd=${{ matrix.std }}/' ~/.conan2/profiles/default
sed -i.backup '/^\[settings\]$/,/^\[/ s/^build_type=.*/build_type=${{ matrix.build_type }}/' ~/.conan2/profiles/default
conan profile show -pr default
- run: echo "std_format=$([ "${{ matrix.formatting }}" == "std::format" ] && echo "True" || echo "False")" >> $GITHUB_ENV
- run: echo "import_std=$([ "${{ matrix.config.cxx_modules }}" == "True" ] && [ "${{ matrix.config.contracts }}" == "none" ] && [ "${{ matrix.formatting }}" == "std::format" ] && echo "True" || echo "False")" >> $GITHUB_ENV
- name: Set 'std_format' and 'import_std' environment variables
shell: bash
run: |
echo "std_format=$([ "${{ matrix.formatting }}" == "std::format" ] && echo "True" || echo "False")" >> $GITHUB_ENV
echo "import_std=$([ "${{ matrix.config.cxx_modules }}" == "True" ] && [ "${{ matrix.config.contracts }}" == "none" ] && [ "${{ matrix.formatting }}" == "std::format" ] && echo "True" || echo "False")" >> $GITHUB_ENV
- name: Install Conan dependencies
shell: bash
run: |
Expand Down
18 changes: 11 additions & 7 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,12 @@ jobs:
git fetch origin gh-pages --depth=1
- name: Installing API reference dependencies
run: |
sudo apt update
sudo apt install latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended lmodern
sudo apt install haskell-stack graphviz nodejs npm ghc cabal-install
npm install split mathjax-full mathjax-node-sre
npm install split mathjax-full mathjax-node-sre mathjax-node-cli
cabal update
- name: Installing MathJax-Node-CLI
run: |
git clone https://github.com/mathjax/mathjax-node-cli --depth=1
echo "${{ github.workspace }}/mathjax-node-cli/bin" >> $GITHUB_PATH
echo "${{ github.workspace }}/node_modules/.bin" >> $GITHUB_PATH
- name: Get git repos with API reference tools
run: |
git clone https://github.com/JohelEGP/jegp.cmake_modules.git --depth=1
Expand All @@ -76,6 +75,11 @@ jobs:
- name: Installing pip dependencies
run: |
pip install conan mkdocs-material mkdocs-rss-plugin mkdocs-material[imaging] mkdocs-exclude mike
- name: Building docs
- name: Building docs for a released version
if: startsWith(github.event.ref, 'refs/tags/v')
run: |
mike deploy --push --update-aliases `conan inspect . | sed -n -r 's/version: ([0-9]+.[0-9]+).[0-9]+/\1/p'`
- name: Building docs for a development version
if: ${{!startsWith(github.event.ref, 'refs/tags/v')}}
run: |
mike deploy --push --update-aliases `conan inspect . | sed -n -r 's/version: ([0-9]+.[0-9]+).[0-9]+/\1/p'` latest
mike deploy --push --update-aliases HEAD latest
13 changes: 8 additions & 5 deletions .gitpod/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,19 @@ RUN sudo install-packages \
libz-dev

# Install API reference dependencies
RUN sudo install-packages \
latexmk \
texlive-latex-recommended \
texlive-latex-extra \
texlive-fonts-recommended \
lmodern
RUN sudo install-packages \
haskell-stack \
graphviz \
nodejs \
npm \
ghc \
cabal-install
RUN npm install split mathjax-full mathjax-node-sre
RUN npm install split mathjax-full mathjax-node-sre mathjax-node-cli
RUN cabal update

# Install MathJax-Node-CLI
git clone https://github.com/mathjax/mathjax-node-cli --depth=1
echo "export PATH=\"$PWD/mathjax-node-cli/bin:\$PATH\"" >> ~/.bashrc
RUN echo "export PATH=\"~/node_modules/.bin:\$PATH\"" >> ~/.bashrc
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ repos:
- id: trailing-whitespace
- id: end-of-file-fixer
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v17.0.5
rev: v19.1.2
hooks:
- id: clang-format
- repo: https://github.com/cheshirekow/cmake-format-precommit
Expand Down
Loading

0 comments on commit 8415998

Please sign in to comment.