Skip to content

Commit

Permalink
Don't build support packages for 2.10.0 and newer (#1697)
Browse files Browse the repository at this point in the history
Also adjust labeling logic on drivers workflow
  • Loading branch information
Stringy authored Jun 3, 2024
1 parent b886aa9 commit 08fd6ee
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/main-drivers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ on:
branches:
- master
pull_request:
types:
- labeled
- unlabeled
- synchronize
- opened
- reopened

jobs:
init:
Expand Down Expand Up @@ -52,7 +58,8 @@ jobs:
public-support-packages-bucket: ${{ needs.init.outputs.public-support-packages-bucket }}
if: |
always() &&
(github.event_name == 'push' && github.ref_name == 'master')
((github.event_name == 'push' && github.ref_name == 'master') ||
contains(github.event.pull_request.labels.*.name, 'test-support-packages'))
needs:
- init
- build-drivers
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/support-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
- name: Create support-packages
run: |
${{ github.workspace }}/kernel-modules/support-packages/04-create-support-packages.sh \
${{ github.workspace }}/collector/LICENSE-kernel-modules.txt \
${{ github.workspace }}/collector/kernel-modules/LICENSE \
gs://${{ inputs.upstream-drivers-bucket }} \
/tmp/support-packages/metadata \
/tmp/support-packages/output \
Expand Down
4 changes: 4 additions & 0 deletions kernel-modules/support-packages/04-create-support-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ mkdir -p "${OUT_DIR}" || die "Failed to create output directory '${OUT_DIR}'"
for mod_ver_dir in "${MD_DIR}/module-versions"/*; do
mod_ver="$(basename "$mod_ver_dir")"

if skip_version "$mod_ver"; then
continue
fi

package_root="$(mktemp -d)"
probe_dir="${package_root}/kernel-modules/${mod_ver}"
mkdir -p "$probe_dir"
Expand Down
4 changes: 4 additions & 0 deletions kernel-modules/support-packages/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ use_downstream_only() {
_check_min_version "$1" "2.9.0"
}

skip_version() {
_check_min_version "$1" "2.10.0"
}

bucket_has_drivers() {
count=$(gsutil ls "$1" | wc -l)

Expand Down

0 comments on commit 08fd6ee

Please sign in to comment.