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

Add release test_progs build #250

Merged
merged 1 commit into from
Dec 12, 2023
Merged
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
5 changes: 4 additions & 1 deletion .github/scripts/matrix.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env python3

from copy import deepcopy
from json import dumps
from enum import Enum
import os
Expand Down Expand Up @@ -72,13 +71,15 @@ def get_tests(config):
"arch": Arch.X86_64.value,
"toolchain": "llvm",
"llvm-version": "17",
"build_release": True,
},
{
"kernel": "LATEST",
"runs_on": [],
"arch": Arch.X86_64.value,
"toolchain": "llvm",
"llvm-version": "18",
"build_release": True,
},
{
"kernel": "LATEST",
Expand Down Expand Up @@ -115,6 +116,8 @@ def get_tests(config):

# Set run_veristat to false by default.
matrix[idx]["run_veristat"] = matrix[idx].get("run_veristat", False)
# Set build_release to false by default.
matrix[idx]["build_release"] = matrix[idx].get("build_release", False)
# Feel in the tests
matrix[idx]["tests"] = {
"include": [generate_test_config(test) for test in get_tests(matrix[idx])]
Expand Down
20 changes: 18 additions & 2 deletions .github/workflows/kernel-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ on:
type: boolean
description: Whether to download the linux sources into the working directory.
default: false
build_release:
required: true
type: boolean
description: Build selftests with -O2 optimization in addition to non-optimized build.
default: false
secrets:
AWS_ROLE_ARN:
required: true
Expand All @@ -60,7 +65,18 @@ jobs:
llvm-version: ${{ inputs.llvm-version }}
kernel: ${{ inputs.kernel }}
download_sources: ${{ inputs.download_sources }}

build-release:
if: ${{ inputs.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
Expand Down Expand Up @@ -93,4 +109,4 @@ jobs:
aws_region: ${{ vars.AWS_REGION }}
runs_on: ${{ inputs.runs_on }}
secrets:
AWS_ROLE_ARN: ${{ secrets.AWS_ROLE_ARN }}
AWS_ROLE_ARN: ${{ secrets.AWS_ROLE_ARN }}
15 changes: 12 additions & 3 deletions .github/workflows/kernel-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,15 @@ 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 }}
name: build for ${{ inputs.arch }} with ${{ inputs.toolchain_full }} ${{ inputs.release && 'and -O2 optimization' || '' }}
runs-on: ${{ fromJSON(inputs.runs_on) }}
timeout-minutes: 100
env:
Expand Down Expand Up @@ -103,6 +107,11 @@ jobs:
kbuild-output: ${{ env.KBUILD_OUTPUT }}
max-make-jobs: 32
llvm-version: ${{ inputs.llvm-version }}
env:
# RELEASE= disables all optimizaions
# RELEASE=0 adds -O0 make flag
# RELEASE=1 adds -O2 make flag
RELEASE: ${{ inputs.release && '1' || '' }}
- if: ${{ github.event_name != 'push' }}
name: Build samples
uses: libbpf/ci/build-samples@main
Expand All @@ -126,4 +135,4 @@ jobs:
with:
name: vmlinux-${{ inputs.arch }}-${{ inputs.toolchain_full }}
if-no-files-found: error
path: vmlinux-${{ inputs.arch }}-${{ inputs.toolchain_full }}.tar.zst
path: vmlinux-${{ inputs.arch }}-${{ inputs.toolchain_full }}.tar.zst
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,6 @@ jobs:
run_tests: ${{ github.event_name != 'push' }}
# Download sources
download_sources: ${{ github.repository == 'kernel-patches/vmtest' }}
build_release: ${{ matrix.build_release }}
secrets:
AWS_ROLE_ARN: ${{ secrets.AWS_ROLE_ARN }}
Loading