-
Notifications
You must be signed in to change notification settings - Fork 9
Add clang format #148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Add clang format #148
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
34be5d5
Add clang format
koparasy 8f94207
Adding sudo
koparasy a6f2942
Fix syntax
koparasy f6151d9
Fixes on linter
koparasy 95dc753
Fixes to run container
koparasy 10c7612
Merge branch 'develop' into features/clang-format
koparasy 8c58268
Modify format to test formatter
koparasy d4dfb86
Update src/AMSlib/ml/surrogate.cpp
koparasy 1167a78
Update src/AMSlib/ml/surrogate.cpp
koparasy 56aaeda
Update src/AMSlib/ml/surrogate.cpp
koparasy 2867c68
Update src/AMSlib/ml/surrogate.cpp
koparasy 2c2a120
Revert modifications manually
koparasy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,104 @@ | ||
| name: cpp-linter | ||
|
|
||
| on: | ||
| pull_request: | ||
|
|
||
| jobs: | ||
| cpp-linter: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
| defaults: | ||
| run: | ||
| shell: bash -el {0} | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Install deps (APT) | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get update | ||
| sudo apt-get install -y \ | ||
| lsb-release \ | ||
| gnupg \ | ||
| software-properties-common \ | ||
| git \ | ||
| python3 \ | ||
| python3-pip \ | ||
| mariadb-server \ | ||
| mariadb-client \ | ||
| curl \ | ||
| rabbitmq-server \ | ||
| supervisor \ | ||
| python3-venv \ | ||
| nlohmann-json3-dev \ | ||
| build-essential \ | ||
| cmake \ | ||
| libopenmpi-dev \ | ||
| libmetis-dev \ | ||
| libhypre-dev \ | ||
| libblas-dev \ | ||
| liblapack-dev \ | ||
| libhdf5-dev \ | ||
| hdf5-tools | ||
| - name: Install clang-llvm | ||
| run: | | ||
| wget https://apt.llvm.org/llvm.sh | ||
| chmod +x llvm.sh | ||
| sudo ./llvm.sh 18 | ||
| - name: Install AMQCPP | ||
| run: | | ||
| git clone --depth=1 https://github.com/CopernicaMarketingSoftware/AMQP-CPP.git | ||
| cd AMQP-CPP/ | ||
| mkdir -p build/ | ||
| cd build/ | ||
| cmake -DCMAKE_CXX_FLAGS="-D_GLIBCXX_USE_CXX11_ABI=0" -DAMQP-CPP_LINUX_TCP=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DAMQP-CPP_BUILD_SHARED=On .. | ||
| make && sudo make install | ||
| - name: Install caliper | ||
| run: | | ||
| git clone --depth 1 https://github.com/LLNL/Caliper.git | ||
| cd Caliper | ||
| mkdir build && cd build | ||
| cmake .. | ||
| make && sudo make install | ||
| - name: Install Torch and HDF5 | ||
| run: | | ||
| pip3 install --no-cache-dir torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu | ||
| pip3 install h5py | ||
| - name: Install AMS | ||
| run: | | ||
| mkdir build | ||
| cd build | ||
| cmake -DWITH_RMQ=On \ | ||
| -DCMAKE_EXPORT_COMPILE_COMMANDS=on \ | ||
| -DTorch_DIR=$(python -c 'import torch; print(torch.__path__[0])')/share/cmake/Torch \ | ||
| -DBUILD_SHARED_LIBS=On \ | ||
| -DCMAKE_C_COMPILER=clang-18 \ | ||
| -DCMAKE_CXX_COMPILER=clang++-18 \ | ||
| -DWITH_CALIPER=On \ | ||
| -DWITH_HDF5=On \ | ||
| -DWITH_RMQ=On \ | ||
| -DWITH_TESTS=On \ | ||
| -DWITH_AMS_DEBUG=On \ | ||
| -DWITH_CUDA=Off \ | ||
| -DWITH_MPI=On .. | ||
| - uses: cpp-linter/cpp-linter-action@v2 | ||
| id: linter | ||
| continue-on-error: true | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| with: | ||
| version: 18 | ||
| ignore: .github | .gitlab | scripts | build | .git | ||
| database: build | ||
| extra-args: '-D__AMS_ENABLE_CALIPER__ -D__AMS_ENABLE_HDF5__ -D__AMS_ENABLE_MPI__ -D__AMS_ENABLE_RMQ__' | ||
| style: file | ||
| tidy-checks: '' | ||
| lines-changed-only: true | ||
| format-review: true | ||
| tidy-review: false | ||
| passive-reviews: true | ||
| thread-comments: true | ||
| - name: Check clang-format linter status | ||
| if: steps.linter.outputs.clang-format-checks-failed != 0 | ||
| run: exit 1 |
This file contains hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.