-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* start migration to conan2 * fix conan package * Reformat * change conan version to 2, fix CI * fix conan version * Fix cmake preset name * Fix bash command * Add install conan action * Add action file * Add shell name * Change build-package action * Fix unit test clone * Add install * Fix conan install * Add REDUCT_CPP_USE_STD_CHRONO * Set c++ standart to 20 * Add date * Remove install step from main ci * Add show preset * Add build_tests option to action * Fix build tests * Fix run tests * Check windows * Add std::chrono option logic to conanfile * Add requirements method * Add cmake build action * Install OpenSSL for windows * Update changelog * add jira ticket id --------- Co-authored-by: Alexey Timin <atimin@gmail.com>
- Loading branch information
1 parent
6ce5e17
commit 17e76a9
Showing
15 changed files
with
409 additions
and
170 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -17,4 +17,4 @@ IncludeCategories: | |
Priority: 3 | ||
SortPriority: 0 | ||
|
||
ColumnLimit: 120 | ||
ColumnLimit: 120 |
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,50 @@ | ||
name: "build-package-cmake" | ||
description: "Install package and build example" | ||
inputs: | ||
build_tests: | ||
default: "false" | ||
install: | ||
default: "true" | ||
description: "Install the package after build" | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Detect OS and install OpenSSL | ||
shell: bash | ||
run: | | ||
if [[ "${{ runner.os }}" == "Windows" ]]; then | ||
choco install openssl -y | ||
openssl version | ||
fi | ||
- name: Detect OS and set std::chrono flag | ||
shell: bash | ||
run: | | ||
if [[ "${{ runner.os }}" == "Linux" ]]; then | ||
echo "USE_CHRONO=OFF" >> $GITHUB_ENV | ||
elif [[ "${{ runner.os }}" == "Windows" ]]; then | ||
echo "USE_CHRONO=ON" >> $GITHUB_ENV | ||
fi | ||
- name: Cmake configuration without tests | ||
if: ${{inputs.build_tests == 'false'}} | ||
shell: bash | ||
run: cmake -S . -B build -DREDUCT_CPP_USE_STD_CHRONO=$USE_CHRONO | ||
|
||
- name: Cmake configuration with tests | ||
if: ${{inputs.build_tests == 'true'}} | ||
shell: bash | ||
run: cmake -S . -B build -DREDUCT_CPP_ENABLE_TESTS=ON -DREDUCT_CPP_USE_STD_CHRONO=$USE_CHRONO | ||
|
||
- name: Build package | ||
shell: bash | ||
run: | | ||
if [[ "${{ runner.os }}" == "Linux" ]]; then | ||
cmake --build build | ||
elif [[ "${{ runner.os }}" == "Windows" ]]; then | ||
cmake --build build --config Release | ||
fi | ||
- name: Install package | ||
if: ${{inputs.install == 'true' }} | ||
run: sudo cmake --install build | ||
shell: bash |
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 |
---|---|---|
@@ -1,24 +1,49 @@ | ||
name: "build-package" | ||
description: "Install package and build example" | ||
inputs: | ||
build_tests: | ||
default: "false" | ||
install: | ||
default: "true" | ||
description: "Install the package after build" | ||
runs: | ||
using: "composite" | ||
steps: | ||
- uses: ./.github/actions/install-conan | ||
|
||
- name: Run conan install | ||
shell: bash | ||
run: conan install . --build=missing -s:a=compiler.cppstd=20 | ||
|
||
- name: Detect OS and set preset name | ||
shell: bash | ||
run: | | ||
if [[ "${{ runner.os }}" == "Linux" ]]; then | ||
echo "PRESET=conan-release" >> $GITHUB_ENV | ||
elif [[ "${{ runner.os }}" == "Windows" ]]; then | ||
echo "PRESET=conan-default" >> $GITHUB_ENV | ||
fi | ||
- name: Cmake configuration without tests | ||
if: ${{inputs.build_tests == 'false'}} | ||
shell: bash | ||
run: cmake --preset $PRESET | ||
|
||
- name: Cmake configuration with tests | ||
if: ${{inputs.build_tests == 'true'}} | ||
shell: bash | ||
run: cmake --preset $PRESET -DREDUCT_CPP_ENABLE_TESTS=ON | ||
|
||
- name: Build package | ||
shell: bash | ||
run: cmake -DCMAKE_BUILD_TYPE=Debug -DREDUCT_CPP_ENABLE_EXAMPLES=ON -DREDUCT_CPP_ENABLE_TESTS=ON -S . -B build | ||
run: | | ||
if [[ "${{ runner.os }}" == "Linux" ]]; then | ||
cmake --build --preset $PRESET | ||
elif [[ "${{ runner.os }}" == "Windows" ]]; then | ||
cmake --build build --config Release | ||
fi | ||
- name: Install package | ||
if: ${{inputs.install == 'true' }} | ||
run: sudo cmake --install build/Release | ||
shell: bash | ||
run: sudo cmake --build build --target install | ||
- name: Build example | ||
if: ${{inputs.install == 'true' }} | ||
shell: bash | ||
run: | | ||
mkdir examples/build | ||
cd examples/build | ||
cmake .. | ||
cmake --build . |
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,12 @@ | ||
name: "install-conan" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Install conan | ||
shell: bash | ||
run: pip3 install conan==2.11.0 | ||
|
||
- name: Create profile | ||
shell: bash | ||
run: conan profile detect |
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
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
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 |
---|---|---|
@@ -1,19 +1,34 @@ | ||
# See https://pre-commit.com for more information | ||
# See https://pre-commit.com/hooks.html for more hooks | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v3.2.0 | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v5.0.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-added-large-files | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-added-large-files | ||
|
||
- repo: https://github.com/BlankSpruce/gersemi | ||
rev: 0.17.1 | ||
hooks: | ||
- id: gersemi | ||
|
||
- repo: https://github.com/psf/black | ||
rev: 24.10.0 | ||
hooks: | ||
- id: black | ||
|
||
- repo: https://github.com/pycqa/isort | ||
rev: 5.13.2 | ||
hooks: | ||
- id: isort | ||
args: ["--profile", "black", "--filter-files"] | ||
|
||
- repo: local | ||
- repo: local | ||
hooks: | ||
- id: cpplint | ||
name: cpplint | ||
description: Static code analysis of C/C++ files | ||
language: python | ||
files: \.(h\+\+|h|hh|hxx|hpp|cuh|c|cc|cpp|cu|c\+\+|cxx|tpp|txx)$ | ||
entry: cpplint | ||
- id: cpplint | ||
name: cpplint | ||
description: Static code analysis of C/C++ files | ||
language: python | ||
files: \.(h\+\+|h|hh|hxx|hpp|cuh|c|cc|cpp|cu|c\+\+|cxx|tpp|txx)$ | ||
entry: cpplint |
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
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
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
filter=-build/c++11,-build/header_guard,-build/include | ||
linelength=120 | ||
linelength=120 |
Oops, something went wrong.