Skip to content

Commit

Permalink
Merge branch 'main' into remove-gtk-from-camera-multiple-resolutions
Browse files Browse the repository at this point in the history
  • Loading branch information
fernando79513 authored Sep 6, 2024
2 parents 6cef7d6 + 0881101 commit 1cf61c5
Show file tree
Hide file tree
Showing 174 changed files with 14,706 additions and 2,825 deletions.
24 changes: 0 additions & 24 deletions .github/workflows/documentation-build-readthedocs.io.yml

This file was deleted.

11 changes: 10 additions & 1 deletion .github/workflows/metabox.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:
run:
working-directory: metabox
needs: metabox_run_required
# use 20.04 as we need xenial containers support => cgroup v1
runs-on: ubuntu-20.04
env:
# Workaround to get loguru colored output
Expand All @@ -61,7 +62,15 @@ jobs:
lxc profile device add default root disk path=/ pool=metabox${{ matrix.os }}
lxc storage list
- name: Install dependencies
run: python3 -m pip install --upgrade pyopenssl pip setuptools
run: |
# Here we pull from pypi because we need a version that supports pyproject.toml
# urllib update is to bypass a req. fail due to dist-packages. Version is pinned
# to <2 because pylxd doesn't currently support >=2
# pyopenssl upgraded is necessary because pylxd doesn't support the old version
# of pyopenssl included in focal
# setuptools is pinned because of an incompatibility with the latest
# version available here of importlib_metada
python3 -m pip install --upgrade pyopenssl pip "setuptools==70.0.0" "urllib3==1.26.19"
- name: Install Metabox
run: python3 -m pip install -e .
- name: Run Metabox scenarios
Expand Down
92 changes: 90 additions & 2 deletions .github/workflows/pr_validation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ on:
pull_request:
types:
- opened
- reopened
- ready_for_review
- synchronize
- edited
jobs:
Expand All @@ -26,3 +24,93 @@ jobs:
echo "e.g. $PR_TITLE (BugFix)"
exit 1
fi
sru_gate:
runs-on: ubuntu-latest
steps:
- name: Checkout Checkbox monorepo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install dependencies, Checkbox and providers
run: |
sudo apt install -y -qq python3 python3-venv jq libsystemd-dev
python3 -m venv venv
. venv/bin/activate
python3 -m pip install checkbox-ng/
python3 -m pip install checkbox-support/
python3 providers/resource/manage.py develop
python3 providers/base/manage.py develop
python3 providers/certification-client/manage.py develop
python3 providers/tpm2/manage.py develop
python3 providers/sru/manage.py develop
- name: Export main sru list
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR: ${{ github.event.pull_request.html_url }}
run: |
export DESCRIPTION=$(gh pr view $PR --json 'body' --jq '.body')
# we are on current branch/commit
. venv/bin/activate
checkbox-cli expand -f json com.canonical.certification::sru-server >> sru_server_testplan_this_branch.json
checkbox-cli expand -f json com.canonical.certification::sru >> sru_testplan_this_branch.json
git checkout origin/main
checkbox-cli expand -f json com.canonical.certification::sru-server >> sru_server_testplan_main.json
checkbox-cli expand -f json com.canonical.certification::sru >> sru_testplan_main.json
# https://stackoverflow.com/a/57795761
# compare two jsons without comparing the order arrays but just
# the content of objects
echo
echo
echo "Difference of com.canonical.certification::sru-server (diff this_branch main)"
# The following line sorts the array of jobs/templates obtained from the pre/post checkout.
# This is done because we want compare the list/content of jobs but not necessarily the order
# that for most jobs is not deterministic either way. The array keys are sorted as well
# as what counts is the content of each key (id, environ, command) and not the order
# the exporter prints them out.
# Taken partially from: https://github.com/jqlang/jq/issues/893
diff \
<(jq -S 'def post_recurse(f): def r: (f | select(. != null) | r), .; r; def post_recurse: post_recurse(.[]?); (. | (post_recurse | arrays) |= sort)' "sru_server_testplan_this_branch.json") \
<(jq -S 'def post_recurse(f): def r: (f | select(. != null) | r), .; r; def post_recurse: post_recurse(.[]?); (. | (post_recurse | arrays) |= sort)' "sru_server_testplan_main.json") | tee sru_server_diff.txt
if [ -s sru_server_diff.txt ]; then
# if the sru_server_diff file is not empty, there is at least one diff (patch) done to it
# require the PR description to contain the bold text highlighting it
if [[ "$DESCRIPTION" == *"## WARNING: This modifies com.canonical.certification::sru-server"* ]]; then
echo "Warning is correcty posted in the description for sru-server"
else
echo "Missing warning for sru modification in the description"
echo "Include the following in your description:"
echo " ## WARNING: This modifies com.canonical.certification::sru-server"
exit 1
fi
else
echo "No diff found"
fi
echo "Difference of com.canonical.certification::sru (diff this_branch main)"
# the following line sorts the array of jobs/templates obtained from the pre/post checkout
# this is done because we want compare the list/content of jobs but not necessarely the order
# that for most jobs is not deterministic either way. The array keys are sorted as well
# as what counts is the content of each key (id, environ, command) and not the order
# the exporter prints them out
# Taken partially from: https://github.com/jqlang/jq/issues/893
diff \
<(jq -S 'def post_recurse(f): def r: (f | select(. != null) | r), .; r; def post_recurse: post_recurse(.[]?); (. | (post_recurse | arrays) |= sort)' "sru_testplan_this_branch.json") \
<(jq -S 'def post_recurse(f): def r: (f | select(. != null) | r), .; r; def post_recurse: post_recurse(.[]?); (. | (post_recurse | arrays) |= sort)' "sru_testplan_main.json") | tee sru_diff.txt
if [ -s sru_diff.txt ]; then
# if the sru_server_diff file is not empty, there is at least one diff (patch) done to it
# require the PR description to contain the bold text highlighting it
if [[ "$DESCRIPTION" == *"## WARNING: This modifies com.canonical.certification::sru"* ]]; then
echo "Warning is correcty posted in the description for sru"
else
echo "Missing warning for sru modification in the description"
echo "Include the following in your description:"
echo " ## WARNING: This modifies com.canonical.certification::sru"
exit 1
fi
else
echo "No diff found"
fi
15 changes: 13 additions & 2 deletions .github/workflows/tox-contrib-provider-ce-oem.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
name: Test provider-ce-oem (from contrib area) with tox

