111 Commits

Author SHA1 Message Date
Jan Čermák
b55e6c22c2
Do not use working-directory in test job (#2858) 2023-10-23 18:15:10 +02:00
Jan Čermák
e928fa498f
Use alternative environment for release build bump (#2855)
* Use alternative environment for release build bump

By using a separate environment, we can postpone the bump in the version
repository by adding a requirement for approval. Dev version will use
default (empty string) environment which doesn't have any constraints.

* Update build step name - it's not always dev build anymore

* Use dynamic environment name for beta/stable channels
2023-10-23 12:34:11 +02:00
Jan Čermák
caf6611f7d
Fix extraction of OVA image artifact in test step (#2842)
* Fix extraction of OVA image artifact in test step

If the test image is obtained from an artifact instead of downloading,
its name contains the version as well, in that case we still need to use
wildcard expansion.

* uncompress qcow2 to a stable filename
2023-10-19 22:58:00 +02:00
Jan Čermák
d7b32fd100
Fix path to test results in processing steps (#2837)
Working-directory is relevant only for run steps, the other steps need
full path relative to the repository root.
2023-10-18 11:31:23 +02:00
Jan Čermák
d4cb408090
Fix test action by checking out source first (#2836)
The first action can't be action with simple run step, because it is
respecting the working-directory already. Put checkout step to the top.
2023-10-17 23:43:50 +02:00
Jan Čermák
3e36628c09
Create foundation for Labgrid-based OS tests (#2812)
* Create foundation for Labgrid-based OS tests

Add foundation for Labgrid-based tests of OS builds. Currently uses just
the QEMU driver, which starts a virtual machine with pristine OS, and
generates few log reports which are saved as build artifacts.

Workflow is currently triggered either manually by specifying an OS
version, or by OS build job, which now saves an artifact of the OVA
image. This allows for some modularity. If we eventually add the
possibility to run builds on PRs, we could also add the workflow_call
trigger and turn the workflow into a reusable one.

TBD (in future PRs): some meaningful tests and possibility to test on
real hardware (either local or distributed).

* Apply suggestions from @agners

Co-authored-by: Stefan Agner <stefan@agner.ch>

* Wrap test command in a script, create venv for local tests

* Make shellcheck happy

---------

Co-authored-by: Stefan Agner <stefan@agner.ch>
2023-10-17 18:23:29 +02:00
Stefan Agner
7845199fa8
Add Home Assistant Green to GitHub infrastructure (#2828)
Add Home Assistant Green to the issue template and release drafter
configuration.
2023-10-16 14:32:36 +02:00
Stefan Agner
19ded665bd
Drop uploading to the old development build server (#2802)
With the new development build uploads on R2 working, we no longer need
to upload development builds to the old server. Drop the build step.
2023-10-10 13:51:33 +02:00
Joakim Sørensen
a72c6c0322
Add action job to upload artifacts to R2 (#2779) 2023-10-02 08:29:00 +02:00
Stefan Agner
dd21a73031
Fix versioning set during build (#2771)
Respect quotes in the meta file. While at it, simplify version
validation as well.

Make sure development version is correctly set at build time.

While at it also simplify version check.
2023-09-25 18:32:57 +02:00
Stefan Agner
3df2749171
Adjust Home Assistant OS versioning to prepare for new release strategy (#2767)
* Adjust Home Assistant versioning to prepare for new release strategy

With OS 11 we'll create rc pre-releases which will get directly pushed
to the beta channel. In contrast, release builds will get directly
pushed to the stable channel.

Similar to Home Assistant Core we'll create bump commits for all stable
and beta releases. This makes sure that the source code matches the
built binaries for all releases.

The development build will get a generated version. To avoid issues
with the new rc builds the dev build version will get injected on source
level now.

* Apply suggestions from code review
2023-09-25 13:41:50 +02:00
Stefan Agner
8d6b4eb11b
Unify release and dev GitHub actions (#2764)
Use a single workflow file for releases and dev builds. This avoids
duplication and enhances the release builds with some of the recent
improvements (e.g. shared build container).
2023-09-21 17:06:41 +02:00
dependabot[bot]
8d8327801f
Bump docker/login-action from 2.2.0 to 3.0.0 (#2757)
Bumps [docker/login-action](https://github.com/docker/login-action) from 2.2.0 to 3.0.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v2.2.0...v3.0.0)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-19 10:02:18 +02:00
dependabot[bot]
b7e958d498
Bump docker/build-push-action from 4.2.1 to 5.0.0 (#2758)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 4.2.1 to 5.0.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v4.2.1...v5.0.0)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-19 09:56:34 +02:00
dependabot[bot]
3e173ca77e
Bump docker/setup-buildx-action from 2.10.0 to 3.0.0 (#2759)
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2.10.0 to 3.0.0.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v2.10.0...v3.0.0)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-19 09:55:24 +02:00
dependabot[bot]
3d7a17c59f
Bump docker/build-push-action from 4.1.1 to 4.2.1 (#2748)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 4.1.1 to 4.2.1.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v4.1.1...v4.2.1)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-11 22:35:32 +02:00
Stefan Agner
bf327c968a
Don't combine GitHub action caches (#2745)
It turns out that the way concurrency works in GitHub action doesn't
allow to queue up multiple pending jobs. As soon as a second job gets
pending, the previous pending jobs get cancelled. So this does not allow
to sequentially run all cache combine jobs as we hoped for.

Let's use a single download cache and per board build cache for now.
2023-09-08 08:16:21 +02:00
Stefan Agner
25545b609e
Combine downloads and compile cache in GitHub Action cache (#2743)
This combines all caches in a single cache to save space (assumption is
that quite some files are duplicated otherwise). With this we shouold
end up with 4 relevant cache files (build cache for each architecture
plus download cache).
2023-09-08 00:14:08 +02:00
Stefan Agner
52a455c6ca
Execute stale workflow only once a day (#2739) 2023-09-07 08:59:25 +02:00
Stefan Agner
41c3b6565d
Improve GitHub Action caching (#2732)
Use more specific keys for GitHub Action caches to make sure we update
caches regularly. Also add board id to the downloads cache to get a
more specific cache file. This avoid redownloading large dependencies
of some boards.
2023-09-05 21:44:11 +02:00
dependabot[bot]
516cb71df9
Bump actions/checkout from 3 to 4 (#2728)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-04 23:14:03 +02:00
dependabot[bot]
76903af864
Bump docker/login-action from 2.1.0 to 2.2.0 (#2727)
Bumps [docker/login-action](https://github.com/docker/login-action) from 2.1.0 to 2.2.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v2.1.0...v2.2.0)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-04 23:13:56 +02:00
Viacheslav Bocharov
2756709f4a
Remove checkout twice in dev build workflow (#2719) 2023-09-01 10:12:54 +02:00
Stefan Agner
111eebfb49
GitHub action improvements and cleanup (#2710)
* Determine git reference in prepare step

We can determin the git reference used once in the prepare step.

* Build HAOS builder in prepare step

Instead of building the build container multiple times, simply build it
once in the prepare step. This saves some GitHub Runner time (as we only
need to create the builder once).

* Drop per PR builds

Drop the per PR builds which are based on pull_request_target. These
make things more complicated with the recent changes requiring two
deployment approvals since we use the environment in for the prepare
and build job now. It will also interfere with future expansions.

We should consider readding the feature using `pull_request` and
subsequent `workflow_run` trigger, as suggested by
https://securitylab.github.com/research/github-actions-preventing-pwn-requests/.

* Simplify board filter
2023-08-29 18:30:28 +02:00
Stefan Agner
e8da915a46
Add board support (#2687)
* Initial commit of Home Assistant Green board support

* Add Home Assistant Green boot files

* HA Green board configs

* board/nabucasa: Unsupport rtc rk808

* Use odroid-m1 as Supervisor machine for now

* Green: linux: pmic: set set PWRON_LP_OFF_TIME 12s

* green: Update U-Boot to 2023.07.02

* green: supports usb boot

* green: uboot-boot.ush use rk3566-ha-green.dtb

* green: spinor supports uboot

* green: use U-Boot provided devtype as boot device type

* green: Fix polarity of power key

The power key is low active. Add patch to avoid accidential long press
being reported to user space.

* green: uboot: eeprom: add CONFIG_ENV_OVERWRITE

* green: uboot: eerprom: add mac read

* green: fix-cpufreq null issue

* green: board aliases ethernet0

* green: uboot mac set ethernet0

* green: uboot add serial-number read

* green: Update kernel 6.1.39

* green: add green to the build matrix

* green: fix 339d13 & 9b9416 can not boot from usb

* green: changfe sd mode, change led default state

* green: uboot add board.c to read eeprom info

* green: enable uboot to read eeprom info

* green: delete boot.scr read eeprom function

* green: change spl loader uboot order:sd-emmc-spi_nor

* green: serialnum change to 18 bytes

* green: Update kernel 6.1.43

* green: use hwrng support from ODROID-M1

* green: Use latest Rockchip BL31/DDR binaries

* change led_act polarity

* green: Disable watchdog

The watchdog on Green seems to not reliably reset the system. For now
disable the driver to avoid systemd making use of it.

* green: Update kernel 6.1.44

* green: Fix Supervisor Machine

Use odroid-m1 for now as Supervisor machine (used to download the
landing page).

* green: emmc use hs200 to increase speed

* green: use green as Supervisor machine

* green: Update kernel 6.1.45

* green: add Green to the kernel documentation

---------

Co-authored-by: Zhangqun Ming <north_sea@qq.com>
Co-authored-by: syan <syan.cham@gmail.com>
2023-08-14 16:55:16 +02:00
Stefan Agner
f0015ba645
Support partial dev builds via Workflow dispatch (#2664) 2023-08-03 15:10:48 +02:00
Stefan Agner
1f7185c913
Allow dev builds in forks (#2651)
Do not try to bump Home Assistant OS dev channel version in forks. This
allows to use the dev pipeline in forks.
2023-07-21 12:03:56 +02:00
Stefan Agner
51e3d0b875
Close rejected issus as "not planned" (#2641) 2023-07-12 15:06:48 +02:00
Stefan Agner
d662cfde9e
Use hosted GitHub Action runners (#2638)
* Use hosted GitHub Action runners

Instead of using self-hosted runners use the hosted GitHub Action
runners. Officially the GitHub Action runners have a maximum of 14GB
free space available. However, a single Home Assistant OS build requires
up to 23GB (the ova board seems to require most because of the various
output image formats).

This PR adds some tricks to make use of the GitHub hosted GitHub Action
runners still, namely:
- Build and download cache is stored on /mnt which offers an additional
  10GB of disk space
- Some tools/SDKs on the runner get removed from the root disk to free
  up some disk space.

Other than that building on the hosted GitHub Action runners seems
straight forward. The build time is significantly longer (from ~30
minutes on the current AMD Ryzen 7950X build machine to 1 hours 30
minutes even with cache). But since we can build all boards in parallel
now, the overall build time will likely be shorted.

* Remove top-level release directory

The top-level release directory adds another copy of the images. This is
unnecessary for our release process now. Save the additional space and
time requirement. It comes with a slight downside for developers, but
also helps to save disk space on dev machines.
2023-07-11 23:18:01 +02:00
Stefan Agner
9f5b9f8afe
Use maintained GitHub Action to upload release assets (#2635)
The chosen GitHub action sets MIME types correctly and allows glob
uploads. Also upload directly from the output directory. This way we can
remove the unnecessary copy to the release directory in the future.
2023-07-11 14:25:51 +02:00
dependabot[bot]
ad29aee1de
Bump dessant/label-actions from 3.0.0 to 3.1.0 (#2590)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-12 21:39:04 +02:00
Stefan Agner
f9484851a1
Add label action for frontend issues (#2464) 2023-04-12 22:01:01 +02:00
dependabot[bot]
b88deef758
Bump actions/stale from 7.0.0 to 8.0.0 (#2447)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-03 16:37:06 +02:00
Stefan Agner
b0d9496595
Add ODROID-M1 support (#2387)
* Add ODROID-M1 board support

* Add Rockchip kernel config for ODROID-M1

Kernel defconfig for Rockchip is based on Armbian kernel defconfig
from config/kernel/linux-rk3568-odroid-edge.config (git hash
95c829f9e664).

* Add U-Boot/Kernel patches

* Add Rockchip blob support

Add package which provides Rockchip TPL and ATF firmware binaries.

* Use latest U-Boot for ODROID-M1

* Fix Rockchip blob support

* Update defconfig

* Use GPT by default

* Create uboot partition to support non-recovery boot

* Enable eMMC boot in U-Boot SPL

* Drop unnecessary mmc device selection

Distro boot already activates the right mmc device. The extra selection
seems to actually cause problems for eMMC boot.

* Make sure driver for eMMC is built-in

* Use odroid-m1 as Supervisor machine

* Add ODROID-M1 to CI pipeline and issue template

* Bump to Linux 6.1.16
2023-03-10 19:44:50 +01:00
Stefan Agner
448c85788c
Add label action for new features (#2388) 2023-03-07 08:21:08 +01:00
Stefan Agner
7806f973bb
Bump buildroot to 2023.02-rc2 (#2374)
* Update config for Buildroot 2023.02

* Use Buildroot's version of the rtl8821cu package

Buildroot provides a newer driver for the RTL8821CU based chipsets
provided by https://github.com/morrownr/8821cu-20210118.

* Pass argument when verifying partition table

This also avoids running into a segmentation fault in the current
version of sgdisk.

* Remove obsolte GRUB2/NetworkManager patches

* Bump buildroot

* buildroot 90aa1a6daa...4832525e6c (4596):
  > package/runc: add support for CGroup device permission updates
  > package/network-manager: fix build with -Dmodem_manager=false
  > package/dbus-broker: bump to release 33
  > package/iptables: Allow to use iptables with nf_tables backend
  > package/brcmfmac_sdio-firmware-rpi: bump to latest version
  > package/linux-firmware: Deploy fewer Intel WiFi 22000 series variants
  > package/linux-firmware: Add more Intel WiFi 22000 series variants
  > package/linux-firmware: Add Broadcom BNX2 firmware
  > package/rpi-firmware: bump version to 1.20230106
  > Update for 2023.02-rc2

* Use Ubuntu 22.04 for CI checks

* Bump xe-guest-utilities to 7.33.0

* Remove unnecessary shellcheck ignore for xe-guest-utilities

* Address new buildroot check-packages issues
2023-03-01 00:36:32 +01:00
dependabot[bot]
e3c92638b3
Bump ludeeus/action-shellcheck from 1.1.0 to 2.0.0 (#2331)
Bumps [ludeeus/action-shellcheck](https://github.com/ludeeus/action-shellcheck) from 1.1.0 to 2.0.0.
- [Release notes](https://github.com/ludeeus/action-shellcheck/releases)
- [Commits](https://github.com/ludeeus/action-shellcheck/compare/1.1.0...2.0.0)

---
updated-dependencies:
- dependency-name: ludeeus/action-shellcheck
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-30 15:43:05 +01:00
dependabot[bot]
18dfd059a0
Bump actions/stale from 6.0.1 to 7.0.0 (#2289)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-27 08:52:17 +01:00
dependabot[bot]
ab8fb12972
Bump dessant/label-actions from 2 to 3 (#2263)
* Bump dessant/label-actions from 2 to 3

Bumps [dessant/label-actions](https://github.com/dessant/label-actions) from 2 to 3.
- [Release notes](https://github.com/dessant/label-actions/releases)
- [Changelog](https://github.com/dessant/label-actions/blob/master/CHANGELOG.md)
- [Commits](https://github.com/dessant/label-actions/compare/v2...v3)

---
updated-dependencies:
- dependency-name: dessant/label-actions
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Pin more strictly

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2022-12-14 22:30:23 +01:00
Stefan Agner
f1ffc301c8
Enable release drafter on dev branch (#2252) 2022-11-30 12:22:37 +01:00
Stefan Agner
3d763f1d77
Replace set-output commands with GITHUB_OUTPUT environment vars (#2192)
The set-output commands via stdout are deprecated. Use the GITHUB_OUTPUT
environment variable as suggested by GitHub.
2022-10-17 14:32:41 +02:00
Mike Degatano
566d6d775e
Update outdated ui references in issue template (#2175)
* Update outdated ui references in issue template

* Mention top right menu

* Remove health

* Remove health and fix directions

Co-authored-by: Stefan Agner <stefan@agner.ch>
2022-10-13 22:55:30 +02:00
dependabot[bot]
e5e0f99d52
Bump actions/stale from 6.0.0 to 6.0.1 (#2179)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-10 16:42:00 +02:00
dependabot[bot]
a82edf718b
Bump actions/stale from 5 to 6.0.0 (#2158)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2022-09-26 19:20:13 +02:00
Stefan Agner
fbbc0075ea
Remove dev from release drafter (#2107)
It seems not to work as intended.
2022-09-02 23:27:40 +02:00
Stefan Agner
86cee444be
Allow to select generic-aarch64 and yellow in issue template (#2023) 2022-07-18 13:45:52 +02:00
Vedran Pavic
cbb0e5b4b9
Fix issue template link for developer documentation issues (#2018) 2022-07-13 21:23:52 +02:00
Stefan Agner
d9beee93ed
Set restrictive GitHub Action permissions (#1985)
* chore: Set permissions for GitHub actions

Restrict the GitHub token permissions only to the required ones; this way, even if the attackers will succeed in compromising your workflow, they won’t be able to do much.

* Remove global permissions which are set implicitly

With restrictive settings in the global GitHub Action permission settings
those permissions are given implicitly.

Co-authored-by: neilnaveen <42328488+neilnaveen@users.noreply.github.com>
Co-authored-by: Joakim Sørensen <hi@ludeeus.dev>
Co-authored-by: Stefan Agner <stefan@agner.ch>
2022-06-24 09:46:02 -07:00
dependabot[bot]
b1a2e6ee17
Bump burnett01/rsync-deployments from 4.1 to 5.2 (#1956)
Bumps [burnett01/rsync-deployments](https://github.com/burnett01/rsync-deployments) from 4.1 to 5.2.
- [Release notes](https://github.com/burnett01/rsync-deployments/releases)
- [Commits](https://github.com/burnett01/rsync-deployments/compare/4.1...5.2)

---
updated-dependencies:
- dependency-name: burnett01/rsync-deployments
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-01 15:46:14 +02:00
dependabot[bot]
5d94321807
Bump brpaz/hadolint-action from 1.1.0 to 1.5.0 (#1955)
Bumps [brpaz/hadolint-action](https://github.com/brpaz/hadolint-action) from 1.1.0 to 1.5.0.
- [Release notes](https://github.com/brpaz/hadolint-action/releases)
- [Changelog](https://github.com/brpaz/hadolint-action/blob/master/.releaserc)
- [Commits](https://github.com/brpaz/hadolint-action/compare/v1.1.0...v1.5.0)

---
updated-dependencies:
- dependency-name: brpaz/hadolint-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-01 14:33:52 +02:00