GitHub workflow and fixes

This commit is contained in:
Stephen Horvath
2025-03-20 17:17:14 +10:00
parent 754fbd868b
commit c1ec487145
5 changed files with 45 additions and 2 deletions

24
.github/workflows/flatpak.yml vendored Normal file
View File

@@ -0,0 +1,24 @@
name: Flatpak Build
on:
push:
branches: [main]
pull_request:
jobs:
flatpak:
runs-on: ubuntu-latest
container:
image: bilelmoussaoui/flatpak-github-actions:gnome-47
options: --privileged
steps:
- uses: actions/checkout@v4
- uses: flatpak/flatpak-github-actions/flatpak-builder@v6
with:
bundle: yafi-${{ github.sha }}.flatpak
manifest-path: au.stevetech.yafi.json
cache-key: flatpak-builder-${{ github.sha }}
- uses: actions/upload-artifact@v4
with:
name: yafi ${{ github.sha }}
path: yafi-${{ github.sha }}.flatpak

View File

@@ -57,3 +57,16 @@ Pipx is also supported.
### Hardware Info ### Hardware Info
![Hardware Page](docs/4-hardware.png) ![Hardware Page](docs/4-hardware.png)
## Troubleshooting
### `[Errno 13] Permission denied: '/dev/cros_ec'`
This error occurs when the udev rules are not installed or not working. Make sure you have copied the `60-cros_ec_python.rules` file to `/etc/udev/rules.d/` and reloaded the rules with `sudo udevadm control --reload-rules && sudo udevadm trigger`.
### `Could not auto detect device, check you have the required permissions, or specify manually.`
This error occurs when `/dev/cros_ec` is not found, and the `CrOS_EC_Python` library also cannot talk over LPC.
You can either update your kernel to have a working `cros_ec_dev` driver, or run YAFI as root.
It can also occur if you do not have a CrOS EC, like on non Framework laptops.

View File

@@ -0,0 +1,2 @@
from . import main
main()

View File

@@ -95,6 +95,10 @@ class ThermalsPage(Gtk.Box):
self.fan_mode.set_sensitive(False) self.fan_mode.set_sensitive(False)
# Temperature sensors # Temperature sensors
while temp_child := self.temperatures.get_last_child():
self.temperatures.remove(temp_child)
self.temp_items.clear()
try: try:
ec_temp_sensors = ec_commands.thermal.get_temp_sensors(app.cros_ec) ec_temp_sensors = ec_commands.thermal.get_temp_sensors(app.cros_ec)
except ec_exceptions.ECError as e: except ec_exceptions.ECError as e:

View File

@@ -43,5 +43,5 @@ if __name__ == '__main__':
resource = Gio.Resource.load(os.path.join(pkgdatadir, 'yafi.gresource')) resource = Gio.Resource.load(os.path.join(pkgdatadir, 'yafi.gresource'))
resource._register() resource._register()
from yafi import main import yafi
sys.exit(main.main()) sys.exit(yafi.main())