still not a clue
release / build (push) Successful in 1m12s

This commit is contained in:
lda
2025-08-25 09:42:11 +07:00 Unverified
parent 2392477ec8
commit bfd1b626d5
8 changed files with 38 additions and 18 deletions
+4 -1
View File
@@ -1,2 +1,5 @@
[build]
# target = "armv7-unknown-linux-musleabihf"
target = "armv7-unknown-linux-musleabihf"
[target.armv7-unknown-linux-musleabihf]
linker = "rust-lld"
+3 -3
View File
@@ -14,12 +14,12 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Ensure toolchain and cross
- name: Ensure toolchain and targets
shell: pwsh
run: |
rustc -V
cargo -V
if (-not (Get-Command cross -ErrorAction SilentlyContinue)) { cargo install cross --git https://github.com/cross-rs/cross }
rustup target add armv7-unknown-linux-musleabihf
- name: Cache cargo
uses: actions/cache@v4
@@ -33,7 +33,7 @@ jobs:
- name: Build (armv7-musl)
shell: pwsh
run: |
./scripts/cross_build.ps1 -Release -Targets armv7-unknown-linux-musleabihf
cargo build --release --target armv7-unknown-linux-musleabihf
- name: Package rootfs tarball
shell: pwsh
+12 -8
View File
@@ -2,15 +2,19 @@
router shit
## compile
## usage
with [cross](https://crates.io/crates/cross).
- Build (Windows host OK):
- cargo build --release --target armv7-unknown-linux-musleabihf
- Run on a Linux box/router:
- copy target/armv7-unknown-linux-musleabihf/release/wakey to the device
- chmod +x wakey && ./wakey
- Install via release asset (OpenWrt):
- wget -O- `https://your.gitea/owner/repo/releases/download/vX.Y.Z/wakey-rootfs-vX.Y.Z-armv7-unknown-linux-musleabihf.tgz` | tar -xz -C /
- /etc/init.d/wakey enable && /etc/init.d/wakey start
Optional updater (fetch latest automatically on OpenWrt):
```sh
cross build --release --target armv7-unknown-linux-musleabihf # my machine
WAKEY_HOST=git.ldlda.com WAKEY_OWNER=lda WAKEY_REPO=wakey sh /etc/ldlda_help/update_wakey.sh
```
cross works with a random windows machine.
it works; those toolchains they tried to install: add them forcefully by hand.
it works. uses docker.
+1 -1
View File
@@ -37,7 +37,7 @@ WAKEY_HOST=git.ldlda.com WAKEY_OWNER=lda WAKEY_REPO=wakey sh /etc/ldlda_help/upd
## Scripts overview
- `act_runner.ps1` — Start/seed the local Gitea runner. Use `-Attach` to see logs, `-ForceConfigure` to register non-interactively.
- `cross_build.ps1` — Simple wrapper for `cross build` per target (default: armv7-unknown-linux-musleabihf).
- `cross_build.ps1` — Simple wrapper for `cargo build` per target (default: armv7-unknown-linux-musleabihf).
- `package_rootfs.ps1` — Produces `dist/wakey-rootfs-<version>-<target>.tgz` with `/root/.bin/wakey` and `/etc/init.d/*`.
- `package.ps1` — Dev bundle with binaries + init scripts (not a rootfs layout).
- `publish.ps1` — Optional version bump + build + tag (and `cargo publish` only if you pass `-Publish`).
+11 -1
View File
@@ -36,6 +36,16 @@ Get-ChildItem (Join-Path $root 'scripts/init/openwrt') -File | ForEach-Object {
Copy-Item $_.FullName $dest -Force
}
# Copy helper scripts intended for /etc/ldlda_help
$helpSrc = Join-Path $root 'scripts/ldlda_help'
if (Test-Path $helpSrc) {
$etcHelpDir = Join-Path $staging 'etc/ldlda_help'
New-Item -ItemType Directory -Force -Path $etcHelpDir | Out-Null
Get-ChildItem $helpSrc -File | ForEach-Object {
Copy-Item $_.FullName (Join-Path $etcHelpDir $_.Name) -Force
}
}
# Create tarball
$pkgName = "wakey-rootfs-$Version-$Target.tgz"
Push-Location $staging
@@ -54,4 +64,4 @@ Remove-Item -Recurse -Force $staging
Write-Host "Rootfs package: " (Join-Path $dist $pkgName)
Write-Host "On router: wget -O- <URL/$pkgName> | tar -xz -C /"
Write-Host "Then: chmod +x /etc/init.d/wakey && /etc/init.d/wakey enable && /etc/init.d/wakey start"
Write-Host "For any additional init scripts (e.g., update_tailscale), also chmod +x and enable/start as needed."
Write-Host "Helper scripts: /etc/ldlda_help/* (e.g., update_wakey.sh, update_tailscale.sh). Mark executable if needed: chmod +x /etc/ldlda_help/*.sh"
+5 -2
View File
@@ -1,4 +1,4 @@
# One-shot: build with cross, package, and print artifact location.
# One-shot: build, package, and print artifact location (no cross required).
# Usage: ./scripts/release.ps1 -Version 0.1.0 -Targets armv7-unknown-linux-musleabihf
param(
[Parameter(Mandatory = $true)][string]$Version,
@@ -7,5 +7,8 @@ param(
$ErrorActionPreference = 'Stop'
./scripts/cross_build.ps1 -Targets $Targets -Release
foreach ($t in $Targets) {
rustup target add $t
cargo build --release --target $t
}
./scripts/package.ps1 -Version $Version -Targets $Targets