Skip to content

Commit

Permalink
Update the workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
jellespijker committed Aug 9, 2023
1 parent 3eef463 commit d3bfc43
Show file tree
Hide file tree
Showing 7 changed files with 72 additions and 71 deletions.
28 changes: 17 additions & 11 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,30 @@
name: Benchmark
on:
schedule:
- cron: '15 6,12,17 * * *'

# FIXME: remove the path trigger after merge
push:
paths:
- 'include/**'
- 'src/**'
- 'cmake/**'
- 'benchmark/**'
- 'conanfile.py'
- 'conandata.yml'
- 'CMakeLists.txt'
- '.github/workflows/benchmark.yml'
- '.github/workflows/requirements-conan-package.txt'
branches:
- main
- CURA-9906_benchmark
tags:
- '[0-9].[0-9].[0-9]*'
pull_request:
types: [ opened, reopened, synchronize ]
paths:
- 'include/**'
- 'src/**'
- 'benchmark/**'
- '.github/workflows/benchmark.yml'
- '.github/workflows/requirements-conan-package.txt'
branches:
- main
- 'CURA-*'
- '[0-9]+.[0-9]+'
tags:
- '[0-9]+.[0-9]+.[0-9]+'

env:
CONAN_LOGIN_USERNAME_CURA: ${{ secrets.CONAN_USER }}
Expand Down Expand Up @@ -130,6 +135,7 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: true
# Show alert with commit comment on detecting possible performance regression
alert-threshold: '200%'
alert-threshold: '175%'
summary-always: true
comment-on-alert: true
fail-on-alert: true
max-items-in-chart: 250
3 changes: 1 addition & 2 deletions .github/workflows/gcodeanalyzer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,5 @@ jobs:
# Show alert with commit comment on detecting possible performance regression
alert-threshold: '110%'
summary-always: true
comment-always: true
comment-on-alert: true
fail-on-alert: true
max-items-in-chart: 250
80 changes: 40 additions & 40 deletions .github/workflows/lint-formatter.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,46 @@
name: lint-formatter

on:
workflow_dispatch:
workflow_dispatch:

push:
paths:
- 'include/**/*.h*'
- 'src/**/*.c*'
push:
paths:
- 'include/**/*.h*'
- 'src/**/*.c*'

jobs:
lint-formatter-job:
name: Auto-apply clang-format

runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- uses: technote-space/get-diff-action@v6
with:
PATTERNS: |
include/**/*.h*
src/**/*.c*
- name: Setup Python and pip
if: env.GIT_DIFF && !env.MATCHED_FILES # If nothing happens with python and/or pip after, the clean-up crashes.
uses: actions/setup-python@v4
with:
python-version: 3.11.x
cache: 'pip'
cache-dependency-path: .github/workflows/requirements-linter.txt

- name: Install Python requirements for runner
if: env.GIT_DIFF && !env.MATCHED_FILES
run: pip install -r .github/workflows/requirements-linter.txt

- name: Format file
if: env.GIT_DIFF && !env.MATCHED_FILES
run: |
clang-format -i ${{ env.GIT_DIFF_FILTERED }}
- uses: stefanzweifel/git-auto-commit-action@v4
if: env.GIT_DIFF && !env.MATCHED_FILES
with:
commit_message: "Applied clang-format."
lint-formatter-job:
name: Auto-apply clang-format

runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- uses: technote-space/get-diff-action@v6
with:
PATTERNS: |
include/**/*.h*
src/**/*.c*
- name: Setup Python and pip
if: env.GIT_DIFF && !env.MATCHED_FILES # If nothing happens with python and/or pip after, the clean-up crashes.
uses: actions/setup-python@v4
with:
python-version: 3.11.x
cache: 'pip'
cache-dependency-path: .github/workflows/requirements-linter.txt

- name: Install Python requirements for runner
if: env.GIT_DIFF && !env.MATCHED_FILES
run: pip install -r .github/workflows/requirements-linter.txt

- name: Format file
if: env.GIT_DIFF && !env.MATCHED_FILES
run: |
clang-format -i ${{ env.GIT_DIFF_FILTERED }}
- uses: stefanzweifel/git-auto-commit-action@v4
if: env.GIT_DIFF && !env.MATCHED_FILES
with:
commit_message: "Applied clang-format."
4 changes: 2 additions & 2 deletions .github/workflows/lint-poster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: lint-poster

on:
workflow_run:
workflows: ["lint-tidier"]
types: [completed]
workflows: [ "lint-tidier" ]
types: [ completed ]

jobs:
lint-poster-job:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/lint-tidier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,9 @@ jobs:
path: linter-result/

- name: Run clang-tidy-pr-comments action
uses: platisd/clang-tidy-pr-comments@bc0bb7da034a8317d54e7fe1e819159002f4cc40
uses: platisd/clang-tidy-pr-comments@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
clang_tidy_fixes: linter-result/fixes.yml
request_changes: true
suggestions_per_comment: 30
20 changes: 10 additions & 10 deletions .github/workflows/process-pull-request.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
name: process-pull-request

on:
pull_request_target:
types: [opened, reopened, edited, synchronize, review_requested, ready_for_review, assigned]
pull_request_target:
types: [ opened, reopened, edited, synchronize, review_requested, ready_for_review, assigned ]

jobs:
add_label:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-ecosystem/action-add-labels@v1
if: ${{ github.event.pull_request.head.repo.full_name != github.repository }}
with:
labels: 'PR: Community Contribution :crown:'
add_label:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-ecosystem/action-add-labels@v1
if: ${{ github.event.pull_request.head.repo.full_name != github.repository }}
with:
labels: 'PR: Community Contribution :crown:'
5 changes: 0 additions & 5 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
---
name: unit-test
# FIXME: This should be a reusable workflow

on:
push:
paths:
Expand All @@ -11,13 +9,11 @@ on:
- 'tests/**'
- 'test_package/**'
- 'conanfile.py'
- 'conandata.yml'
- 'CMakeLists.txt'
- '.github/workflows/unit-test.yml'
- '.github/workflows/requirements-conan-package.txt'
branches:
- main
- 'CURA-*'
- '[0-9]+.[0-9]+'
tags:
- '[0-9]+.[0-9]+.[0-9]+'
Expand All @@ -30,7 +26,6 @@ on:
- 'tests/**'
- 'test_package/**'
- 'conanfile.py'
- 'conandata.yml'
- 'CMakeLists.txt'
- '.github/workflows/unit-test.yml'
- '.github/workflows/requirements-conan-package.txt'
Expand Down

1 comment on commit d3bfc43

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'C++ Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.75.

Benchmark suite Current: d3bfc43 Previous: 3c2971d Ratio
InfillTest/Infill_generate_connect/0/400 7.965376673575326 ms/iter 4.32114434261831 ms/iter 1.84

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.