Skip to content

Commit

Permalink
review comments:
Browse files Browse the repository at this point in the history
- fix format-rebase.sh
- yml formatting
- update checkout action version
- fix ABOUT-LICENSING.md formatting
- use fixed ubuntu version

Co-authored-by: Yu-Hsiang M. Tsai <yhmtsai@gmail.com>
  • Loading branch information
MarcelKoch and yhmtsai committed Nov 16, 2023
1 parent 60e2fb1 commit e2418ca
Show file tree
Hide file tree
Showing 16 changed files with 86 additions and 122 deletions.
2 changes: 1 addition & 1 deletion .github/format-rebase.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ git rebase --rebase-merges --empty=drop --no-keep-empty \
--exec "cp /tmp/add_license.sh /tmp/format_header.sh /tmp/update_ginkgo_header.sh dev_tools/scripts/ && \
dev_tools/scripts/add_license.sh && dev_tools/scripts/update_ginkgo_header.sh && \
for f in \$($DIFF_COMMAND | grep -E '$FORMAT_HEADER_REGEX'); do dev_tools/scripts/format_header.sh \$f; done && \
pipx run pre-commit run --files $TO_FORMAT && \
pipx run pre-commit run && \
git checkout dev_tools/scripts && (git diff >> /tmp/difflog; true) && (git diff --quiet || git commit -a --amend --no-edit --allow-empty)" \
base/$BASE_BRANCH 2>&1 || bot_error "Rebase failed, see the related [Action]($JOB_URL) for details"

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/bot-pr-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
if: github.event.issue.pull_request != '' && github.event.comment.body == 'label!' && (github.event.comment.author_association == 'COLLABORATOR' || github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER')
steps:
- name: Checkout the latest code (shallow clone)
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: develop
- name: Add appropriate labels
Expand All @@ -29,7 +29,7 @@ jobs:
if: github.event.issue.pull_request != '' && github.event.comment.body == 'format!' && (github.event.comment.author_association == 'COLLABORATOR' || github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER')
steps:
- name: Checkout the latest code (shallow clone)
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: develop
persist-credentials: false
Expand All @@ -44,7 +44,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout the latest code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: develop
fetch-depth: 0
Expand All @@ -60,7 +60,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout the latest code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: develop
fetch-depth: 0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/bot-pr-created.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
if: github.event.pull_request.author_association == 'COLLABORATOR' || github.event.pull_request.author_association == 'MEMBER' || github.event.pull_request.author_association == 'OWNER'
steps:
- name: Checkout the latest code (shallow clone)
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: develop
- name: Add appropriate labels
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/bot-pr-updated.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ jobs:
CMAKE_FLAGS: -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=DEBUG -DGINKGO_BUILD_TESTS=OFF -DGINKGO_BUILD_EXAMPLES=OFF -DGINKGO_BUILD_BENCHMARKS=OFF -DGINKGO_BUILD_HWLOC=OFF -DGINKGO_BUILD_REFERENCE=OFF -DGINKGO_BUILD_OMP=OFF -DGINKGO_BUILD_CUDA=OFF -DGINKGO_BUILD_HIP=OFF -DGINKGO_BUILD_SYCL=OFF
steps:
- name: Checkout the new code (shallow clone)
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: new
ref: ${{ github.event.pull_request.head.ref }}
- name: Checkout the old code (shallow clone)
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: old
ref: ${{ github.event.pull_request.base.ref }}
Expand Down Expand Up @@ -55,7 +55,7 @@ jobs:
if: github.event.pull_request.author_association == 'COLLABORATOR' || github.event.pull_request.author_association == 'MEMBER' || github.event.pull_request.author_association == 'OWNER'
steps:
- name: Checkout the latest code (shallow clone)
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: develop
- name: Check if PR number exists in wiki/Changelog
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/check-formatting.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
name: Check formatting
on:
workflow_call:
on: workflow_call

jobs:
pre-commit:
name: Run pre-commit hooks
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout the latest code (shallow clone)
uses: actions/checkout@v4
Expand All @@ -15,7 +14,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload code formatting patch
if: ${{ failure() && steps.pre-commit.outcome == 'failure' }}
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: patch
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/intel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:

steps:
- name: Checkout the latest code (shallow clone)
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: configure
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/joss.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

steps:
- name: Checkout the latest code (shallow clone)
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: setup
run: sudo apt-get install texlive-xetex pandoc pandoc-citeproc
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mirror.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: develop
fetch-depth: 0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:

steps:
- name: Checkout the latest code (shallow clone)
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: setup
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/spell_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
name: Spell Check with Typos
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Check for typos
uses: crate-ci/typos@master
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows-mingw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
runs-on: [windows-latest]
steps:
- name: Checkout the latest code (shallow clone)
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Debug over SSH (tmate)
uses: mxschmitt/action-tmate@v3.5
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows-msvc-cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:

steps:
- name: Checkout the latest code (shallow clone)
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: setup (versioned)
if: matrix.config.version != 'latest'
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows-msvc-ref.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
runs-on: [windows-latest]
steps:
- name: Checkout the latest code (shallow clone)
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Debug over SSH (tmate)
uses: mxschmitt/action-tmate@v3.5
Expand Down
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
repos:
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: 'v14.0.0' # The default in Ubuntu 22.04, which is used in our CI
hooks:
- id: clang-format
types_or: [c, c++, cuda, inc]
exclude: third_party/SuiteSparse/AMD/.*
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: 'v14.0.0' # The default in Ubuntu 22.04, which is used in our CI
hooks:
- id: clang-format
types_or: [c, c++, cuda, inc]
exclude: third_party/SuiteSparse/AMD/.*
150 changes: 59 additions & 91 deletions ABOUT-LICENSING.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,32 +48,6 @@ following license:
> (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
> OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
When compiling Ginkgo with `-DGINKGO_DEVEL_TOOLS=ON` the build system will download
[git-cmake-format](https://github.com/kbenzie/git-cmake-format), available under
the following license:

> This is free and unencumbered software released into the public domain.
>
> Anyone is free to copy, modify, publish, use, compile, sell, or distribute
> this software, either in source code form or as a compiled binary, for any
> purpose, commercial or non-commercial, and by any means.
>
> In jurisdictions that recognize copyright laws, the author or authors of this
> software dedicate any and all copyright interest in the software to the public
> domain. We make this dedication for the benefit of the public at large and to
> the detriment of our heirs and successors. We intend this dedication to be an
> overt act of relinquishment in perpetuity of all present and future rights to
> this software under copyright law.
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTBILITY,
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT, IN NO EVENT SHALL THE
> AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN
> ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
> WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
>
> For more information, please refer to <http://unlicense.org/>
When compiling Ginkgo with `-DGINKGO_BUILD_BENCHMARKS=ON` the build system will
download, build, and link [gflags](https://github.com/gflags/gflags) and
[nlohmann-json](https://github.com/nlohmann/json) with the
Expand Down Expand Up @@ -193,44 +167,38 @@ under the following license:

For detecting the HWLOC library, we used a modified version of the FindHWLOC.cmake file from the MORSE-cmake library. The library is [available on gitlab](https://gitlab.inria.fr/solverstack/morse_cmake), and its LICENSE is available below:

> ###
> #
> # @copyright (c) 2012-2020 Inria. All rights reserved.
> # @copyright (c) 2012-2020 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
> #
> ###
> #
> # This software is a computer program whose purpose is to process
> # Matrices Over Runtime Systems @ Exascale (MORSE). More information
> # can be found on the following website: http://www.inria.fr/en/teams/morse.
> #
> # This software is governed by the CeCILL-C license under French law and
> # abiding by the rules of distribution of free software. You can use,
> # modify and/ or redistribute the software under the terms of the CeCILL-C
> # license as circulated by CEA, CNRS and INRIA at the following URL
> # "http://www.cecill.info".
> #
> # As a counterpart to the access to the source code and rights to copy,
> # modify and redistribute granted by the license, users are provided only
> # with a limited warranty and the software's author, the holder of the
> # economic rights, and the successive licensors have only limited
> # liability.
> #
> # In this respect, the user's attention is drawn to the risks associated
> # with loading, using, modifying and/or developing or reproducing the
> # software by the user in light of its specific status of free software,
> # that may mean that it is complicated to manipulate, and that also
> # therefore means that it is reserved for developers and experienced
> # professionals having in-depth computer knowledge. Users are therefore
> # encouraged to load and test the software's suitability as regards their
> # requirements in conditions enabling the security of their systems and/or
> # data to be ensured and, more generally, to use and operate it in the
> # same conditions as regards security.
> #
> # The fact that you are presently reading this means that you have had
> # knowledge of the CeCILL-C license and that you accept its terms.
> #
> ###
> @copyright (c) 2012-2020 Inria. All rights reserved.
> @copyright (c) 2012-2020 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
>
> This software is a computer program whose purpose is to process
> Matrices Over Runtime Systems @ Exascale (MORSE). More information
> can be found on the following website: http://www.inria.fr/en/teams/morse.
>
> This software is governed by the CeCILL-C license under French law and
> abiding by the rules of distribution of free software. You can use,
> modify and/ or redistribute the software under the terms of the CeCILL-C
> license as circulated by CEA, CNRS and INRIA at the following URL
> "http://www.cecill.info".
>
> As a counterpart to the access to the source code and rights to copy,
> modify and redistribute granted by the license, users are provided only
> with a limited warranty and the software's author, the holder of the
> economic rights, and the successive licensors have only limited
> liability.
>
> In this respect, the user's attention is drawn to the risks associated
> with loading, using, modifying and/or developing or reproducing the
> software by the user in light of its specific status of free software,
> that may mean that it is complicated to manipulate, and that also
> therefore means that it is reserved for developers and experienced
> professionals having in-depth computer knowledge. Users are therefore
> encouraged to load and test the software's suitability as regards their
> requirements in conditions enabling the security of their systems and/or
> data to be ensured and, more generally, to use and operate it in the
> same conditions as regards security.
>
> The fact that you are presently reading this means that you have had
> knowledge of the CeCILL-C license and that you accept its terms.


Expand All @@ -243,30 +211,30 @@ INSTALL.md](INSTALL.md#Building) for more details.
When using testing with MPI switched on, the gtest-mpi-listener header only library is used for testing MPI functionality. The repository is licensed triple licensed under BSD-3, MIT and Apache 2.0. The License duplicated below. More details on the License and the library are [available on github](https://github.com/LLNL/gtest-mpi-listener)


> # Copyright 2005, Google Inc. All rights reserved.
> #
> # Redistribution and use in source and binary forms, with or without
> # modification, are permitted provided that the following conditions are
> # met:
> #
> # * Redistributions of source code must retain the above copyright
> # notice, this list of conditions and the following disclaimer.
> # * Redistributions in binary form must reproduce the above
> # copyright notice, this list of conditions and the following disclaimer
> # in the documentation and/or other materials provided with the
> # distribution.
> # * Neither the name of Google Inc. nor the names of its
> # contributors may be used to endorse or promote products derived from
> # this software without specific prior written permission.
> #
> # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
> # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
> # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
> # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
> # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
> # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
> # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
> # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
> # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
> # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
> # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> Copyright 2005, Google Inc. All rights reserved.
>
> Redistribution and use in source and binary forms, with or without
> modification, are permitted provided that the following conditions are
> met:
>
> * Redistributions of source code must retain the above copyright
> notice, this list of conditions and the following disclaimer.
> * Redistributions in binary form must reproduce the above
> copyright notice, this list of conditions and the following disclaimer
> in the documentation and/or other materials provided with the
> distribution.
> * Neither the name of Google Inc. nor the names of its
> contributors may be used to endorse or promote products derived from
> this software without specific prior written permission.
>
> THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
> "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
> LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
> A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
> OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
> SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
> LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
> DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
> THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
> (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
> OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5 changes: 1 addition & 4 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Replace `[OPTIONS]` with desired cmake options for your build.
Ginkgo adds the following additional switches to control what is being built:

* `-DGINKGO_DEVEL_TOOLS={ON, OFF}` sets up the build system for development
(requires clang-format, will also download git-cmake-format),
(requires pre-commit, will also download the clang-format pre-commit hook),
default is `OFF`. The default behavior installs a pre-commit hook, which
disables git commits. If it is set to `ON`, a new pre-commit hook for
formatting will be installed (enabling commits again). In both cases the
Expand Down Expand Up @@ -207,9 +207,6 @@ packages can be turned off by disabling the relevant options.
+ GINKGO_BUILD_BENCHMARKS=ON: For argument management we use
[gflags](https://github.com/gflags/gflags) and for JSON parsing we use
[nlohmann-json](https://github.com/nlohmann/json);
+ GINKGO_DEVEL_TOOLS=ON:
[git-cmake-format](https://github.com/gflegar/git-cmake-format) is our CMake
helper for code formatting.
+ GINKGO_BUILD_HWLOC=ON:
[hwloc](https://www.open-mpi.org/projects/hwloc) to detect and control cores
and devices.
Expand Down

0 comments on commit e2418ca

Please sign in to comment.