on:
push:
branches: [ main ]
paths:
- contrib/checkbox-ce-oem/checkbox-provider-ce-oem/**
pull_request:
branches: [ main ]
paths:
- contrib/checkbox-ce-oem/checkbox-provider-ce-oem/**
workflow_dispatch:

jobs:
tox_test_contrib_ce_oem_provider:
continue-on-error: true
name: Test ce-oem provider (from contrib area) with tox
defaults:
run:
working-directory: contrib/checkbox-provider-ce-oem
working-directory: contrib/checkbox-ce-oem/checkbox-provider-ce-oem
runs-on: ubuntu-20.04
strategy:
matrix:
Expand Down Expand Up @@ -40,6 +47,10 @@ jobs:
python-version: ${{ matrix.python }}
env:
PIP_TRUSTED_HOST: pypi.python.org pypi.org files.pythonhosted.org
- name: Install libsystemd-dev
run: |
sudo apt-get update
sudo apt-get install -y libsystemd-dev
- name: Install tox
run: pip install tox
- name: Run tox
Expand Down
29 changes: 5 additions & 24 deletions checkbox-core-snap/series16/snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ slots:
package-repositories:
- type: apt
ppa: checkbox-dev/stable
- type: apt
ppa: colin-king/stress-ng

parts:
version-calculator:
Expand Down Expand Up @@ -94,33 +96,12 @@ parts:
- libbsd-dev
after: [version-calculator]
################################################################################
# Upstream: https://kernel.ubuntu.com/git/cking/stress-ng.git/plain/snap/snapcraft.yaml
stress-ng:
source-tag: "V0.15.07"
# stress-ng remains at version 0.15.07 because libipsec-mb-dev and libxxhash-dev are not available for Ubuntu 16.04 (Xenial).
source-depth: 1
plugin: make
build-environment:
- CFLAGS: "-fstack-protector-strong -Wformat -Werror=format-security"
- LDFLAGS: "-Wl,-z,relro -lrt"
source: https://github.com/ColinIanKing/stress-ng.git
make-parameters:
- STATIC=1 VERBOSE=1
plugin: nil
stage-packages:
- libjudydebian1
- libsctp1
- stress-ng
build-packages:
- gcc
- make
- zlib1g-dev
- libbsd-dev
- libgcrypt20-dev
- libkeyutils-dev
- libapparmor-dev
- libaio-dev
- libcap-dev
- libsctp-dev
- libjudy-dev
- stress-ng
after: [fwts]
################################################################################
# Upstream: https://kernel.ubuntu.com/git/cking/snapcraft-snaps.git/tree/acpica/snapcraft.yaml
Expand Down
37 changes: 5 additions & 32 deletions checkbox-core-snap/series18/snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ slots:
package-repositories:
- type: apt
ppa: checkbox-dev/stable
- type: apt
ppa: colin-king/stress-ng

parts:
version-calculator:
Expand Down Expand Up @@ -98,41 +100,12 @@ parts:
- libbsd-dev
after: [version-calculator]
################################################################################
# Upstream: https://kernel.ubuntu.com/git/cking/stress-ng.git/plain/snap/snapcraft.yaml
stress-ng:
source-tag: "V0.15.09"
source-depth: 1
plugin: make
build-environment:
- CFLAGS: "-fstack-protector-strong -Wformat -Werror=format-security"
- LDFLAGS: "-Wl,-z,relro -lrt"
source: https://github.com/ColinIanKing/stress-ng.git
make-parameters:
- STATIC=1 VERBOSE=1
plugin: nil
stage-packages:
- libjpeg-turbo8
- libjudydebian1
- libsctp1
- libxxhash0
- stress-ng
build-packages:
- gcc
- make
- zlib1g-dev
- libbsd-dev
- libgcrypt20-dev
- libkeyutils-dev
- libapparmor-dev
- libaio-dev
- libcap-dev
- libsctp-dev
- libatomic1
- libjudy-dev
- libjpeg-dev
- libkmod-dev
- libattr1-dev
- libxxhash-dev
- libmd-dev
- on amd64: [ libipsec-mb-dev ]
- stress-ng
after: [fwts]
################################################################################
# Upstream: https://kernel.ubuntu.com/git/cking/snapcraft-snaps.git/tree/acpica/snapcraft.yaml
Expand Down
34 changes: 6 additions & 28 deletions checkbox-core-snap/series20/snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ slots:
package-repositories:
- type: apt
ppa: checkbox-dev/stable
- type: apt
ppa: colin-king/stress-ng

parts:
version-calculator:
Expand Down Expand Up @@ -100,36 +102,12 @@ parts:
- libbsd-dev
after: [version-calculator]
################################################################################
# Upstream: https://kernel.ubuntu.com/git/cking/stress-ng.git/plain/snap/snapcraft.yaml
stress-ng:
source-tag: "V0.15.09"
source-depth: 1
plugin: make
build-environment:
- CFLAGS: "-fstack-protector-strong -Wformat -Werror=format-security"
- LDFLAGS: "-Wl,-z,relro -lrt"
source: https://github.com/ColinIanKing/stress-ng.git
make-parameters:
- STATIC=1 VERBOSE=1
plugin: nil
stage-packages:
- stress-ng
build-packages:
- gcc
- make
- zlib1g-dev
- libbsd-dev
- libgcrypt20-dev
- libkeyutils-dev
- libapparmor-dev
- libaio-dev
- libcap-dev
- libsctp-dev
- libatomic1
- libjudy-dev
- libjpeg-dev
- libkmod-dev
- libattr1-dev
- libxxhash-dev
- libmd-dev
- on amd64: [ libipsec-mb-dev ]
- stress-ng
after: [fwts]
################################################################################
# Upstream: https://kernel.ubuntu.com/git/cking/snapcraft-snaps.git/tree/acpica/snapcraft.yaml
Expand Down
34 changes: 6 additions & 28 deletions checkbox-core-snap/series22/snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ slots:
package-repositories:
- type: apt
ppa: checkbox-dev/stable
- type: apt
ppa: colin-king/stress-ng

parts:
version-calculator:
Expand Down Expand Up @@ -104,36 +106,12 @@ parts:
- libbsd-dev
after: [version-calculator]
################################################################################
# Upstream: https://kernel.ubuntu.com/git/cking/stress-ng.git/plain/snap/snapcraft.yaml
stress-ng:
source-tag: "V0.15.09"
source-depth: 1
plugin: make
build-environment:
- CFLAGS: "-fstack-protector-strong -Wformat -Werror=format-security"
- LDFLAGS: "-Wl,-z,relro -lrt"
source: https://github.com/ColinIanKing/stress-ng.git
make-parameters:
- STATIC=1 VERBOSE=1
plugin: nil
stage-packages:
- stress-ng
build-packages:
- gcc
- make
- zlib1g-dev
- libbsd-dev
- libgcrypt20-dev
- libkeyutils-dev
- libapparmor-dev
- libaio-dev
- libcap-dev
- libsctp-dev
- libatomic1
- libjudy-dev
- libjpeg-dev
- libkmod-dev
- libattr1-dev
- libxxhash-dev
- libmd-dev
- on amd64: [ libipsec-mb-dev ]
- stress-ng
after: [fwts]
################################################################################
# Upstream: https://kernel.ubuntu.com/git/cking/snapcraft-snaps.git/tree/acpica/snapcraft.yaml
Expand Down
4 changes: 4 additions & 0 deletions checkbox-core-snap/series24/snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ slots:
read:
- /

package-repositories:
- type: apt
ppa: colin-king/stress-ng

parts:
version-calculator:
plugin: dump
Expand Down
Loading

0 comments on commit 1cf61c5

Please sign in to comment.