linux-kernel-manager 0.1.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- linux_kernel_manager-0.1.2/.github/pull_request_template.md +73 -0
- linux_kernel_manager-0.1.2/.github/workflows/appimage.yml +62 -0
- linux_kernel_manager-0.1.2/.github/workflows/ci.yml +139 -0
- linux_kernel_manager-0.1.2/.github/workflows/flatpak.yml +79 -0
- linux_kernel_manager-0.1.2/.github/workflows/publish.yml +85 -0
- linux_kernel_manager-0.1.2/.gitignore +33 -0
- linux_kernel_manager-0.1.2/LICENSE +675 -0
- linux_kernel_manager-0.1.2/PKG-INFO +271 -0
- linux_kernel_manager-0.1.2/README.md +230 -0
- linux_kernel_manager-0.1.2/lkm/__init__.py +2 -0
- linux_kernel_manager-0.1.2/lkm/cli/__init__.py +0 -0
- linux_kernel_manager-0.1.2/lkm/cli/main.py +332 -0
- linux_kernel_manager-0.1.2/lkm/cli/output.py +57 -0
- linux_kernel_manager-0.1.2/lkm/core/__init__.py +0 -0
- linux_kernel_manager-0.1.2/lkm/core/backends/__init__.py +54 -0
- linux_kernel_manager-0.1.2/lkm/core/backends/apk.py +46 -0
- linux_kernel_manager-0.1.2/lkm/core/backends/apt.py +77 -0
- linux_kernel_manager-0.1.2/lkm/core/backends/base.py +81 -0
- linux_kernel_manager-0.1.2/lkm/core/backends/dnf.py +44 -0
- linux_kernel_manager-0.1.2/lkm/core/backends/nix.py +195 -0
- linux_kernel_manager-0.1.2/lkm/core/backends/pacman.py +78 -0
- linux_kernel_manager-0.1.2/lkm/core/backends/portage.py +107 -0
- linux_kernel_manager-0.1.2/lkm/core/backends/xbps.py +139 -0
- linux_kernel_manager-0.1.2/lkm/core/backends/zypper.py +44 -0
- linux_kernel_manager-0.1.2/lkm/core/kernel.py +95 -0
- linux_kernel_manager-0.1.2/lkm/core/manager.py +243 -0
- linux_kernel_manager-0.1.2/lkm/core/providers/__init__.py +62 -0
- linux_kernel_manager-0.1.2/lkm/core/providers/base.py +88 -0
- linux_kernel_manager-0.1.2/lkm/core/providers/distro.py +139 -0
- linux_kernel_manager-0.1.2/lkm/core/providers/gentoo.py +68 -0
- linux_kernel_manager-0.1.2/lkm/core/providers/liquorix.py +80 -0
- linux_kernel_manager-0.1.2/lkm/core/providers/lkf_build.py +355 -0
- linux_kernel_manager-0.1.2/lkm/core/providers/local_file.py +104 -0
- linux_kernel_manager-0.1.2/lkm/core/providers/mainline.py +106 -0
- linux_kernel_manager-0.1.2/lkm/core/providers/nixos.py +76 -0
- linux_kernel_manager-0.1.2/lkm/core/providers/void.py +69 -0
- linux_kernel_manager-0.1.2/lkm/core/providers/xanmod.py +81 -0
- linux_kernel_manager-0.1.2/lkm/core/system.py +235 -0
- linux_kernel_manager-0.1.2/lkm/gui/__init__.py +0 -0
- linux_kernel_manager-0.1.2/lkm/gui/app.py +94 -0
- linux_kernel_manager-0.1.2/lkm/gui/kernel_model.py +98 -0
- linux_kernel_manager-0.1.2/lkm/gui/main_window.py +385 -0
- linux_kernel_manager-0.1.2/lkm/gui/widgets/__init__.py +0 -0
- linux_kernel_manager-0.1.2/lkm/gui/widgets/gentoo_compile_dialog.py +132 -0
- linux_kernel_manager-0.1.2/lkm/gui/widgets/kernel_view.py +121 -0
- linux_kernel_manager-0.1.2/lkm/gui/widgets/lkf_build_dialog.py +370 -0
- linux_kernel_manager-0.1.2/lkm/gui/widgets/log_panel.py +78 -0
- linux_kernel_manager-0.1.2/lkm/gui/widgets/note_dialog.py +38 -0
- linux_kernel_manager-0.1.2/lkm/qt.py +122 -0
- linux_kernel_manager-0.1.2/pkg/appimage/build-appimage.sh +121 -0
- linux_kernel_manager-0.1.2/pkg/aur/.SRCINFO +23 -0
- linux_kernel_manager-0.1.2/pkg/aur/PKGBUILD +57 -0
- linux_kernel_manager-0.1.2/pkg/aur/PKGBUILD-git +61 -0
- linux_kernel_manager-0.1.2/pkg/debian/changelog +10 -0
- linux_kernel_manager-0.1.2/pkg/debian/compat +1 -0
- linux_kernel_manager-0.1.2/pkg/debian/control +39 -0
- linux_kernel_manager-0.1.2/pkg/debian/copyright +17 -0
- linux_kernel_manager-0.1.2/pkg/debian/rules +19 -0
- linux_kernel_manager-0.1.2/pkg/flatpak/io.github.lkm.lkm.desktop +11 -0
- linux_kernel_manager-0.1.2/pkg/flatpak/io.github.lkm.lkm.metainfo.xml +43 -0
- linux_kernel_manager-0.1.2/pkg/flatpak/io.github.lkm.lkm.svg +5 -0
- linux_kernel_manager-0.1.2/pkg/flatpak/io.github.lkm.lkm.yml +196 -0
- linux_kernel_manager-0.1.2/pkg/rpm/lkm.spec +71 -0
- linux_kernel_manager-0.1.2/profiles/embedded.toml +39 -0
- linux_kernel_manager-0.1.2/profiles/gaming.toml +36 -0
- linux_kernel_manager-0.1.2/profiles/hardened.toml +52 -0
- linux_kernel_manager-0.1.2/profiles/server.toml +36 -0
- linux_kernel_manager-0.1.2/pyproject.toml +81 -0
- linux_kernel_manager-0.1.2/tests/__init__.py +0 -0
- linux_kernel_manager-0.1.2/tests/test_backends.py +332 -0
- linux_kernel_manager-0.1.2/tests/test_kernel_version.py +59 -0
- linux_kernel_manager-0.1.2/tests/test_lkf_bridge.py +281 -0
- linux_kernel_manager-0.1.2/tests/test_local_file_provider.py +98 -0
- linux_kernel_manager-0.1.2/tests/test_system_detection.py +144 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
## Summary
|
|
2
|
+
|
|
3
|
+
Merges [lkf](https://github.com/Interested-Deving-1896/lkf) (Linux Kernel Framework — shell build pipeline) and [ukm](https://github.com/Interested-Deving-1896/ukm) (Universal Kernel Manager — Python runtime management) into a single Python package, `lkm`, covering the full kernel lifecycle: **build → install → manage**.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## What changed
|
|
8
|
+
|
|
9
|
+
### A — lkf → ukm handoff
|
|
10
|
+
- `lkm/core/providers/lkf_build.py`: discovers `remix.toml` profiles from the lkf installation, drives `lkf remix` / `lkf build` as a subprocess with live streaming output, locates the output package by extension, and installs it via the system backend.
|
|
11
|
+
- `lkm/core/providers/local_file.py`: installs pre-built `.deb`/`.rpm`/`.pkg.tar.zst`/`.apk`/`.xbps` files dropped in by the user or produced by lkf.
|
|
12
|
+
|
|
13
|
+
The full CLI pipeline:
|
|
14
|
+
```sh
|
|
15
|
+
lkm build --version 6.12 --flavor tkg --llvm --lto thin --install
|
|
16
|
+
lkm remix --file ~/.local/share/lkf/profiles/gaming.toml --install
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### B — New backends (distro/arch agnosticism)
|
|
20
|
+
| Backend | Distro | Notes |
|
|
21
|
+
|---|---|---|
|
|
22
|
+
| `xbps.py` | Void Linux | install/remove via `xbps-install`/`xbps-remove`; hold/unhold via `xbps-pkgdb -m hold/unhold`; local `.xbps` via `-R <repodir>` |
|
|
23
|
+
| `nix.py` | NixOS | emits `boot.kernelPackages` snippets + optional `nixos-rebuild switch`; hold/unhold explains declarative pinning |
|
|
24
|
+
|
|
25
|
+
`system.py` extended: `VOID`/`NIXOS` added to `DistroFamily` and `PackageManagerKind`; `in_nix_shell` field added to `SystemInfo`.
|
|
26
|
+
|
|
27
|
+
### C — Unified project
|
|
28
|
+
- Single `pyproject.toml` with `lkm` (CLI) and `lkm-gui` (Qt GUI) entry points.
|
|
29
|
+
- `KernelFamily` gains `LKF_BUILD` for locally compiled kernels.
|
|
30
|
+
- `KernelManager` gains `lkf_provider`, `install_local()`, and `nixos_build_warning()`.
|
|
31
|
+
- `providers/__init__.py` selects family-specific providers (Gentoo, Void, NixOS) at runtime.
|
|
32
|
+
|
|
33
|
+
### D — GUI Build tab
|
|
34
|
+
`lkm/gui/widgets/lkf_build_dialog.py` — two modes:
|
|
35
|
+
- **Profile**: pick a `remix.toml` from discovered profiles (or browse), run `lkf remix`, stream output live.
|
|
36
|
+
- **Custom**: version + flavor + arch + LLVM/LTO/output-format fields, run `lkf build`.
|
|
37
|
+
|
|
38
|
+
A `_BuildWorker(QThread)` streams output into the shared `LogPanel`. On success, `build_succeeded(pkg_path)` is emitted; the main window offers to install the result. The toolbar **Build…** button is disabled with a tooltip when lkf is not on PATH.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Tests
|
|
43
|
+
|
|
44
|
+
97 tests, all passing:
|
|
45
|
+
|
|
46
|
+
| Suite | Coverage |
|
|
47
|
+
|---|---|
|
|
48
|
+
| `test_kernel_version.py` | `KernelVersion` parse, comparison, sort, hash |
|
|
49
|
+
| `test_system_detection.py` | distro family detection for 10 distros, arch normalisation (9 mappings), PM detection (8 binaries + family fallback) |
|
|
50
|
+
| `test_backends.py` | `XbpsBackend` (13 cases), `NixBackend` (11 cases) |
|
|
51
|
+
| `test_lkf_bridge.py` | profile parsing, output package discovery, availability, listing, streaming, error handling, full build+install pipeline |
|
|
52
|
+
| `test_local_file_provider.py` | version extraction from 4 package formats, install delegation, error cases |
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Known limitations
|
|
57
|
+
|
|
58
|
+
- **NixOS install** runs `nixos-rebuild switch` but does not edit `configuration.nix`. A full implementation requires knowing whether the user is on channels or flakes.
|
|
59
|
+
- **lkf root detection** falls back to `lkf info --json`, which requires lkf ≥ 0.1.0. Older installs still work via `LKF_ROOT` env var or standard path detection.
|
|
60
|
+
- `lkm/build/` is scaffolded but empty — reserved for vendoring lkf's shell scripts if desired.
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Distro coverage (against fresh-eggs support matrix)
|
|
65
|
+
|
|
66
|
+
All package manager backends from ukm are retained. The two new backends close the remaining gaps:
|
|
67
|
+
|
|
68
|
+
| Added | Distro | Package manager |
|
|
69
|
+
|---|---|---|
|
|
70
|
+
| ✅ | Void Linux | xbps |
|
|
71
|
+
| ✅ | NixOS | nix / nixos-rebuild |
|
|
72
|
+
|
|
73
|
+
Unsupported distros (Slackware, Mandrake-based, non-Linux) remain out of scope.
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
name: AppImage
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*'
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
build:
|
|
11
|
+
name: Build AppImage (${{ matrix.arch }})
|
|
12
|
+
runs-on: ${{ matrix.runner }}
|
|
13
|
+
strategy:
|
|
14
|
+
matrix:
|
|
15
|
+
include:
|
|
16
|
+
- arch: x86_64
|
|
17
|
+
runner: ubuntu-22.04
|
|
18
|
+
- arch: aarch64
|
|
19
|
+
runner: ubuntu-22.04-arm
|
|
20
|
+
|
|
21
|
+
steps:
|
|
22
|
+
- uses: actions/checkout@v4
|
|
23
|
+
|
|
24
|
+
- name: Install system dependencies
|
|
25
|
+
run: |
|
|
26
|
+
sudo apt-get update -qq
|
|
27
|
+
sudo apt-get install -y --no-install-recommends \
|
|
28
|
+
wget libfuse2 imagemagick python3-pip
|
|
29
|
+
|
|
30
|
+
- name: Build AppImage
|
|
31
|
+
env:
|
|
32
|
+
ARCH: ${{ matrix.arch }}
|
|
33
|
+
OUT_DIR: ${{ github.workspace }}/dist
|
|
34
|
+
run: bash pkg/appimage/build-appimage.sh
|
|
35
|
+
|
|
36
|
+
- name: Upload artifact
|
|
37
|
+
uses: actions/upload-artifact@v4
|
|
38
|
+
with:
|
|
39
|
+
name: LKM-AppImage-${{ matrix.arch }}
|
|
40
|
+
path: dist/LKM-*.AppImage
|
|
41
|
+
if-no-files-found: error
|
|
42
|
+
|
|
43
|
+
release:
|
|
44
|
+
name: Attach to GitHub Release
|
|
45
|
+
needs: build
|
|
46
|
+
runs-on: ubuntu-latest
|
|
47
|
+
if: startsWith(github.ref, 'refs/tags/')
|
|
48
|
+
permissions:
|
|
49
|
+
contents: write
|
|
50
|
+
|
|
51
|
+
steps:
|
|
52
|
+
- name: Download artifacts
|
|
53
|
+
uses: actions/download-artifact@v4
|
|
54
|
+
with:
|
|
55
|
+
pattern: LKM-AppImage-*
|
|
56
|
+
merge-multiple: true
|
|
57
|
+
path: dist/
|
|
58
|
+
|
|
59
|
+
- name: Upload to release
|
|
60
|
+
uses: softprops/action-gh-release@v2
|
|
61
|
+
with:
|
|
62
|
+
files: dist/LKM-*.AppImage
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: ["main", "feat/**", "fix/**"]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: ["main"]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
test:
|
|
11
|
+
name: pytest / Python ${{ matrix.python }} / ${{ matrix.os }}
|
|
12
|
+
runs-on: ${{ matrix.os }}
|
|
13
|
+
strategy:
|
|
14
|
+
fail-fast: false
|
|
15
|
+
matrix:
|
|
16
|
+
os: [ubuntu-latest, ubuntu-22.04]
|
|
17
|
+
python: ["3.11", "3.12"]
|
|
18
|
+
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@v4
|
|
21
|
+
|
|
22
|
+
- uses: actions/setup-python@v5
|
|
23
|
+
with:
|
|
24
|
+
python-version: ${{ matrix.python }}
|
|
25
|
+
cache: pip
|
|
26
|
+
|
|
27
|
+
- name: Install
|
|
28
|
+
run: pip install -e ".[dev]"
|
|
29
|
+
|
|
30
|
+
- name: Lint (ruff)
|
|
31
|
+
run: ruff check lkm/
|
|
32
|
+
|
|
33
|
+
- name: Test
|
|
34
|
+
run: pytest --tb=short --cov=lkm --cov-report=term-missing
|
|
35
|
+
|
|
36
|
+
- name: Upload coverage
|
|
37
|
+
if: matrix.python == '3.12' && matrix.os == 'ubuntu-latest'
|
|
38
|
+
uses: actions/upload-artifact@v4
|
|
39
|
+
with:
|
|
40
|
+
name: coverage-report
|
|
41
|
+
path: .coverage
|
|
42
|
+
|
|
43
|
+
test-alpine:
|
|
44
|
+
name: pytest / Python 3.12 / Alpine
|
|
45
|
+
runs-on: ubuntu-latest
|
|
46
|
+
container: python:3.12-alpine
|
|
47
|
+
|
|
48
|
+
steps:
|
|
49
|
+
- uses: actions/checkout@v4
|
|
50
|
+
|
|
51
|
+
- name: Install build deps
|
|
52
|
+
run: apk add --no-cache gcc musl-dev linux-headers
|
|
53
|
+
|
|
54
|
+
- name: Install
|
|
55
|
+
# PySide6 has no musl wheel; use dev-no-gui to skip it on Alpine
|
|
56
|
+
run: pip install -e ".[dev-no-gui]"
|
|
57
|
+
|
|
58
|
+
- name: Test
|
|
59
|
+
run: python -m pytest --tb=short
|
|
60
|
+
|
|
61
|
+
type-check:
|
|
62
|
+
name: mypy
|
|
63
|
+
runs-on: ubuntu-latest
|
|
64
|
+
|
|
65
|
+
steps:
|
|
66
|
+
- uses: actions/checkout@v4
|
|
67
|
+
|
|
68
|
+
- uses: actions/setup-python@v5
|
|
69
|
+
with:
|
|
70
|
+
python-version: "3.12"
|
|
71
|
+
cache: pip
|
|
72
|
+
|
|
73
|
+
- name: Install
|
|
74
|
+
run: pip install -e ".[dev]"
|
|
75
|
+
|
|
76
|
+
- name: Type check
|
|
77
|
+
run: mypy lkm/ --ignore-missing-imports
|
|
78
|
+
|
|
79
|
+
integration-apt:
|
|
80
|
+
name: Integration / apt (Ubuntu)
|
|
81
|
+
runs-on: ubuntu-latest
|
|
82
|
+
# Real package manager operations; allowed to fail without blocking the PR
|
|
83
|
+
continue-on-error: true
|
|
84
|
+
|
|
85
|
+
steps:
|
|
86
|
+
- uses: actions/checkout@v4
|
|
87
|
+
|
|
88
|
+
- uses: actions/setup-python@v5
|
|
89
|
+
with:
|
|
90
|
+
python-version: "3.12"
|
|
91
|
+
cache: pip
|
|
92
|
+
|
|
93
|
+
- name: Install
|
|
94
|
+
run: pip install -e ".[dev]"
|
|
95
|
+
|
|
96
|
+
- name: Integration tests (apt)
|
|
97
|
+
# Use the venv python explicitly so sudo can find pytest.
|
|
98
|
+
# Failures are informational; the unit test matrix is the hard gate.
|
|
99
|
+
run: sudo -E "$(which python)" -m pytest tests/integration/test_apt_backend.py -v --tb=short || true
|
|
100
|
+
|
|
101
|
+
integration-xbps:
|
|
102
|
+
name: Integration / xbps (Void Linux)
|
|
103
|
+
runs-on: ubuntu-latest
|
|
104
|
+
# xbps is not available on standard runners; tests self-skip via requires_xbps marker
|
|
105
|
+
continue-on-error: true
|
|
106
|
+
|
|
107
|
+
steps:
|
|
108
|
+
- uses: actions/checkout@v4
|
|
109
|
+
|
|
110
|
+
- uses: actions/setup-python@v5
|
|
111
|
+
with:
|
|
112
|
+
python-version: "3.12"
|
|
113
|
+
cache: pip
|
|
114
|
+
|
|
115
|
+
- name: Install lkm
|
|
116
|
+
run: pip install -e ".[dev-no-gui]"
|
|
117
|
+
|
|
118
|
+
- name: Integration tests (xbps)
|
|
119
|
+
# Tests skip automatically when xbps-install is not on PATH
|
|
120
|
+
run: python -m pytest tests/integration/test_xbps_backend.py -v --tb=short || true
|
|
121
|
+
|
|
122
|
+
integration-pacman:
|
|
123
|
+
name: Integration / pacman (Arch Linux)
|
|
124
|
+
runs-on: ubuntu-latest
|
|
125
|
+
container: archlinux:latest
|
|
126
|
+
# Real package manager operations; allowed to fail without blocking the PR
|
|
127
|
+
continue-on-error: true
|
|
128
|
+
|
|
129
|
+
steps:
|
|
130
|
+
- uses: actions/checkout@v4
|
|
131
|
+
|
|
132
|
+
- name: Install Python
|
|
133
|
+
run: pacman -Sy --noconfirm python python-pip
|
|
134
|
+
|
|
135
|
+
- name: Install lkm
|
|
136
|
+
run: pip install -e ".[dev-no-gui]" --break-system-packages
|
|
137
|
+
|
|
138
|
+
- name: Integration tests (pacman)
|
|
139
|
+
run: python -m pytest tests/integration/test_pacman_backend.py -v --tb=short || true
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
name: Flatpak
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*'
|
|
7
|
+
pull_request:
|
|
8
|
+
paths:
|
|
9
|
+
- 'pkg/flatpak/**'
|
|
10
|
+
workflow_dispatch:
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
build:
|
|
14
|
+
name: Build & validate Flatpak
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
|
|
20
|
+
- name: Install flatpak-builder
|
|
21
|
+
run: |
|
|
22
|
+
sudo apt-get update -qq
|
|
23
|
+
sudo apt-get install -y --no-install-recommends \
|
|
24
|
+
flatpak flatpak-builder elfutils librsvg2-common
|
|
25
|
+
|
|
26
|
+
- name: Add Flathub remote
|
|
27
|
+
run: |
|
|
28
|
+
sudo flatpak remote-add --if-not-exists flathub \
|
|
29
|
+
https://dl.flathub.org/repo/flathub.flatpakrepo
|
|
30
|
+
|
|
31
|
+
- name: Install KDE runtime & SDK
|
|
32
|
+
run: |
|
|
33
|
+
sudo flatpak install -y --noninteractive flathub \
|
|
34
|
+
org.kde.Platform//6.7 \
|
|
35
|
+
org.kde.Sdk//6.7
|
|
36
|
+
|
|
37
|
+
- name: Build Flatpak
|
|
38
|
+
run: |
|
|
39
|
+
flatpak-builder --force-clean --disable-rofiles-fuse \
|
|
40
|
+
build-dir pkg/flatpak/io.github.lkm.lkm.yml
|
|
41
|
+
|
|
42
|
+
- name: Validate metainfo
|
|
43
|
+
run: |
|
|
44
|
+
flatpak run --command=appstreamcli org.kde.Sdk//6.7 \
|
|
45
|
+
validate pkg/flatpak/io.github.lkm.lkm.metainfo.xml || true
|
|
46
|
+
|
|
47
|
+
- name: Export bundle
|
|
48
|
+
if: startsWith(github.ref, 'refs/tags/')
|
|
49
|
+
run: |
|
|
50
|
+
flatpak build-export repo build-dir
|
|
51
|
+
flatpak build-bundle repo LKM.flatpak io.github.lkm.lkm
|
|
52
|
+
|
|
53
|
+
- name: Upload bundle artifact
|
|
54
|
+
if: startsWith(github.ref, 'refs/tags/')
|
|
55
|
+
uses: actions/upload-artifact@v4
|
|
56
|
+
with:
|
|
57
|
+
name: LKM-flatpak
|
|
58
|
+
path: LKM.flatpak
|
|
59
|
+
if-no-files-found: error
|
|
60
|
+
|
|
61
|
+
release:
|
|
62
|
+
name: Attach to GitHub Release
|
|
63
|
+
needs: build
|
|
64
|
+
runs-on: ubuntu-latest
|
|
65
|
+
if: startsWith(github.ref, 'refs/tags/')
|
|
66
|
+
permissions:
|
|
67
|
+
contents: write
|
|
68
|
+
|
|
69
|
+
steps:
|
|
70
|
+
- name: Download artifact
|
|
71
|
+
uses: actions/download-artifact@v4
|
|
72
|
+
with:
|
|
73
|
+
name: LKM-flatpak
|
|
74
|
+
path: dist/
|
|
75
|
+
|
|
76
|
+
- name: Upload to release
|
|
77
|
+
uses: softprops/action-gh-release@v2
|
|
78
|
+
with:
|
|
79
|
+
files: dist/LKM.flatpak
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
# Trusted publishing must be configured on PyPI/TestPyPI before this workflow
|
|
4
|
+
# will succeed. See: https://docs.pypi.org/trusted-publishers/adding-a-publisher/
|
|
5
|
+
#
|
|
6
|
+
# Required configuration on both PyPI and TestPyPI:
|
|
7
|
+
# Owner: Interested-Deving-1896
|
|
8
|
+
# Repo: lkm
|
|
9
|
+
# Workflow: publish.yml
|
|
10
|
+
# Env (TestPyPI): testpypi
|
|
11
|
+
# Env (PyPI): pypi
|
|
12
|
+
|
|
13
|
+
on:
|
|
14
|
+
push:
|
|
15
|
+
tags:
|
|
16
|
+
- "v*.*.*"
|
|
17
|
+
|
|
18
|
+
jobs:
|
|
19
|
+
build:
|
|
20
|
+
name: Build distribution
|
|
21
|
+
runs-on: ubuntu-latest
|
|
22
|
+
|
|
23
|
+
steps:
|
|
24
|
+
- uses: actions/checkout@v4
|
|
25
|
+
|
|
26
|
+
- uses: actions/setup-python@v5
|
|
27
|
+
with:
|
|
28
|
+
python-version: "3.12"
|
|
29
|
+
|
|
30
|
+
- name: Install build tools
|
|
31
|
+
run: pip install build twine
|
|
32
|
+
|
|
33
|
+
- name: Build sdist and wheel
|
|
34
|
+
run: python -m build
|
|
35
|
+
|
|
36
|
+
- name: Check distribution
|
|
37
|
+
run: twine check dist/*
|
|
38
|
+
|
|
39
|
+
- uses: actions/upload-artifact@v4
|
|
40
|
+
with:
|
|
41
|
+
name: dist
|
|
42
|
+
path: dist/
|
|
43
|
+
|
|
44
|
+
publish-testpypi:
|
|
45
|
+
name: Publish to TestPyPI
|
|
46
|
+
needs: build
|
|
47
|
+
runs-on: ubuntu-latest
|
|
48
|
+
environment: testpypi
|
|
49
|
+
permissions:
|
|
50
|
+
id-token: write
|
|
51
|
+
|
|
52
|
+
steps:
|
|
53
|
+
- uses: actions/download-artifact@v4
|
|
54
|
+
with:
|
|
55
|
+
name: dist
|
|
56
|
+
path: dist/
|
|
57
|
+
|
|
58
|
+
- name: Publish to TestPyPI
|
|
59
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
60
|
+
with:
|
|
61
|
+
repository-url: https://test.pypi.org/legacy/
|
|
62
|
+
skip-existing: true
|
|
63
|
+
# Trusted publisher must be configured at test.pypi.org first.
|
|
64
|
+
# Failure here does not block the PyPI publish job.
|
|
65
|
+
continue-on-error: true
|
|
66
|
+
|
|
67
|
+
publish-pypi:
|
|
68
|
+
name: Publish to PyPI
|
|
69
|
+
# Run after build regardless of TestPyPI outcome
|
|
70
|
+
needs: build
|
|
71
|
+
runs-on: ubuntu-latest
|
|
72
|
+
environment: pypi
|
|
73
|
+
permissions:
|
|
74
|
+
id-token: write
|
|
75
|
+
|
|
76
|
+
steps:
|
|
77
|
+
- uses: actions/download-artifact@v4
|
|
78
|
+
with:
|
|
79
|
+
name: dist
|
|
80
|
+
path: dist/
|
|
81
|
+
|
|
82
|
+
- name: Publish to PyPI
|
|
83
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
84
|
+
with:
|
|
85
|
+
skip-existing: true
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*.pyo
|
|
5
|
+
*.pyd
|
|
6
|
+
.Python
|
|
7
|
+
*.egg-info/
|
|
8
|
+
dist/
|
|
9
|
+
build/
|
|
10
|
+
.eggs/
|
|
11
|
+
|
|
12
|
+
# Virtual environments
|
|
13
|
+
.venv/
|
|
14
|
+
venv/
|
|
15
|
+
env/
|
|
16
|
+
|
|
17
|
+
# Test / coverage
|
|
18
|
+
.pytest_cache/
|
|
19
|
+
.coverage
|
|
20
|
+
htmlcov/
|
|
21
|
+
.mypy_cache/
|
|
22
|
+
.ruff_cache/
|
|
23
|
+
|
|
24
|
+
# Editor
|
|
25
|
+
.vscode/
|
|
26
|
+
.idea/
|
|
27
|
+
*.swp
|
|
28
|
+
*.swo
|
|
29
|
+
.DS_Store
|
|
30
|
+
|
|
31
|
+
# lkm runtime state
|
|
32
|
+
~/.config/lkm/
|
|
33
|
+
~/.cache/lkm/
|