diff --git a/.github/.licenserc.yaml b/.github/.licenserc.yaml index 1b5f8976c..9bfb216ea 100644 --- a/.github/.licenserc.yaml +++ b/.github/.licenserc.yaml @@ -32,25 +32,25 @@ header: limitations under the License\. paths: - - '**' + - '**' paths-ignore: # `paths-ignore` are the path list that will be ignored by license-eye. - - '.clang-format' - - '.clang-tidy' - - '.gitignore' - - '.github/scripts/setup_apt_repo_linux.sh' - - 'HISTORY.md' - - 'NEWS.md' - - 'LICENSE' - - 'THIRD-PARTY-PROGRAMS' - - '.github/renovate.json' - - '.github/CODEOWNERS' - - 'cmake/mkl_functions' - - 'cmake/mkl_functions_ivf' - - 'cmake/patches/tomlplusplus_v330.patch' - - 'docker/x86_64/manylinux2014/oneAPI.repo' - - 'docs/cpp/index/loader-compatibility.csv' - - 'docs/requirements.txt' + - .clang-format + - .clang-tidy + - .gitignore + - .github/scripts/setup_apt_repo_linux.sh + - HISTORY.md + - NEWS.md + - LICENSE + - THIRD-PARTY-PROGRAMS + - .github/renovate.json + - .github/CODEOWNERS + - cmake/mkl_functions + - cmake/mkl_functions_ivf + - cmake/patches/tomlplusplus_v330.patch + - docker/x86_64/manylinux2014/oneAPI.repo + - docs/cpp/index/loader-compatibility.csv + - docs/requirements.txt comment: never diff --git a/.github/workflows/build-linux-arm.yml b/.github/workflows/build-linux-arm.yml index 889f7d5d1..146a4d9bc 100644 --- a/.github/workflows/build-linux-arm.yml +++ b/.github/workflows/build-linux-arm.yml @@ -17,7 +17,7 @@ name: Linux Build and Test on ARM on: push: branches: - - main + - main pull_request: permissions: @@ -25,7 +25,7 @@ permissions: # This allows a subsequently queued workflow run to interrupt previous runs concurrency: - group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}' + group: ${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }} cancel-in-progress: true jobs: @@ -37,12 +37,12 @@ jobs: build_type: [RelWithDebugInfo] cxx: [g++-11, g++-12, clang++-15] include: - - cxx: g++-11 - cc: gcc-11 - - cxx: g++-12 - cc: gcc-12 - - cxx: clang++-15 - cc: clang-15 + - cxx: g++-11 + cc: gcc-11 + - cxx: g++-12 + cc: gcc-12 + - cxx: clang++-15 + cc: clang-15 steps: - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 @@ -67,6 +67,6 @@ jobs: - name: Run tests env: - CTEST_OUTPUT_ON_FAILURE: 1 + CTEST_OUTPUT_ON_FAILURE: 1 working-directory: ${{ runner.temp }}/build/tests run: ctest -C ${{ matrix.build_type }} diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml index d520b020e..8ca642acc 100644 --- a/.github/workflows/build-linux.yml +++ b/.github/workflows/build-linux.yml @@ -17,7 +17,7 @@ name: Linux Build and Test on: push: branches: - - main + - main pull_request: permissions: @@ -25,7 +25,7 @@ permissions: # This allows a subsequently queued workflow run to interrupt previous runs concurrency: - group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}' + group: ${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }} cancel-in-progress: true jobs: @@ -38,45 +38,45 @@ jobs: ivf: [OFF, ON] cxx: [g++-11, g++-12, clang++-15] asan: [OFF] - cmake_extra_args: ["-DSVS_BUILD_BINARIES=YES -DSVS_BUILD_EXAMPLES=YES"] - ctest_args: [""] + cmake_extra_args: [-DSVS_BUILD_BINARIES=YES -DSVS_BUILD_EXAMPLES=YES] + ctest_args: [''] include: - - cxx: g++-11 - cc: gcc-11 - - cxx: g++-12 - cc: gcc-12 - - cxx: clang++-15 - cc: clang-15 - - cxx: clang++-18 - cc: clang-18 - build_type: Debug - ivf: OFF - asan: ON + - cxx: g++-11 + cc: gcc-11 + - cxx: g++-12 + cc: gcc-12 + - cxx: clang++-15 + cc: clang-15 + - cxx: clang++-18 + cc: clang-18 + build_type: Debug + ivf: OFF + asan: ON # address sanitizer flags - cmake_extra_args: >- - -DCMAKE_CXX_FLAGS='-fsanitize=address -fno-omit-frame-pointer -g' - -DCMAKE_C_FLAGS='-fsanitize=address -fno-omit-frame-pointer -g' - -DCMAKE_EXE_LINKER_FLAGS='-fsanitize=address' - -DCMAKE_SHARED_LINKER_FLAGS='-fsanitize=address' - -DSVS_BUILD_BINARIES=NO - -DSVS_BUILD_EXAMPLES=NO - # skip longer-running tests - ctest_args: "-LE long" + cmake_extra_args: >- + -DCMAKE_CXX_FLAGS='-fsanitize=address -fno-omit-frame-pointer -g' + -DCMAKE_C_FLAGS='-fsanitize=address -fno-omit-frame-pointer -g' + -DCMAKE_EXE_LINKER_FLAGS='-fsanitize=address' + -DCMAKE_SHARED_LINKER_FLAGS='-fsanitize=address' + -DSVS_BUILD_BINARIES=NO + -DSVS_BUILD_EXAMPLES=NO + # skip longer-running tests + ctest_args: -LE long exclude: - - cxx: g++-12 - ivf: ON + - cxx: g++-12 + ivf: ON steps: - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - name: Install MKL timeout-minutes: 5 run: | - .github/scripts/setup_apt_repo_linux.sh - sudo apt install intel-oneapi-mkl intel-oneapi-mkl-devel - # Setup environment variables for building against MKL. - # Persist the environment variables for use across multiple subsequent actions. - source /opt/intel/oneapi/setvars.sh - printenv >> $GITHUB_ENV + .github/scripts/setup_apt_repo_linux.sh + sudo apt install intel-oneapi-mkl intel-oneapi-mkl-devel + # Setup environment variables for building against MKL. + # Persist the environment variables for use across multiple subsequent actions. + source /opt/intel/oneapi/setvars.sh + printenv >> $GITHUB_ENV - name: Install Clang 18 if: matrix.cxx == 'clang++-18' diff --git a/.github/workflows/build-macos.yaml b/.github/workflows/build-macos.yaml index 6b09a3dc9..6b2e3641f 100644 --- a/.github/workflows/build-macos.yaml +++ b/.github/workflows/build-macos.yaml @@ -17,7 +17,7 @@ name: MacOS Build and Test on: push: branches: - - main + - main pull_request: permissions: @@ -25,7 +25,7 @@ permissions: # This allows a subsequently queued workflow run to interrupt previous runs concurrency: - group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}' + group: ${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }} cancel-in-progress: true jobs: @@ -37,11 +37,11 @@ jobs: build_type: [RelWithDebugInfo] cxx: [clang++-15] include: - - cxx: clang++-15 - package: llvm@15 - cc_name: clang - cxx_name: clang++ - needs_prefix: true + - cxx: clang++-15 + package: llvm@15 + cc_name: clang + cxx_name: clang++ + needs_prefix: true steps: - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 @@ -80,6 +80,6 @@ jobs: - name: Run tests env: - CTEST_OUTPUT_ON_FAILURE: 1 + CTEST_OUTPUT_ON_FAILURE: 1 working-directory: ${{ runner.temp }}/build/tests run: ctest -C ${{ matrix.build_type }} diff --git a/.github/workflows/cibuildwheel.yml b/.github/workflows/cibuildwheel.yml index d5415564a..b3833d5ca 100644 --- a/.github/workflows/cibuildwheel.yml +++ b/.github/workflows/cibuildwheel.yml @@ -17,14 +17,14 @@ name: CIBuildWheel on: push: branches: - - main + - main pull_request: permissions: contents: read concurrency: - group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}' + group: ${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }} cancel-in-progress: true jobs: @@ -55,14 +55,14 @@ jobs: # Make sure to add the location of the generated wheel to the python path. - name: Run Default Tests env: - PYTHONPATH: ${{ runner.temp }}/usr - CTEST_OUTPUT_ON_FAILURE: 1 + PYTHONPATH: ${{ runner.temp }}/usr + CTEST_OUTPUT_ON_FAILURE: 1 working-directory: ${{ runner.temp }} run: python -m unittest discover -s ${GITHUB_WORKSPACE}/bindings/python - name: Run examples env: - PYTHONPATH: ${{ runner.temp }}/usr - CTEST_OUTPUT_ON_FAILURE: 1 + PYTHONPATH: ${{ runner.temp }}/usr + CTEST_OUTPUT_ON_FAILURE: 1 working-directory: ${{ runner.temp }} run: python -m unittest discover -p "example*.py" -s ${GITHUB_WORKSPACE}/examples/python diff --git a/.github/workflows/skywalking-eyes.yml b/.github/workflows/skywalking-eyes.yml index dc767e565..d91409d6f 100644 --- a/.github/workflows/skywalking-eyes.yml +++ b/.github/workflows/skywalking-eyes.yml @@ -17,10 +17,10 @@ name: Check License Header on: pull_request: branches: - - main + - main push: branches: - - main + - main permissions: read-all @@ -33,10 +33,10 @@ jobs: name: Copyright Check runs-on: ubuntu-24.04 steps: - - name: "Checkout code" - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - - name: "Run check" - uses: apache/skywalking-eyes/header@61275cc80d0798a405cb070f7d3a8aaf7cf2c2c1 # v0.8.0 - with: - config: ".github/.licenserc.yaml" - mode: "check" + - name: Checkout code + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + - name: Run check + uses: apache/skywalking-eyes/header@61275cc80d0798a405cb070f7d3a8aaf7cf2c2c1 # v0.8.0 + with: + config: .github/.licenserc.yaml + mode: check diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3a9770ead..7771f5cd5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -21,3 +21,9 @@ repos: entry: tools/clang-format.sh args: [clang-format] additional_dependencies: ["clang-format>=15,<16"] + + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v6.0.0 + hooks: + - id: check-yaml + files: \.ya?ml$