Skip to content

Commit 59665c3

Browse files
authored
Merge pull request #6538 from BOINC/vko_improve_source_code_check_ci
[ci] improve source-code-check.yml.
2 parents 954598f + 41224c7 commit 59665c3

File tree

1 file changed

+26
-6
lines changed

1 file changed

+26
-6
lines changed

.github/workflows/source-code-check.yml

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This file is part of BOINC.
2-
# http://boinc.berkeley.edu
3-
# Copyright (C) 2023 University of California
2+
# https://boinc.berkeley.edu
3+
# Copyright (C) 2025 University of California
44
#
55
# BOINC is free software; you can redistribute it and/or modify it
66
# under the terms of the GNU Lesser General Public License
@@ -30,12 +30,10 @@ concurrency:
3030
cancel-in-progress: true
3131

3232
jobs:
33-
build:
34-
name: ${{ matrix.type }}
33+
source-code-check-illegal-symbols:
34+
name: source-code-check-illegal-symbols
3535
runs-on: ubuntu-latest
3636
strategy:
37-
matrix:
38-
type: [source-code-check]
3937
fail-fast: false
4038
steps:
4139
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
@@ -45,7 +43,29 @@ jobs:
4543
if: ${{ success() }}
4644
run: |
4745
python ./ci_tools/source_code_check.py .
46+
47+
source-code-check-trailing-whitespaces:
48+
name: source-code-check-trailing-whitespaces
49+
runs-on: ubuntu-latest
50+
strategy:
51+
fail-fast: false
52+
steps:
53+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
54+
with:
55+
fetch-depth: 2
4856
- name: Check source code for trailing whitespaces
4957
if: ${{ success() }}
5058
run: |
5159
python ./ci_tools/trailing_whitespaces_check.py .
60+
- name: Prepare patch file
61+
if: failure()
62+
run: |
63+
python ./ci_tools/trailing_whitespaces_check.py . --fix
64+
git diff > trailing_whitespaces.patch
65+
- name: Upload patch
66+
if: failure()
67+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
68+
with:
69+
name: trailing_whitespaces.patch
70+
path: trailing_whitespaces.patch
71+

0 commit comments

Comments
 (0)