From dcba8882af83913ac4591acab31d2171930284f9 Mon Sep 17 00:00:00 2001 From: Ryan Murray Date: Tue, 1 Dec 2026 16:03:02 +1100 Subject: [PATCH] ci: retire the single-suite KUnit workflows, trim SEP and host-test runs Goes in after the apple-build-kunit change that folds these suites into its table (scripts/ci/apple-kunit.py); until then they would stop running. - apple-drm-kunit, apple-macaudio-kunit, mt7932-kunit and pmgr-pwrstate-kunit are gone: apple-build-kunit runs their suites. - sep-source: the SEP and AOP KUnit job moves to apple-build-kunit. The rust-build job goes: apple-build compiles drivers/soc/apple with APPLE_SEP=m in the Mac configuration and the sep suite builds the KUnit tests. The three DWC3/ATC profiles compile one after another in one job. The workflow starts only for the SEP sources its tests read (drivers/soc/apple *.rs, *shim*, sep*), the SEP headers, tools/aurora-sep and the DWC3/ATC paths, no longer for any Kconfig, Makefile or rust/. - host-tests skips PRs that change only documentation, tools/aurora-sep or other workflows. It still runs for any code, header or DT change. - host-tests, dt-checks and sep-source use one concurrency group per PR for whichever event's jobs run; the skipped twin cancels nothing. --- .github/workflows/apple-drm-kunit.yml | 65 --------- .github/workflows/apple-macaudio-kunit.yml | 55 ------- .github/workflows/dt-checks.yml | 3 +- .github/workflows/host-tests.yml | 24 +++- .github/workflows/mt7932-kunit.yml | 73 ---------- .github/workflows/pmgr-pwrstate-kunit.yml | 65 --------- .github/workflows/sep-source.yml | 159 ++++----------------- 7 files changed, 50 insertions(+), 394 deletions(-) delete mode 100644 .github/workflows/apple-drm-kunit.yml delete mode 100644 .github/workflows/apple-macaudio-kunit.yml delete mode 100644 .github/workflows/mt7932-kunit.yml delete mode 100644 .github/workflows/pmgr-pwrstate-kunit.yml diff --git a/.github/workflows/apple-drm-kunit.yml b/.github/workflows/apple-drm-kunit.yml deleted file mode 100644 index 788778aee08b9..0000000000000 --- a/.github/workflows/apple-drm-kunit.yml +++ /dev/null @@ -1,65 +0,0 @@ -name: Apple DRM KUnit - -# The Apple display driver's KUnit suites behind -# CONFIG_DRM_APPLE_DISPLAY_KUNIT_TEST (mode probing, external audio, boot -# loader handoff, ...) on arm64 QEMU. They use fake coprocessors and nodes, -# so they run without a display controller. - -on: - pull_request: - branches: [main] - paths: - - 'drivers/gpu/drm/apple/**' - - '.github/workflows/apple-drm-kunit.yml' - pull_request_target: - branches: [main] - paths: - - 'drivers/gpu/drm/apple/**' - - '.github/workflows/apple-drm-kunit.yml' - workflow_dispatch: - -permissions: - contents: read - -concurrency: - group: apple-drm-kunit-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - kunit: - if: ${{ (github.event_name == 'pull_request_target' && vars.AURORA_SELF_HOSTED == 'on' && github.event.pull_request.head.repo.full_name == github.repository && !endsWith(github.actor, '[bot]')) || (github.event_name == 'pull_request' && !(vars.AURORA_SELF_HOSTED == 'on' && github.event.pull_request.head.repo.full_name == github.repository && !endsWith(github.actor, '[bot]'))) || (github.event_name != 'pull_request' && github.event_name != 'pull_request_target') }} - runs-on: ${{ (vars.AURORA_SELF_HOSTED == 'on' && github.event_name == 'pull_request_target') && fromJSON('["self-hosted","aurora-buildbox","x64"]') || ((vars.AURORA_SELF_HOSTED == 'on' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch) && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule')) && fromJSON('["self-hosted","aurora-buildbox-main","x64"]') || 'ubuntu-24.04') }} - timeout-minutes: 60 - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ github.event_name == 'pull_request_target' && format('refs/pull/{0}/merge', github.event.pull_request.number) || '' }} - persist-credentials: false - fetch-depth: 1 - - name: Verify the PR merge ref matches this event - if: github.event_name == 'pull_request_target' - env: - WANT: ${{ github.event.pull_request.head.sha }} - run: | - got=$(git cat-file -p HEAD | sed -n 's/^parent //p' | sed -n 2p) - [ "$got" = "$WANT" ] || { echo "::error::refs/pull merge ref is for head $got, this event is for $WANT (the PR moved or this is a stale re-run; the newest run covers the current head)"; exit 1; } - - name: Install kernel build and QEMU dependencies - run: | - # As sep-source.yml: avoid the hosted runner's Azure mirror and - # third-party apt sources that can transiently 403 under Error-Mode=any. - if [ -f /etc/apt/apt-mirrors.txt ]; then - printf '%s\n' 'https://archive.ubuntu.com/ubuntu/' 'https://security.ubuntu.com/ubuntu/' | \ - sudo tee /etc/apt/apt-mirrors.txt >/dev/null - fi - if [ -d /etc/apt/sources.list.d ]; then - sudo find /etc/apt/sources.list.d -maxdepth 1 -type f ! -name 'ubuntu.sources' -delete - fi - sudo apt-get update -o APT::Update::Error-Mode=any -o Acquire::Retries=3 - sudo apt-get install -y -o Acquire::Retries=3 clang lld llvm libelf-dev libssl-dev \ - flex bison bc pkg-config make perl qemu-system-arm - - name: Run the Apple display KUnit suites on arm64 QEMU - run: | - ./tools/testing/kunit/kunit.py run --arch=arm64 \ - --make_options LLVM=1 \ - --kunitconfig=drivers/gpu/drm/apple/tests/display.kunitconfig \ - --jobs="$(nproc)" --timeout=900 diff --git a/.github/workflows/apple-macaudio-kunit.yml b/.github/workflows/apple-macaudio-kunit.yml deleted file mode 100644 index d651030598820..0000000000000 --- a/.github/workflows/apple-macaudio-kunit.yml +++ /dev/null @@ -1,55 +0,0 @@ -name: Apple speaker interlock KUnit - -on: - pull_request: - branches: [main] - paths: - - 'sound/soc/apple/**' - - 'sound/core/control.c' - - '.github/workflows/apple-macaudio-kunit.yml' - pull_request_target: - branches: [main] - paths: - - 'sound/soc/apple/**' - - 'sound/core/control.c' - - '.github/workflows/apple-macaudio-kunit.yml' - push: - branches: [main] - paths: - - 'sound/soc/apple/**' - - 'sound/core/control.c' - - '.github/workflows/apple-macaudio-kunit.yml' - -permissions: - contents: read - -concurrency: - group: apple-macaudio-kunit-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - kunit: - if: ${{ (github.event_name == 'pull_request_target' && vars.AURORA_SELF_HOSTED == 'on' && github.event.pull_request.head.repo.full_name == github.repository && !endsWith(github.actor, '[bot]')) || (github.event_name == 'pull_request' && !(vars.AURORA_SELF_HOSTED == 'on' && github.event.pull_request.head.repo.full_name == github.repository && !endsWith(github.actor, '[bot]'))) || (github.event_name != 'pull_request' && github.event_name != 'pull_request_target') }} - runs-on: ${{ (vars.AURORA_SELF_HOSTED == 'on' && github.event_name == 'pull_request_target') && fromJSON('["self-hosted","aurora-buildbox","x64"]') || ((vars.AURORA_SELF_HOSTED == 'on' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch) && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule')) && fromJSON('["self-hosted","aurora-buildbox-main","x64"]') || 'ubuntu-24.04') }} - timeout-minutes: 45 - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ github.event_name == 'pull_request_target' && format('refs/pull/{0}/merge', github.event.pull_request.number) || '' }} - persist-credentials: false - - name: Verify the PR merge ref matches this event - if: github.event_name == 'pull_request_target' - env: - WANT: ${{ github.event.pull_request.head.sha }} - run: | - got=$(git cat-file -p HEAD | sed -n 's/^parent //p' | sed -n 2p) - [ "$got" = "$WANT" ] || { echo "::error::refs/pull merge ref is for head $got, this event is for $WANT (the PR moved or this is a stale re-run; the newest run covers the current head)"; exit 1; } - - name: Install kernel build and QEMU dependencies - run: | - sudo apt-get update -o APT::Update::Error-Mode=any - sudo apt-get install -y clang lld llvm libelf-dev libssl-dev flex bison bc qemu-system-arm - - name: Run the macaudio suites on arm64 QEMU - run: | - tools/testing/kunit/kunit.py run --arch=arm64 --make_options LLVM=1 \ - --kunitconfig=sound/soc/apple/macaudio.kunitconfig \ - --jobs="$(nproc)" --timeout=180 'apple-speaker-*' diff --git a/.github/workflows/dt-checks.yml b/.github/workflows/dt-checks.yml index 44bf57536c9a3..12fcb999cfe11 100644 --- a/.github/workflows/dt-checks.yml +++ b/.github/workflows/dt-checks.yml @@ -36,7 +36,8 @@ permissions: contents: read concurrency: - group: dt-checks-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }} + # One group per PR for the event whose jobs run; the skipped twin cancels nothing. + group: dt-checks-${{ ((github.event_name == 'pull_request_target' && vars.AURORA_SELF_HOSTED == 'on' && github.event.pull_request.head.repo.full_name == github.repository && !endsWith(github.actor, '[bot]')) || (github.event_name == 'pull_request' && !(vars.AURORA_SELF_HOSTED == 'on' && github.event.pull_request.head.repo.full_name == github.repository && !endsWith(github.actor, '[bot]'))) || (github.event_name != 'pull_request' && github.event_name != 'pull_request_target')) && (github.event.pull_request.number && format('pr-{0}', github.event.pull_request.number) || format('{0}-{1}', github.event_name, github.ref)) || github.run_id }} cancel-in-progress: true env: diff --git a/.github/workflows/host-tests.yml b/.github/workflows/host-tests.yml index 4ccb7179e4f40..71bff62d35ee1 100644 --- a/.github/workflows/host-tests.yml +++ b/.github/workflows/host-tests.yml @@ -6,20 +6,42 @@ name: Host tests # They extract production code from this tree and build it on the host, so a # driver change can break them while the kernel build stays green. +# Pull requests skip it only when they change nothing but documentation, the +# SEP tools (sep-source.yml) or other workflows: the tests read drivers, +# headers, device trees, rust/, lib/, kernel/ and sound/ of this tree. on: push: branches: [main] pull_request: branches: [main] + paths: + - '**' + - '!Documentation/**' + - '!LICENSES/**' + - '!**/*.md' + - '!**/*.rst' + - '!tools/aurora-sep/**' + - '!.github/**' + - '.github/workflows/host-tests.yml' pull_request_target: branches: [main] + paths: + - '**' + - '!Documentation/**' + - '!LICENSES/**' + - '!**/*.md' + - '!**/*.rst' + - '!tools/aurora-sep/**' + - '!.github/**' + - '.github/workflows/host-tests.yml' workflow_dispatch: permissions: contents: read concurrency: - group: host-tests-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }} + # One group per PR for the event whose jobs run; the skipped twin cancels nothing. + group: host-tests-${{ ((github.event_name == 'pull_request_target' && vars.AURORA_SELF_HOSTED == 'on' && github.event.pull_request.head.repo.full_name == github.repository && !endsWith(github.actor, '[bot]')) || (github.event_name == 'pull_request' && !(vars.AURORA_SELF_HOSTED == 'on' && github.event.pull_request.head.repo.full_name == github.repository && !endsWith(github.actor, '[bot]'))) || (github.event_name != 'pull_request' && github.event_name != 'pull_request_target')) && (github.event.pull_request.number && format('pr-{0}', github.event.pull_request.number) || format('{0}-{1}', github.event_name, github.ref)) || github.run_id }} cancel-in-progress: true env: diff --git a/.github/workflows/mt7932-kunit.yml b/.github/workflows/mt7932-kunit.yml deleted file mode 100644 index aa9900c5152c7..0000000000000 --- a/.github/workflows/mt7932-kunit.yml +++ /dev/null @@ -1,73 +0,0 @@ -name: MT7932 KUnit - -# The J700 Wi-Fi driver's KUnit suites (input validation, RF failure, connection -# lifecycle, WoWLAN) on arm64 QEMU. They use synthetic devices, so they run -# without the radio. - -on: - pull_request: - branches: [main] - paths: - - 'drivers/net/wireless/mediatek/mt7932/**' - - 'drivers/pci/controller/pcie-apple*' - - 'include/linux/soc/apple/pci-apple-piodma.h' - - 'include/linux/mt7932.h' - - 'net/wireless/**' - - 'include/net/cfg80211.h' - - '.github/workflows/mt7932-kunit.yml' - pull_request_target: - branches: [main] - paths: - - 'drivers/net/wireless/mediatek/mt7932/**' - - 'drivers/pci/controller/pcie-apple*' - - 'include/linux/soc/apple/pci-apple-piodma.h' - - 'include/linux/mt7932.h' - - 'net/wireless/**' - - 'include/net/cfg80211.h' - - '.github/workflows/mt7932-kunit.yml' - workflow_dispatch: - -permissions: - contents: read - -concurrency: - group: mt7932-kunit-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - kunit: - if: ${{ (github.event_name == 'pull_request_target' && vars.AURORA_SELF_HOSTED == 'on' && github.event.pull_request.head.repo.full_name == github.repository && !endsWith(github.actor, '[bot]')) || (github.event_name == 'pull_request' && !(vars.AURORA_SELF_HOSTED == 'on' && github.event.pull_request.head.repo.full_name == github.repository && !endsWith(github.actor, '[bot]'))) || (github.event_name != 'pull_request' && github.event_name != 'pull_request_target') }} - runs-on: ${{ (vars.AURORA_SELF_HOSTED == 'on' && github.event_name == 'pull_request_target') && fromJSON('["self-hosted","aurora-buildbox","x64"]') || ((vars.AURORA_SELF_HOSTED == 'on' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch) && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule')) && fromJSON('["self-hosted","aurora-buildbox-main","x64"]') || 'ubuntu-24.04') }} - timeout-minutes: 60 - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ github.event_name == 'pull_request_target' && format('refs/pull/{0}/merge', github.event.pull_request.number) || '' }} - persist-credentials: false - fetch-depth: 1 - - name: Verify the PR merge ref matches this event - if: github.event_name == 'pull_request_target' - env: - WANT: ${{ github.event.pull_request.head.sha }} - run: | - got=$(git cat-file -p HEAD | sed -n 's/^parent //p' | sed -n 2p) - [ "$got" = "$WANT" ] || { echo "::error::refs/pull merge ref is for head $got, this event is for $WANT (the PR moved or this is a stale re-run; the newest run covers the current head)"; exit 1; } - - name: Install kernel build and QEMU dependencies - run: | - # As sep-source.yml: avoid the hosted runner's Azure mirror. - if [ -f /etc/apt/apt-mirrors.txt ]; then - printf '%s\n' 'https://archive.ubuntu.com/ubuntu/' 'https://security.ubuntu.com/ubuntu/' | \ - sudo tee /etc/apt/apt-mirrors.txt >/dev/null - fi - if [ -d /etc/apt/sources.list.d ]; then - sudo find /etc/apt/sources.list.d -maxdepth 1 -type f ! -name 'ubuntu.sources' -delete - fi - sudo apt-get update -o APT::Update::Error-Mode=any -o Acquire::Retries=3 - sudo apt-get install -y -o Acquire::Retries=3 clang lld llvm libelf-dev libssl-dev \ - flex bison bc pkg-config make perl qemu-system-arm - - name: Run the MT7932 KUnit suites on arm64 QEMU - run: | - ./tools/testing/kunit/kunit.py run --arch=arm64 \ - --make_options LLVM=1 \ - --kunitconfig=drivers/net/wireless/mediatek/mt7932/mt7932.kunitconfig \ - --jobs="$(nproc)" --timeout=900 --kernel_args=panic_on_warn=1 diff --git a/.github/workflows/pmgr-pwrstate-kunit.yml b/.github/workflows/pmgr-pwrstate-kunit.yml deleted file mode 100644 index 020a9a5cc943a..0000000000000 --- a/.github/workflows/pmgr-pwrstate-kunit.yml +++ /dev/null @@ -1,65 +0,0 @@ -name: PMGR power state KUnit - -# The apple-pmgr-pwrstate KUnit suite (power transitions, apple,no-auto-pm, -# consumers, reset controller) on arm64 QEMU. It runs on an emulated -# register, so it needs no PMGR. - -on: - pull_request: - branches: [main] - paths: - - 'drivers/pmdomain/apple/**' - - 'include/linux/soc/apple/**' - - '.github/workflows/pmgr-pwrstate-kunit.yml' - pull_request_target: - branches: [main] - paths: - - 'drivers/pmdomain/apple/**' - - 'include/linux/soc/apple/**' - - '.github/workflows/pmgr-pwrstate-kunit.yml' - workflow_dispatch: - -permissions: - contents: read - -concurrency: - group: pmgr-pwrstate-kunit-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - kunit: - if: ${{ (github.event_name == 'pull_request_target' && vars.AURORA_SELF_HOSTED == 'on' && github.event.pull_request.head.repo.full_name == github.repository && !endsWith(github.actor, '[bot]')) || (github.event_name == 'pull_request' && !(vars.AURORA_SELF_HOSTED == 'on' && github.event.pull_request.head.repo.full_name == github.repository && !endsWith(github.actor, '[bot]'))) || (github.event_name != 'pull_request' && github.event_name != 'pull_request_target') }} - runs-on: ${{ (vars.AURORA_SELF_HOSTED == 'on' && github.event_name == 'pull_request_target') && fromJSON('["self-hosted","aurora-buildbox","x64"]') || ((vars.AURORA_SELF_HOSTED == 'on' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch) && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule')) && fromJSON('["self-hosted","aurora-buildbox-main","x64"]') || 'ubuntu-24.04') }} - timeout-minutes: 60 - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ github.event_name == 'pull_request_target' && format('refs/pull/{0}/merge', github.event.pull_request.number) || '' }} - persist-credentials: false - fetch-depth: 1 - - name: Verify the PR merge ref matches this event - if: github.event_name == 'pull_request_target' - env: - WANT: ${{ github.event.pull_request.head.sha }} - run: | - got=$(git cat-file -p HEAD | sed -n 's/^parent //p' | sed -n 2p) - [ "$got" = "$WANT" ] || { echo "::error::refs/pull merge ref is for head $got, this event is for $WANT (the PR moved or this is a stale re-run; the newest run covers the current head)"; exit 1; } - - name: Install kernel build and QEMU dependencies - run: | - # As sep-source.yml: avoid the hosted runner's Azure mirror. - if [ -f /etc/apt/apt-mirrors.txt ]; then - printf '%s\n' 'https://archive.ubuntu.com/ubuntu/' 'https://security.ubuntu.com/ubuntu/' | \ - sudo tee /etc/apt/apt-mirrors.txt >/dev/null - fi - if [ -d /etc/apt/sources.list.d ]; then - sudo find /etc/apt/sources.list.d -maxdepth 1 -type f ! -name 'ubuntu.sources' -delete - fi - sudo apt-get update -o APT::Update::Error-Mode=any -o Acquire::Retries=3 - sudo apt-get install -y -o Acquire::Retries=3 clang lld llvm libelf-dev libssl-dev \ - flex bison bc pkg-config make perl qemu-system-arm - - name: Run the PMGR power state KUnit suite on arm64 QEMU - run: | - ./tools/testing/kunit/kunit.py run --arch=arm64 \ - --make_options LLVM=1 \ - --kunitconfig=drivers/pmdomain/apple/.kunitconfig.pmgr-pwrstate \ - --jobs="$(nproc)" --timeout=900 diff --git a/.github/workflows/sep-source.yml b/.github/workflows/sep-source.yml index b06aa3809c68f..f13f134c9835c 100644 --- a/.github/workflows/sep-source.yml +++ b/.github/workflows/sep-source.yml @@ -1,37 +1,35 @@ name: SEP source checks +# The SEP ioctl ABI and tools/aurora-sep tests, and the DWC3/ATC profile +# compile. The SEP and AOP KUnit suites and the arm64 compile of +# drivers/soc/apple run in apple-build-kunit.yml. + on: pull_request: paths: - - 'Makefile' - - 'rust/**' - - 'tools/aurora-bindgen/**' - - 'drivers/soc/apple/**' + - 'drivers/soc/apple/*.rs' + - 'drivers/soc/apple/*shim*' + - 'drivers/soc/apple/sep*' - 'drivers/pmdomain/apple/pmp-report.c' - 'include/linux/apple-sep-hdcp.h' - 'include/uapi/linux/apple-sep.h' - 'tools/aurora-sep/**' - - 'Kconfig' - - '**/Kconfig*' - - 'arch/arm64/configs/defconfig' - 'drivers/usb/dwc3/**' + - 'drivers/phy/apple/**' - 'include/linux/phy/apple-atc.h' - 'scripts/ci/apple-dwc3-atc-compile.sh' - '.github/workflows/sep-source.yml' pull_request_target: paths: - - 'Makefile' - - 'rust/**' - - 'tools/aurora-bindgen/**' - - 'drivers/soc/apple/**' + - 'drivers/soc/apple/*.rs' + - 'drivers/soc/apple/*shim*' + - 'drivers/soc/apple/sep*' - 'drivers/pmdomain/apple/pmp-report.c' - 'include/linux/apple-sep-hdcp.h' - 'include/uapi/linux/apple-sep.h' - 'tools/aurora-sep/**' - - 'Kconfig' - - '**/Kconfig*' - - 'arch/arm64/configs/defconfig' - 'drivers/usb/dwc3/**' + - 'drivers/phy/apple/**' - 'include/linux/phy/apple-atc.h' - 'scripts/ci/apple-dwc3-atc-compile.sh' - '.github/workflows/sep-source.yml' @@ -40,7 +38,8 @@ permissions: contents: read concurrency: - group: sep-source-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }} + # One group per PR for the event whose jobs run; the skipped twin cancels nothing. + group: sep-source-${{ ((github.event_name == 'pull_request_target' && vars.AURORA_SELF_HOSTED == 'on' && github.event.pull_request.head.repo.full_name == github.repository && !endsWith(github.actor, '[bot]')) || (github.event_name == 'pull_request' && !(vars.AURORA_SELF_HOSTED == 'on' && github.event.pull_request.head.repo.full_name == github.repository && !endsWith(github.actor, '[bot]'))) || (github.event_name != 'pull_request' && github.event_name != 'pull_request_target')) && (github.event.pull_request.number && format('pr-{0}', github.event.pull_request.number) || format('{0}-{1}', github.event_name, github.ref)) || github.run_id }} cancel-in-progress: true jobs: @@ -117,123 +116,11 @@ jobs: python3 -m unittest discover -s tools/aurora-sep/tests -p test_touchid_package.py -v python3 -m unittest discover -s tools/aurora-sep/tests -p test_root_staging.py -v - rust-build: - if: ${{ (github.event_name == 'pull_request_target' && vars.AURORA_SELF_HOSTED == 'on' && github.event.pull_request.head.repo.full_name == github.repository && !endsWith(github.actor, '[bot]')) || (github.event_name == 'pull_request' && !(vars.AURORA_SELF_HOSTED == 'on' && github.event.pull_request.head.repo.full_name == github.repository && !endsWith(github.actor, '[bot]'))) || (github.event_name != 'pull_request' && github.event_name != 'pull_request_target') }} - runs-on: ${{ (vars.AURORA_SELF_HOSTED == 'on' && github.event_name == 'pull_request_target') && fromJSON('["self-hosted","aurora-buildbox","x64"]') || ((vars.AURORA_SELF_HOSTED == 'on' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch) && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule')) && fromJSON('["self-hosted","aurora-buildbox-main","x64"]') || 'ubuntu-24.04') }} - timeout-minutes: 45 - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ github.event_name == 'pull_request_target' && format('refs/pull/{0}/merge', github.event.pull_request.number) || '' }} - persist-credentials: false - fetch-depth: 1 - - name: Verify the PR merge ref matches this event - if: github.event_name == 'pull_request_target' - env: - WANT: ${{ github.event.pull_request.head.sha }} - run: | - got=$(git cat-file -p HEAD | sed -n 's/^parent //p' | sed -n 2p) - [ "$got" = "$WANT" ] || { echo "::error::refs/pull merge ref is for head $got, this event is for $WANT (the PR moved or this is a stale re-run; the newest run covers the current head)"; exit 1; } - - name: Install kernel build dependencies - run: | - # Avoid the hosted runner's Azure mirror after repeated DNS failures. - # Keep signed Ubuntu archive/security suites and fail on update errors. - if [ -f /etc/apt/apt-mirrors.txt ]; then - printf '%s\n' 'https://archive.ubuntu.com/ubuntu/' 'https://security.ubuntu.com/ubuntu/' | \ - sudo tee /etc/apt/apt-mirrors.txt >/dev/null - fi - if [ -d /etc/apt/sources.list.d ]; then - sudo find /etc/apt/sources.list.d -maxdepth 1 -type f ! -name 'ubuntu.sources' -delete - fi - sudo apt-get update -o APT::Update::Error-Mode=any -o Acquire::Retries=3 - sudo apt-get install -y -o Acquire::Retries=3 clang lld llvm libclang-dev libelf-dev libssl-dev \ - flex bison bc pkg-config make perl - rustup component add rust-src - - name: Prepare the layout-corrected bindgen - env: - LIBCLANG_PATH: /usr/lib/llvm-18/lib - run: python3 tools/aurora-bindgen/build.py - - name: Compile Apple SEP module for arm64 - env: - LIBCLANG_PATH: /usr/lib/llvm-18/lib - run: | - make LLVM=1 ARCH=arm64 rustavailable - make LLVM=1 ARCH=arm64 defconfig - scripts/kconfig/merge_config.sh -m .config arch/arm64/configs/asahi.config - scripts/config -e KUNIT -e APPLE_SEP_KUNIT_TEST - make LLVM=1 ARCH=arm64 olddefconfig - grep -qx 'CONFIG_APPLE_SEP=m' .config - grep -qx 'CONFIG_APPLE_SEP_KUNIT_TEST=y' .config - make -j2 LLVM=1 ARCH=arm64 modules_prepare - make -j2 LLVM=1 ARCH=arm64 drivers/soc/apple/apple-sep.o - - kunit: - if: ${{ (github.event_name == 'pull_request_target' && vars.AURORA_SELF_HOSTED == 'on' && github.event.pull_request.head.repo.full_name == github.repository && !endsWith(github.actor, '[bot]')) || (github.event_name == 'pull_request' && !(vars.AURORA_SELF_HOSTED == 'on' && github.event.pull_request.head.repo.full_name == github.repository && !endsWith(github.actor, '[bot]'))) || (github.event_name != 'pull_request' && github.event_name != 'pull_request_target') }} - runs-on: ${{ (vars.AURORA_SELF_HOSTED == 'on' && github.event_name == 'pull_request_target') && fromJSON('["self-hosted","aurora-buildbox","x64"]') || ((vars.AURORA_SELF_HOSTED == 'on' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch) && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule')) && fromJSON('["self-hosted","aurora-buildbox-main","x64"]') || 'ubuntu-24.04') }} - timeout-minutes: 60 - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ github.event_name == 'pull_request_target' && format('refs/pull/{0}/merge', github.event.pull_request.number) || '' }} - persist-credentials: false - fetch-depth: 1 - - name: Verify the PR merge ref matches this event - if: github.event_name == 'pull_request_target' - env: - WANT: ${{ github.event.pull_request.head.sha }} - run: | - got=$(git cat-file -p HEAD | sed -n 's/^parent //p' | sed -n 2p) - [ "$got" = "$WANT" ] || { echo "::error::refs/pull merge ref is for head $got, this event is for $WANT (the PR moved or this is a stale re-run; the newest run covers the current head)"; exit 1; } - - name: Install kernel build and QEMU dependencies - run: | - # Avoid the hosted runner's Azure mirror after repeated DNS failures. - # Keep signed Ubuntu archive/security suites and fail on update errors. - if [ -f /etc/apt/apt-mirrors.txt ]; then - printf '%s\n' 'https://archive.ubuntu.com/ubuntu/' 'https://security.ubuntu.com/ubuntu/' | \ - sudo tee /etc/apt/apt-mirrors.txt >/dev/null - fi - if [ -d /etc/apt/sources.list.d ]; then - sudo find /etc/apt/sources.list.d -maxdepth 1 -type f ! -name 'ubuntu.sources' -delete - fi - sudo apt-get update -o APT::Update::Error-Mode=any -o Acquire::Retries=3 - sudo apt-get install -y -o Acquire::Retries=3 clang lld llvm libclang-dev libelf-dev libssl-dev \ - flex bison bc pkg-config make perl qemu-system-arm - rustup component add rust-src - - name: Prepare the layout-corrected bindgen - env: - LIBCLANG_PATH: /usr/lib/llvm-18/lib - run: python3 tools/aurora-bindgen/build.py - # rust-build only compiles the tests; this runs them. - - name: Run the Apple SEP KUnit suites on arm64 QEMU - env: - LIBCLANG_PATH: /usr/lib/llvm-18/lib - run: | - ./tools/testing/kunit/kunit.py run --arch=arm64 \ - --make_options LLVM=1 \ - --kunitconfig=drivers/soc/apple/sep.kunitconfig \ - --jobs="$(nproc)" --timeout=900 'apple_sep*' - - name: Run the Apple AOP KUnit suites on arm64 QEMU - env: - LIBCLANG_PATH: /usr/lib/llvm-18/lib - run: | - ./tools/testing/kunit/kunit.py run --arch=arm64 \ - --build_dir=.kunit-aop \ - --make_options LLVM=1 \ - --kunitconfig=drivers/soc/apple/aop.kunitconfig \ - --jobs="$(nproc)" --timeout=900 'apple_aop*' - dwc3-atc-compile: - name: DWC3/ATC ${{ matrix.profile }} + name: DWC3/ATC if: ${{ (github.event_name == 'pull_request_target' && vars.AURORA_SELF_HOSTED == 'on' && github.event.pull_request.head.repo.full_name == github.repository && !endsWith(github.actor, '[bot]')) || (github.event_name == 'pull_request' && !(vars.AURORA_SELF_HOSTED == 'on' && github.event.pull_request.head.repo.full_name == github.repository && !endsWith(github.actor, '[bot]'))) || (github.event_name != 'pull_request' && github.event_name != 'pull_request_target') }} runs-on: ${{ (vars.AURORA_SELF_HOSTED == 'on' && github.event_name == 'pull_request_target') && fromJSON('["self-hosted","aurora-buildbox","x64"]') || ((vars.AURORA_SELF_HOSTED == 'on' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch) && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule')) && fromJSON('["self-hosted","aurora-buildbox-main","x64"]') || 'ubuntu-24.04') }} - timeout-minutes: 30 - permissions: - contents: read - strategy: - fail-fast: false - max-parallel: 2 - matrix: - profile: [builtin-no-atc, modular-no-atc, builtin-modular-atc] + timeout-minutes: 45 steps: - uses: actions/checkout@v4 with: @@ -260,16 +147,20 @@ jobs: sudo apt-get install -y -q -o Acquire::Retries=3 clang-18 lld-18 llvm-18 libelf-dev libssl-dev \ flex bison bc pkg-config make perl echo "/usr/lib/llvm-18/bin" >> "$GITHUB_PATH" - - name: Compile the Apple DWC3 object with the resolved PHY profile + - name: Compile the Apple DWC3 object with each resolved PHY profile env: - PROFILE: ${{ matrix.profile }} PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }} PR_BASE_SHA: ${{ github.event.pull_request.base.sha }} - run: scripts/ci/apple-dwc3-atc-compile.sh "$PROFILE" + run: | + rc=0 + for profile in builtin-no-atc modular-no-atc builtin-modular-atc; do + scripts/ci/apple-dwc3-atc-compile.sh "$profile" || { echo "::error::DWC3/ATC $profile failed"; rc=1; } + done + exit "$rc" - name: Keep configuration and compiler receipts if: always() uses: actions/upload-artifact@v4 with: - name: dwc3-atc-${{ matrix.profile }} - path: ${{ runner.temp }}/dwc3-atc-${{ matrix.profile }}/artifacts/ + name: dwc3-atc + path: ${{ runner.temp }}/dwc3-atc-*/artifacts/ retention-days: 14