From 066e4b26ab043b9fb7e3fa296302e27d1ba23c3f Mon Sep 17 00:00:00 2001 From: Axel Heider Date: Fri, 1 Mar 2024 15:51:11 +0100 Subject: [PATCH] CI: reduce load Signed-off-by: Axel Heider --- .github/workflows/pr.yml | 55 -------------- .github/workflows/proof.yml | 63 ---------------- .github/workflows/push.yml | 14 +--- .github/workflows/sel4test-hw.yml | 113 ----------------------------- .github/workflows/sel4test-sim.yml | 39 ---------- 5 files changed, 3 insertions(+), 281 deletions(-) delete mode 100644 .github/workflows/pr.yml delete mode 100644 .github/workflows/proof.yml delete mode 100644 .github/workflows/sel4test-hw.yml delete mode 100644 .github/workflows/sel4test-sim.yml diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml deleted file mode 100644 index ee341dac1b..0000000000 --- a/.github/workflows/pr.yml +++ /dev/null @@ -1,55 +0,0 @@ -# Copyright 2020, Data61, CSIRO (ABN 41 687 119 230) -# -# SPDX-License-Identifier: BSD-2-Clause - -# Actions to run on pull requests - -name: PR - -on: [pull_request] - -jobs: - gitlint: - name: Gitlint - runs-on: ubuntu-latest - steps: - - uses: seL4/ci-actions/gitlint@master - - whitespace: - name: 'Trailing Whitespace' - runs-on: ubuntu-latest - steps: - - uses: seL4/ci-actions/git-diff-check@master - - shell: - name: 'Portable Shell' - runs-on: ubuntu-latest - steps: - - uses: seL4/ci-actions/bashisms@master - - style: - name: Style - runs-on: ubuntu-latest - steps: - - uses: seL4/ci-actions/style@master - - preprocess: - name: Preprocess - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - arch: [ARM, ARM_HYP, AARCH64, RISCV64, X64] - feature: ["", MCS] - exclude: - - arch: ARM_HYP - feature: MCS - - arch: AARCH64 - feature: MCS - - arch: X64 - feature: MCS - steps: - - uses: seL4/ci-actions/preprocess@master - with: - L4V_ARCH: ${{ matrix.arch }} - L4V_FEATURES: ${{ matrix.feature }} diff --git a/.github/workflows/proof.yml b/.github/workflows/proof.yml deleted file mode 100644 index 603a1b1fa2..0000000000 --- a/.github/workflows/proof.yml +++ /dev/null @@ -1,63 +0,0 @@ -# Copyright 2021 Proofcraft Pty Ltd -# -# SPDX-License-Identifier: BSD-2-Clause - -name: Proofs - -on: - pull_request_target: - types: [labeled, synchronize] - -jobs: - cproof: - name: C Proofs - runs-on: ubuntu-latest - # run on any normal trigger when the label exists, and run when the label is added - # don't run again when other labels are added - if: ${{ github.repository_owner == 'seL4' && - (github.event.action != 'labeled' && - contains(github.event.pull_request.labels.*.name, 'proof-test') || - github.event.action == 'labeled' && github.event.label.name == 'proof-test') }} - strategy: - fail-fast: false - matrix: - include: - - arch: ARM - session: CRefine SimplExportAndRefine - - arch: ARM_HYP - session: CRefine - - arch: RISCV64 - session: CRefine SimplExportAndRefine - - arch: X64 - session: CRefine - - arch: AARCH64 - session: CRefine - - arch: RISCV64 - features: MCS - session: CRefine - # test only most recent push to PR: - concurrency: seL4-PR-C-proofs-pr-${{ github.event.number }}-idx-${{ strategy.job-index }} - steps: - - name: Proofs - uses: seL4/ci-actions/aws-proofs@master - with: - L4V_ARCH: ${{ matrix.arch }} - L4V_FEATURES: ${{ matrix.features }} - session: ${{ matrix.session }} - manifest: ${{ matrix.features == 'MCS' && 'mcs.xml' || 'default.xml' }} - env: - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - AWS_SSH: ${{ secrets.AWS_SSH }} - GH_HEAD_SHA: ${{ github.event.pull_request.head.sha }} - - name: Upload kernel builds - uses: actions/upload-artifact@v4 - with: - name: kernel-builds-${{ matrix.arch }}-${{ matrix.features }} - path: artifacts/kernel-builds - if-no-files-found: ignore - - name: Upload logs - uses: actions/upload-artifact@v4 - with: - name: logs-${{ matrix.arch }}-${{ matrix.features }} - path: logs.tar.xz diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 7dcbc44f47..3c4c1c4a57 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -12,17 +12,9 @@ on: pull_request: jobs: - check: - name: License Check - runs-on: ubuntu-latest - steps: - - uses: seL4/ci-actions/license-check@master - - links: - name: Links - runs-on: ubuntu-latest - steps: - - uses: seL4/ci-actions/link-check@master +# checks: +# name: Checks +# uses: axel-h/ci-actions/.github/workflows/push.yml@patch-axel-7 mypy: name: MyPy diff --git a/.github/workflows/sel4test-hw.yml b/.github/workflows/sel4test-hw.yml deleted file mode 100644 index feeb20c8ca..0000000000 --- a/.github/workflows/sel4test-hw.yml +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2021, Proofcraft Pty Ltd -# -# SPDX-License-Identifier: BSD-2-Clause - -# sel4test hardware builds and runs -# -# See sel4test-hw/builds.yml in the repo seL4/ci-actions for configs. - -name: seL4Test-HW - -on: - # needs PR target for secrets access; guard by requiring label - pull_request_target: - types: [opened, reopened, synchronize, labeled] - -# downgrade permissions to read-only as you would have in a standard PR action -permissions: - contents: read - -# To reduce the load (especiually on the machine queue) we cancel any older runs -# of this workflow for the current PR. Such runs exist, if there were new pushes -# to the PR's branch without waiting for the workflow to finish. As a side -# effect, pushing new commits now becomes a convenient way to cancel all the -# older runs, e.g. if they are stuck and would only be stopped by the timeout -# eventually. -# Note that we could do the concurrency handling at a finer level, and only wrap -# the actual run on the hardware. But there seems not much gain in letting the -# older builds run, as these are usually obsolete with new pushes also. -concurrency: - group: ${{ github.workflow }}-pr-${{ github.event.number }} - cancel-in-progress: true - -jobs: - hw-build: - name: HW Build - runs-on: ubuntu-latest - if: ${{ github.event_name == 'push' || - github.event_name == 'pull_request_target' && - github.event.action != 'labeled' && - (contains(github.event.pull_request.labels.*.name, 'hw-build') || - contains(github.event.pull_request.labels.*.name, 'hw-test')) || - github.event_name == 'pull_request_target' && - github.event.action == 'labeled' && - (github.event.label.name == 'hw-build' || - github.event.label.name == 'hw-test') }} - strategy: - fail-fast: false - matrix: - # There is no "rv32imac" hardware yet. - march: [armv7a, armv8a, nehalem, rv64imac] - compiler: [gcc, clang] - steps: - - name: Build - uses: seL4/ci-actions/sel4test-hw@master - with: - march: ${{ matrix.march }} - compiler: ${{ matrix.compiler }} - sha: ${{ github.event.pull_request.head.sha }} - - name: Upload images - uses: actions/upload-artifact@v4 - with: - name: images-${{ matrix.march }}-${{ matrix.compiler }} - path: '*-images.tar.gz' - - name: Upload kernel.elf files - uses: actions/upload-artifact@v4 - with: - name: kernel.elf-${{ matrix.march }}-${{ matrix.compiler }} - path: '*-kernel.elf' - - the_matrix: - name: Matrix - needs: hw-build - runs-on: ubuntu-latest - outputs: - matrix: ${{ steps.matrix.outputs.matrix }} - steps: - - id: matrix - uses: seL4/ci-actions/sel4test-hw-matrix@master - - hw-run: - name: HW Run - runs-on: ubuntu-latest - needs: the_matrix - if: ${{ github.repository_owner == 'seL4' && - (github.event_name == 'push' || - github.event_name == 'pull_request_target' && - github.event.action != 'labeled' && - contains(github.event.pull_request.labels.*.name, 'hw-test') || - github.event_name == 'pull_request_target' && - github.event.action == 'labeled' && - github.event.label.name == 'hw-test') }} - strategy: - fail-fast: false - matrix: ${{ fromJson(needs.the_matrix.outputs.matrix) }} - steps: - - name: Get machine queue - uses: actions/checkout@v4 - with: - repository: seL4/machine_queue - path: machine_queue - - name: Download image - uses: actions/download-artifact@v4 - with: - name: images-${{ matrix.march }}-${{ matrix.compiler }} - - name: Run - uses: seL4/ci-actions/sel4test-hw-run@master - with: - platform: ${{ matrix.platform }} - compiler: ${{ matrix.compiler }} - mode: ${{ matrix.mode }} - index: $${{ strategy.job-index }} - env: - HW_SSH: ${{ secrets.HW_SSH }} diff --git a/.github/workflows/sel4test-sim.yml b/.github/workflows/sel4test-sim.yml deleted file mode 100644 index 3b5a7c07e7..0000000000 --- a/.github/workflows/sel4test-sim.yml +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright 2021, Proofcraft Pty Ltd -# -# SPDX-License-Identifier: BSD-2-Clause - -# sel4test simulation runs -# -# See sel4test-sim/builds.yml in the repo seL4/ci-actions for configs. - -name: seL4Test-Sim - -on: - pull_request: - paths-ignore: - - 'manual/**' - - 'LICENSES/**' - - '*.md' - -# To reduce the load we cancel any older runs of this workflow for the current -# PR. Such runs exist, if there were new pushes to the PR's branch without -# waiting for the workflow to finish. As a side effect, pushing new commits now -# becomes a convenient way to cancel all the older runs, e.g. if they are stuck -# and would only be stopped by the timeout eventually. -concurrency: - group: ${{ github.workflow }}-pr-${{ github.event.number }} - cancel-in-progress: true - -jobs: - sim: - name: Simulation - runs-on: ubuntu-latest - strategy: - matrix: - march: [armv7a, armv8a, nehalem, rv32imac, rv64imac] - compiler: [gcc, clang] - steps: - - uses: seL4/ci-actions/sel4test-sim@master - with: - march: ${{ matrix.march }} - compiler: ${{ matrix.compiler }}