Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build-linux: try container action #160

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions .github/workflows/kernel-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,20 +90,6 @@ jobs:
with:
patches-root: '${{ github.workspace }}/ci/diffs'
repo-root: ${{ env.REPO_ROOT }}
- name: Setup build environment
uses: ./setup-build-env
with:
arch: ${{ inputs.arch }}
llvm-version: ${{ inputs.llvm-version }}
pahole: master
- name: Print toolchain version used
shell: bash
run: |
TOOLCHAIN=${{ inputs.toolchain }}
if [ $TOOLCHAIN = "llvm" ]; then
TOOLCHAIN="clang-${{ inputs.llvm-version }}"
fi
${TOOLCHAIN} --version
- name: Build kernel image
uses: ./build-linux
with:
Expand Down
22 changes: 22 additions & 0 deletions build-linux/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM ubuntu:noble

ARG LLVM_VERSION=17
ARG PAHOLE_BRANCH=master
ARG PAHOLE_ORIGIN=https://git.kernel.org/pub/scm/devel/pahole/pahole.git
ARG TARGET_ARCH=x86_64

RUN apt-get update && apt-get install -y \
bash bc binutils bison cmake diffutils elfutils findutils flex \
gcc git gnupg libdw-dev libelf-dev libssl-dev libzstd-dev make \
openssl perl sudo udev util-linux wget zstd

RUN git clone -b v2 --depth 1 https://github.com/libbpf/ci.git /ci/actions

RUN /ci/actions/setup-build-env/build_pahole.sh
RUN /ci/actions/setup-build-env/install_clang.sh
RUN /ci/actions/setup-build-env/install_cross_compilation_toolchain.sh $TARGET_ARCH

ENV GITHUB_WORKSPACE=/github/workspace
WORKDIR /github/workspace
ENTRYPOINT ["/ci/actions/build-linux/build.sh"]

18 changes: 8 additions & 10 deletions build-linux/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,11 @@ inputs:
required: false
default: '16'
runs:
using: "composite"
steps:
- name: build linux
shell: bash
run: |
kbuild_output="$(realpath ${{ inputs.kbuild-output }})"
export LLVM_VERSION=${{ inputs.llvm-version }}
${GITHUB_ACTION_PATH}/build.sh "${{ inputs.arch }}" "${{ inputs.toolchain }}" "${kbuild_output}"
env:
MAX_MAKE_JOBS: ${{ inputs.max-make-jobs }}
using: 'docker'
image: ghcr.io/theihor/kbuilder-test
args:
- ${{ inputs.arch }}
- ${{ inputs.toolchain }}
- ${{ inputs.kbuild-output }}
env:
MAX_MAKE_JOBS: ${{ inputs.max-make-jobs }}
Loading