Skip to content

Commit

Permalink
New deb daily build workflow (infra) (#878)
Browse files Browse the repository at this point in the history
* New deb daily build workflow

Minor: removed old scripts

* Make file executable and add shebang

* Clone and install dependencies

* Better name for ppa_update

* Better name for ppa_build

* Improved step name

* Missing extension of get_version

* Add export command and update command line args

* Un-split command of lp_update_recipe

* Give up on nice command

* Compatibility with py3.10
  • Loading branch information
Hook25 authored Dec 7, 2023
1 parent 27d1974 commit cab1dc8
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 269 deletions.
58 changes: 51 additions & 7 deletions .github/workflows/deb-daily-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,70 @@ on:
workflow_call:

jobs:
deb_daily_builds:
name: Debian packages daily build
ppa_update:
name: Sync PPA history with monorepo
runs-on: [self-hosted, linux, large]
steps:
- name: Install dependencies
run: |
sudo apt update -qq
sudo apt install -qq -y python3-launchpadlib python3-setuptools-scm
git clone -b main https://git.launchpad.net/~hook25/ppa-dev-tools /tmp/ppa-dev-tools
sudo apt install -qq -y python3-launchpadlib
- name: Checkout checkbox monorepo
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: Wandalen/wretry.action@a163f62ae554a8f3cbe27b23db15b60c0ae2e93c # v1.3.0
name: Import to LP, ask for a build and wait result
name: Make LP pull the monorepo
env:
LP_CREDENTIALS: ${{ secrets.LP_CREDS }}
PYTHONUNBUFFERED: 1
with:
attempt_delay: 600000 # 10min
attempt_delay: 6000 # 1 min
attempt_limit: 60 # max 1 hour of retries
command: |
tools/release/lp-request-import.py "~checkbox-dev/checkbox/+git/checkbox"
ppa_build:
name: Trigger and monitor PPA builds
runs-on: [self-hosted, linux, large]
needs: ppa_update
strategy:
matrix:
recipe:
- checkbox-ng-edge
- checkbox-support-edge
- checkbox-provider-base-edge
- checkbox-provider-resource-edge
- checkbox-provider-certification-server-edge
- checkbox-provider-certification-client-edge
- checkbox-provider-gpgpu-edge
- checkbox-provider-sru-edge
- checkbox-provider-tpm2-edge
steps:
- name: Install dependencies
run: |
sudo apt update -qq
sudo apt install -qq -y python3-launchpadlib
- name: Checkout checkbox monorepo
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: Wandalen/wretry.action@a163f62ae554a8f3cbe27b23db15b60c0ae2e93c # v1.3.0
name: Update the recipe in the checkbox PPA
env:
LP_CREDENTIALS: ${{ secrets.LP_CREDS }}
PYTHONUNBUFFERED: 1
with:
attempt_delay: 6000 # 1 min
attempt_limit: 60 # max 1 hour of retries
command: |
tools/release/lp_update_recipe.py checkbox --recipe ${{ matrix.recipe }} --new-version $(tools/release/get_version.py --dev-suffix --output-format deb) --revision $GITHUB_SHA
- uses: Wandalen/wretry.action@a163f62ae554a8f3cbe27b23db15b60c0ae2e93c # v1.3.0
name: Build and wait result
env:
LP_CREDENTIALS: ${{ secrets.LP_CREDS }}
PYTHONUNBUFFERED: 1
with:
attempt_delay: 60000 # 10min
attempt_limit: 3
command: |
tools/release/deb_daily_builds.py
tools/release/lp_build_monitor_recipe.py checkbox ${{ matrix.recipe }}
129 changes: 0 additions & 129 deletions tools/release/deb_daily_builds.py

This file was deleted.

132 changes: 0 additions & 132 deletions tools/release/lp-recipe-update-build.py

This file was deleted.

1 change: 1 addition & 0 deletions tools/release/lp_build_monitor_recipe.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env python3
import sys
import time
import argparse
Expand Down
2 changes: 1 addition & 1 deletion tools/release/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ def get_build_recipe(project_name: str, recipe_name: str):
)

def get_date_utc_now():
return datetime.datetime.now(tz=datetime.UTC)
return datetime.datetime.now(tz=datetime.timezone.utc)

0 comments on commit cab1dc8

Please sign in to comment.