diff --git a/.github/workflows/kernel-build-test.yml b/.github/workflows/kernel-build-test.yml index 2bc3b9cc..d9f9328f 100644 --- a/.github/workflows/kernel-build-test.yml +++ b/.github/workflows/kernel-build-test.yml @@ -60,7 +60,17 @@ jobs: llvm-version: ${{ inputs.llvm-version }} kernel: ${{ inputs.kernel }} download_sources: ${{ inputs.download_sources }} - + build-release: + uses: ./.github/workflows/kernel-build.yml + with: + arch: ${{ inputs.arch }} + toolchain_full: ${{ inputs.toolchain_full }} + toolchain: ${{ inputs.toolchain }} + runs_on: ${{ inputs.runs_on }} + llvm-version: ${{ inputs.llvm-version }} + kernel: ${{ inputs.kernel }} + download_sources: ${{ inputs.download_sources }} + release: true test: if: ${{ inputs.run_tests }} uses: ./.github/workflows/kernel-test.yml @@ -93,4 +103,4 @@ jobs: aws_region: ${{ vars.AWS_REGION }} runs_on: ${{ inputs.runs_on }} secrets: - AWS_ROLE_ARN: ${{ secrets.AWS_ROLE_ARN }} \ No newline at end of file + AWS_ROLE_ARN: ${{ secrets.AWS_ROLE_ARN }} diff --git a/.github/workflows/kernel-build.yml b/.github/workflows/kernel-build.yml index f12014d0..9f26041d 100644 --- a/.github/workflows/kernel-build.yml +++ b/.github/workflows/kernel-build.yml @@ -33,8 +33,12 @@ on: type: boolean description: Whether to download the linux sources into the working directory. default: false + release: + required: false + type: boolean + description: Build selftest with -O2 optimization + default: false - jobs: build: name: build for ${{ inputs.arch }} with ${{ inputs.toolchain_full }} @@ -103,6 +107,8 @@ jobs: kbuild-output: ${{ env.KBUILD_OUTPUT }} max-make-jobs: 32 llvm-version: ${{ inputs.llvm-version }} + env: + RELEASE: ${{ inputs.release && '1' || '0' }} - if: ${{ github.event_name != 'push' }} name: Build samples uses: libbpf/ci/build-samples@main @@ -126,4 +132,4 @@ jobs: with: name: vmlinux-${{ inputs.arch }}-${{ inputs.toolchain_full }} if-no-files-found: error - path: vmlinux-${{ inputs.arch }}-${{ inputs.toolchain_full }}.tar.zst \ No newline at end of file + path: vmlinux-${{ inputs.arch }}-${{ inputs.toolchain_full }}.tar.zst