From patchwork series 357131 #5841
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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-37] | |
subarch: [ppc64] | |
include: | |
- subarch: ppc64le | |
defconfig: ppc64le | |
image: fedora-37 | |
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 | |
- name: Register problem matchers | |
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 | |
continue-on-error: true | |
uses: dawidd6/action-download-artifact@v2 | |
with: | |
workflow: powerpc-sparse.yml | |
workflow_conclusion: success | |
branch: merge # this is race condition-y. start simple for now but needs fix | |
name: sparse-${{ matrix.defconfig }}-${{ matrix.image }}.log | |
path: ~/base_logs | |
- name: Register sparse problem matcher | |
run: echo "::add-matcher::.github/problem-matchers/sparse.json" | |
- name: Compare sparse results with base | |
run: | | |
wget https://github.com/daxtens/smart-sparse-diff/raw/master/smart-sparse-diff.py | |
bash -c 'if [ ! -f ~/base_logs/sparse.log ]; then mkdir -p ~/base_logs && cp ~/output/sparse.log ~/base_logs/; fi' | |
python3 smart-sparse-diff.py ~/base_logs/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 |