Skip to content

Check attributes under /sys can be read without stucking the system (New) #2541

Check attributes under /sys can be read without stucking the system (New)

Check attributes under /sys can be read without stucking the system (New) #2541

name: Verify debian packages
permissions:
contents: read
on:
push:
branches: [ main ]
paths:
- checkbox-ng/**
- checkbox-support/**
- providers/base/**
- providers/certification-client/**
- providers/certification-server/**
- providers/genio/**
- providers/gpgpu/**
- providers/resource/**
- providers/sru/**
- providers/tpm2/**
pull_request:
branches: [ main ]
paths:
- checkbox-ng/**
- checkbox-support/**
- providers/base/**
- providers/certification-client/**
- providers/certification-server/**
- providers/gpgpu/**
- providers/resource/**
- providers/sru/**
- providers/tpm2/**
workflow_dispatch:
jobs:
get_path_matrix:
runs-on: ubuntu-latest
outputs:
paths: ${{ steps.paths.outputs.paths }}
steps:
- name: Checkout Checkbox monorepo
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
with:
persist-credentials: false
fetch-depth: 0
- id: paths
run: |
DIFF=$(git diff --name-only origin/main)
changed(){ echo "$DIFF" | grep -o $1; }
paths=()
for path in \
checkbox-ng \
checkbox-support \
providers/base \
providers/certification-client \
providers/certification-server \
providers/gpgpu \
providers/resource \
providers/sru \
providers/tpm2; do
if changed $path; then
paths+=("\"$path\"");
fi;
done
path_array=`echo "["${paths[*]}"]" | sed 's/" "/","/g'`
echo "paths=$path_array" >> $GITHUB_OUTPUT
deb_validation:
needs: get_path_matrix
strategy:
fail-fast: false
matrix:
# Version of Ubuntu
# note: no 16, we don't support debs for 16 anymore
# no 18, not supported by github
os:
- [self-hosted, focal]
- ubuntu-22.04
- ubuntu-24.04
path: ${{ fromJson(needs.get_path_matrix.outputs.paths) }}
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Checkbox monorepo
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
with:
persist-credentials: false
# needed by providers that pull checkbox-support
- name: Install PPA and dependencies
run: |
sudo add-apt-repository ppa:checkbox-dev/edge
sudo apt-get update
sudo apt-get install -qq -y dpkg-dev fakeroot
- name: Prepare installation
env:
MATRIX_PATH: ${{ matrix.path }}
run: mv "$MATRIX_PATH/debian" .
- name: Install dependencies
run: sudo apt-get -qq -y build-dep .
- name: Build source, test and build binary
run: dpkg-buildpackage