linux-riscv-ci-kselftest-riscv-lab #3732
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
# SPDX-FileCopyrightText: 2024 Rivos Inc. | |
# | |
# SPDX-License-Identifier: Apache-2.0 | |
name: linux-riscv-ci-kselftest-riscv-lab | |
defaults: | |
run: | |
shell: bash -leo pipefail {0} | |
on: | |
workflow_dispatch: | |
inputs: | |
kernel-url: | |
description: "Compiled kernel image url" | |
required: true | |
type: string | |
modules-url: | |
description: "Compiled kernel modules url" | |
default: "" | |
type: string | |
selftests-url: | |
description: "Compiled selftests url" | |
required: true | |
type: string | |
build-id: | |
description: "Build id" | |
required: true | |
type: string | |
jobs: | |
setup-matrix: | |
runs-on: ubuntu-latest | |
outputs: | |
matrix: ${{ steps.create-matrix.outputs.matrix }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Create Matrix | |
id: create-matrix | |
run: | | |
./.github/scripts/matrix/kselftest_matrix.sh "${{ inputs.selftests-url }}" $GITHUB_OUTPUT | |
run-tests: | |
runs-on: ubuntu-latest | |
needs: setup-matrix | |
container: | |
image: ghcr.io/linux-riscv/pw-builder:latest | |
volumes: | |
- /home/github/ramdisk/build:/build | |
- /home/github/ccache:/build/ccache | |
- /home/github/gitref:/build/gitref | |
strategy: | |
fail-fast: false | |
matrix: ${{ fromJson(needs.setup-matrix.outputs.matrix) }} | |
steps: | |
- name: Configure git | |
uses: actions/checkout@v4 | |
- name: Create work directory | |
run: | | |
mkdir -p /build/my-linux | |
bash .github/scripts/download_files.sh "${{ inputs.kernel-url }}" "${{ inputs.modules-url }}" "${{ inputs.selftests-url }}" | |
- name: Run checks | |
run: | | |
b=$(pwd) | |
cd /build/my-linux | |
bash ${b}/.github/scripts/kselftest.sh "${{ inputs.build-id }}" "${{ matrix.test }}" | |
- name: Define log name | |
id: get-log-name | |
run: | | |
LOG_OUT_NAME=$(sed 's/[\\/\r\n*?|:><"]/./g' <<< ${{ matrix.test }}) | |
echo "log-name=$LOG_OUT_NAME" >> $GITHUB_OUTPUT | |
- name: Collect logs | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-logs-${{ steps.get-log-name.outputs.log-name }} | |
path: /build/logs/* | |
- name: Submit to KCIDB | |
uses: ./.github/actions/submit_kcidb | |
with: | |
build-id: ${{ inputs.build-id }} | |
logs-dir: /build/logs/ | |
kcidb-token: ${{ secrets.KCIDB_CREDENTIALS }} |