forked from linuxppc/linux-ci
-
Notifications
You must be signed in to change notification settings - Fork 2
103 lines (89 loc) · 3.17 KB
/
powerpc-sparse.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
name: powerpc/sparse
# Controls when the action will run.
on:
# This allows the build to be triggered manually via the github UI.
workflow_dispatch:
push:
# This triggers the build on a push to any branch named ci/powerpc/<something>
branches:
- '**'
# As long as one of these paths matches
paths:
- '!tools/**' # ignore tools
- '!samples/**' # ignore samples
- '!Documentation/**' # ignore Documentation
- '!arch/**' # ignore arch changes
- 'arch/powerpc/**' # but not arch/powerpc
- 'arch/Kconfig' # or common bits in arch
- '**' # anything else triggers a build
jobs:
sparse:
runs-on: ubuntu-latest
strategy:
matrix:
defconfig: [ppc64, pmac32, mpc885_ads_defconfig]
image: [fedora-38]
subarch: [ppc64]
include:
- subarch: ppc64le
defconfig: ppc64le
image: fedora-38
env:
ARCH: powerpc
TARGET: kernel
CCACHE: 1
SPARSE: 2
SUBARCH: ${{ matrix.subarch }}
IMAGE: ${{ matrix.image }}
DEFCONFIG: ${{ matrix.defconfig }}
steps:
- name: Checkout
uses: actions/checkout@v3
# NB this is before the build on merge, so all errors are detected
# On other branches we ignore these and only report sparse diff results below
- name: Register problem matchers
if: github.ref_name == 'merge'
run: |
echo "::add-matcher::.github/problem-matchers/compiler-source.json"
echo "::add-matcher::.github/problem-matchers/compiler-non-source.json"
- name: Load ccache
uses: actions/cache@v3
with:
path: ~/.ccache
key: ${{ matrix.image }}-${{ matrix.subarch }}-${{ matrix.defconfig }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build
run: |
mkdir -p ~/.ccache
./arch/powerpc/tools/ci-build.sh
- name: Get sparse results from base tree
if: github.ref_name != 'merge'
continue-on-error: true
uses: dawidd6/action-download-artifact@v2
with:
workflow: powerpc-sparse.yml
workflow_conclusion: success
branch: merge # Requires the merge branch to be built once before this will work
name: sparse-${{ matrix.defconfig }}-${{ matrix.image }}.log
# NB this is after the build on non-merge, so only errors from the sparse diff are detected
- name: Register problem matcher
if: github.ref_name != 'merge'
run: |
echo "::add-matcher::.github/problem-matchers/sparse.json"
- name: Compare sparse results with base
if: github.ref_name != 'merge'
run: |
bash -c 'if [ ! -f sparse.log ]; then cp ~/output/sparse.log .; fi'
./arch/powerpc/tools/smart-sparse-diff.py sparse.log ~/output/sparse.log | tee -a ~/output/sparse-diff.log
- name: Archive artifacts
uses: actions/upload-artifact@v3
with:
name: sparse-${{ matrix.defconfig }}-${{ matrix.image }}.log
path: |
~/output/sparse.log
~/output/sparse-diff.log