-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
78 additions
and
0 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: 'build selftests' | ||
description: 'Build selftests/sched_ext' | ||
inputs: | ||
kbuild-output: | ||
description: 'relative or absolute path to use for storing build artifacts' | ||
required: true | ||
arch: | ||
description: 'arch' | ||
required: true | ||
toolchain: | ||
description: 'what toolchain to use' | ||
default: 'gcc' | ||
required: true | ||
repo-root: | ||
description: "Path to the root of the kernel repository. Default: github.workspace" | ||
max-make-jobs: | ||
description: 'Maximum number of jobs to use when running make (e.g argument to -j). Default: 4*nproc' | ||
default: '' | ||
llvm-version: | ||
description: 'llvm version' | ||
required: false | ||
default: '16' | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: build selftests/sched_ext | ||
env: | ||
KBUILD_OUTPUT: ${{ inputs.kbuild-output }} | ||
MAX_MAKE_JOBS: ${{ inputs.max-make-jobs }} | ||
REPO_ROOT: ${{ inputs.repo-root || github.workspace }} | ||
shell: bash | ||
run: | ||
${GITHUB_ACTION_PATH}/build.sh "${{ inputs.arch }}" "${{ inputs.toolchain }}" "${{ inputs.llvm-version }}" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
source "${GITHUB_ACTION_PATH}/../helpers.sh" | ||
|
||
TARGET_ARCH=$1 | ||
TOOLCHAIN=$2 | ||
LLVM_VERSION=$3 | ||
|
||
ARCH="$(platform_to_kernel_arch ${TARGET_ARCH})" | ||
CROSS_COMPILE="" | ||
|
||
if [[ "${TARGET_ARCH}" != "$(uname -m)" ]] | ||
then | ||
CROSS_COMPILE="${TARGET_ARCH}-linux-gnu-" | ||
fi | ||
|
||
if [[ $TOOLCHAIN = "llvm" ]]; then | ||
export LLVM="-$LLVM_VERSION" | ||
TOOLCHAIN="llvm-$LLVM_VERSION" | ||
fi | ||
|
||
foldable start build_selftests "Building selftests/sched_ext with $TOOLCHAIN" | ||
|
||
MAKE_OPTS=$(cat <<EOF | ||
ARCH=${ARCH} | ||
CROSS_COMPILE=${CROSS_COMPILE} | ||
CLANG=clang-${LLVM_VERSION} | ||
VMLINUX_BTF=${KBUILD_OUTPUT}/vmlinux | ||
EOF | ||
) | ||
SELF_OPTS=$(cat <<EOF | ||
-C ${REPO_ROOT}/tools/testing/selftests/sched_ext | ||
EOF | ||
) | ||
|
||
cd ${REPO_ROOT} | ||
make ${MAKE_OPTS} ${SELF_OPTS} clean | ||
make ${MAKE_OPTS} ${SELF_OPTS} -j $(kernel_build_make_jobs) | ||
|
||
foldable end build_selftests | ||
|