diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..48afb80 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,15 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: github-actions + directory: "/" + schedule: + interval: "monthly" + groups: + actions: + patterns: + - "*" diff --git a/.github/workflows/clang-tools-release.yml b/.github/workflows/clang-tools-release.yml index 1893b87..04b94b1 100644 --- a/.github/workflows/clang-tools-release.yml +++ b/.github/workflows/clang-tools-release.yml @@ -1,6 +1,7 @@ name: Build clang-tools wheels on: + workflow_dispatch: inputs: llvm_version: @@ -262,7 +263,7 @@ jobs: run: | echo "${{ github.event.inputs.llvm_version }}.${{ github.event.inputs.wheel_version }}" > clang-format_version.txt cat clang-format_version.txt - + - name: Build SDist run: pipx run build --sdist @@ -416,7 +417,7 @@ jobs: create-draft-release: name: Create draft release on GitHub needs: [ - build-clang-format-wheels, + build-clang-format-wheels, build-clang-tidy-wheels, build-clang-format-sdist, build-clang-tidy-sdist, @@ -449,7 +450,7 @@ jobs: # Copy clang-tidy artifacts find clang-tidy-dist -name "*.whl" -exec cp {} release-assets/ \; find clang-tidy-dist -name "*.tar.gz" -exec cp {} release-assets/ \; - + echo "Release assets:" ls -la release-assets/ @@ -462,22 +463,22 @@ jobs: name: "v${{ github.event.inputs.llvm_version }}" body: | # Clang Tools Python wheels - + This release contains both `clang-format` and `clang-tidy` wheel packages. - + ## Included packages: - **clang-format**: Code formatting tool - **clang-tidy**: Static analysis and linting tool - + ## Installation: ```bash # Install clang-format pip install clang-format-${{ github.event.inputs.llvm_version }}-.whl - - # Install clang-tidy + + # Install clang-tidy pip install clang-tidy-${{ github.event.inputs.llvm_version }}-.whl ``` - + ## Assets: - `.whl` files: Binary wheel packages for different platforms - `.tar.gz` files: Source distributions diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 0000000..7755837 --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,10 @@ +name: PR Autolabeler + +on: + # pull_request event is required for autolabeler + pull_request: + types: [opened, reopened, synchronize] + +jobs: + draft-release: + uses: cpp-linter/.github/.github/workflows/release-drafter.yml@main diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 0000000..d726f39 --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,13 @@ +name: 'Close stale issues' +on: + schedule: + - cron: '30 1 * * *' +permissions: {} + +jobs: + stale: + permissions: + contents: read + issues: write + pull-requests: write + uses: cpp-linter/.github/.github/workflows/stale.yml@main diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..8841fdc --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,9 @@ +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v6.0.0 + hooks: + - id: trailing-whitespace + - id: check-yaml + - id: end-of-file-fixer + - id: check-added-large-files + - id: check-merge-conflict