Skip to content

Commit

Permalink
build-linux: try container action
Browse files Browse the repository at this point in the history
  • Loading branch information
theihor committed Nov 29, 2024
1 parent 57fddec commit 68745d2
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 10 deletions.
21 changes: 21 additions & 0 deletions build-linux/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
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

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 }}

0 comments on commit 68745d2

Please sign in to comment.