armsr: enable PCIe hotplug on armv8 #34
Workflow file for this run
This file contains hidden or 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: OS Real Boot Check | |
| on: | |
| pull_request: | |
| branches: ["main"] | |
| # Default to running for repository changes so new build inputs and | |
| # vendored feeds cannot silently bypass the real image build. Ignore only | |
| # files that cannot affect the produced CapOS images. | |
| paths-ignore: | |
| - ".devcontainer/**" | |
| - ".github/FUNDING.yml" | |
| - ".github/ISSUE_TEMPLATE/**" | |
| - ".github/labeler.yml" | |
| - ".github/pull_request_template" | |
| - ".github/workflows/greetings.yml" | |
| - ".github/workflows/issue-summary.yml" | |
| - ".github/workflows/labeler.yml" | |
| - ".github/workflows/os-sanity.yml" | |
| - ".github/workflows/stale.yml" | |
| - "CODE_OF_CONDUCT.md" | |
| - "CONTRIBUTING.md" | |
| - "README.md" | |
| - "SECURITY.md" | |
| - "TODO.md" | |
| - "website/**" | |
| push: | |
| branches: ["main"] | |
| # Default to running for repository changes so new build inputs and | |
| # vendored feeds cannot silently bypass the real image build. Ignore only | |
| # files that cannot affect the produced CapOS images. | |
| paths-ignore: | |
| - ".devcontainer/**" | |
| - ".github/FUNDING.yml" | |
| - ".github/ISSUE_TEMPLATE/**" | |
| - ".github/labeler.yml" | |
| - ".github/pull_request_template" | |
| - ".github/workflows/greetings.yml" | |
| - ".github/workflows/issue-summary.yml" | |
| - ".github/workflows/labeler.yml" | |
| - ".github/workflows/os-sanity.yml" | |
| - ".github/workflows/stale.yml" | |
| - "CODE_OF_CONDUCT.md" | |
| - "CONTRIBUTING.md" | |
| - "README.md" | |
| - "SECURITY.md" | |
| - "TODO.md" | |
| - "website/**" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: os-real-boot-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| real-boot: | |
| name: Build + QEMU boot (${{ matrix.name }}) | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 360 | |
| env: | |
| CCACHE_DIR: ${{ github.workspace }}/.ccache | |
| CCACHE_MAXSIZE: 2G | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - name: x86_64 | |
| target: x86 | |
| subtarget: "64" | |
| - name: aarch64 | |
| target: armsr | |
| subtarget: armv8 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| - name: Install build and QEMU prerequisites | |
| shell: bash | |
| run: | | |
| set -euxo pipefail | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| bash build-essential ccache clang flex bison g++ gawk gcc-multilib \ | |
| gettext git jq libelf-dev libncurses-dev libssl-dev make patch perl \ | |
| python3 python3-distutils python3-pyelftools python3-setuptools \ | |
| rsync unzip wget zlib1g-dev file curl netcat-openbsd \ | |
| pkg-config fuse3 libfuse3-dev \ | |
| qemu-system-arm qemu-system-x86 qemu-utils qemu-efi-aarch64 | |
| - name: Free runner disk space | |
| shell: bash | |
| run: | | |
| set -euxo pipefail | |
| mkdir -p ci-artifacts | |
| { | |
| echo "===== before cleanup =====" | |
| df -h | |
| echo | |
| sudo du -sh /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache /usr/local/.ghcup 2>/dev/null || true | |
| docker system df || true | |
| } | tee "ci-artifacts/disk-cleanup-${{ matrix.name }}.txt" | |
| sudo rm -rf \ | |
| /usr/share/dotnet \ | |
| /usr/local/lib/android \ | |
| /opt/ghc \ | |
| /opt/hostedtoolcache/CodeQL \ | |
| /opt/hostedtoolcache/go \ | |
| /opt/hostedtoolcache/node \ | |
| /opt/hostedtoolcache/Python \ | |
| /usr/local/.ghcup || true | |
| docker system prune -af --volumes || true | |
| sudo apt-get clean | |
| { | |
| echo | |
| echo "===== after cleanup =====" | |
| df -h | |
| docker system df || true | |
| } | tee -a "ci-artifacts/disk-cleanup-${{ matrix.name }}.txt" | |
| - name: Cache downloads | |
| uses: actions/cache@v4 | |
| with: | |
| path: dl | |
| key: capos-dl-${{ matrix.name }}-${{ hashFiles('feeds.conf.default', 'feeds.conf', 'package/**/Makefile', 'target/linux/**/Makefile') }} | |
| restore-keys: | | |
| capos-dl-${{ matrix.name }}- | |
| capos-dl- | |
| - name: Cache compiler output | |
| uses: actions/cache@v4 | |
| with: | |
| path: .ccache | |
| key: capos-ccache-${{ matrix.name }}-${{ github.ref_name }}-${{ github.sha }} | |
| restore-keys: | | |
| capos-ccache-${{ matrix.name }}-${{ github.ref_name }}- | |
| capos-ccache-${{ matrix.name }}- | |
| - name: Limit compiler cache size | |
| shell: bash | |
| run: | | |
| set -euxo pipefail | |
| mkdir -p "$CCACHE_DIR" ci-artifacts | |
| ccache --max-size="$CCACHE_MAXSIZE" | |
| ccache --cleanup || true | |
| ccache --show-stats | tee "ci-artifacts/ccache-before-${{ matrix.name }}.txt" | |
| - name: Configure CapOS target | |
| shell: bash | |
| run: | | |
| set -euxo pipefail | |
| mkdir -p ci-artifacts | |
| if [ ! -f feeds.conf ] && [ -f feeds.conf.default ]; then | |
| cp feeds.conf.default feeds.conf | |
| fi | |
| ./scripts/feeds list >/dev/null | |
| ./scripts/feeds install -a | |
| scripts/ci/capos-real-boot-config.sh "${{ matrix.target }}" "${{ matrix.subtarget }}" | |
| make defconfig | |
| cp .config "ci-artifacts/config-${{ matrix.name }}" | |
| ./scripts/diffconfig.sh | tee "ci-artifacts/diffconfig-${{ matrix.name }}.txt" | |
| - name: Download sources | |
| shell: bash | |
| run: | | |
| set -euxo pipefail | |
| scripts/ci/run-with-log.sh "ci-artifacts/download-${{ matrix.name }}.log" \ | |
| "Download sources (${{ matrix.name }})" -- \ | |
| make -j"$(nproc)" download V=s | |
| - name: Build image | |
| shell: bash | |
| run: | | |
| set -euxo pipefail | |
| mkdir -p ci-artifacts | |
| { | |
| echo "===== before build =====" | |
| df -h | |
| echo | |
| du -sh dl .ccache build_dir staging_dir tmp 2>/dev/null || true | |
| } | tee "ci-artifacts/disk-before-build-${{ matrix.name }}.txt" | |
| set +e | |
| scripts/ci/run-with-log.sh "ci-artifacts/build-${{ matrix.name }}.log" \ | |
| "Parallel image build (${{ matrix.name }})" -- \ | |
| make -j"$(nproc)" V=s | |
| status=$? | |
| set -e | |
| if [ "$status" -ne 0 ]; then | |
| echo "parallel build failed; retrying serially for a deterministic error log" | |
| df -h | tee -a "ci-artifacts/disk-before-serial-retry-${{ matrix.name }}.txt" || true | |
| scripts/ci/run-with-log.sh --append "ci-artifacts/build-${{ matrix.name }}.log" \ | |
| "Serial image build retry (${{ matrix.name }})" -- \ | |
| make -j1 V=sc | |
| fi | |
| - name: QEMU boot and probe 2000/tcp | |
| shell: bash | |
| run: | | |
| set -euxo pipefail | |
| CAPOS_CI_ARTIFACT_DIR=ci-artifacts \ | |
| CAPOS_CI_BOOT_TIMEOUT_S=360 \ | |
| scripts/ci/qemu-port-check.sh "${{ matrix.target }}" "${{ matrix.subtarget }}" | |
| - name: Upload diagnostics | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: capos-real-boot-${{ matrix.name }} | |
| path: | | |
| ci-artifacts/** | |
| logs/** | |
| bin/targets/${{ matrix.target }}/${{ matrix.subtarget }}/*.manifest | |
| bin/targets/${{ matrix.target }}/${{ matrix.subtarget }}/*sha256sums | |
| if-no-files-found: ignore | |
| retention-days: 14 |