Files
RedBear-OS/.github/workflows/redbear-ci.yml
T
vasilito 49377f768c build system: fix 3 more silent-failure bugs in the baked-shim port path
Found by extending the edge-case suite to the baked-shim path (E17-E19) after a
sync reported 'ready' but silently dropped a module's Redox shim:
 - git show used an ABSOLUTE recipe path ('HEAD:/mnt/.../source/f') which git
   rejects (needs repo-relative) -> empty content -> garbage delta. Now uses
   ${dir#$ROOT/}.
 - diff|patch under 'set -o pipefail': diff exits 1 whenever files differ (always
   here), so the pipeline looked failed even when patch succeeded -> EVERY shim
   false-rejected. Now captures the delta to a file and checks patch's own exit.
 - a shim whose file was renamed/removed upstream, or unreadable from HEAD, was
   silently skipped. Now: Redox-added files are carried in verbatim; a missing
   target or unreadable HEAD file -> SHIM-REJECT (manual), never a silent drop.
Also: old-version URL derivation now rewrites the major.minor dir component too
(KDE mirrors nest tarballs under .../6.28/foo-6.28.0). CI branch glob widened to
[0-9]* so 0.4.0/0.5.0 release branches keep triggering.
2026-07-31 21:01:23 +03:00

82 lines
2.9 KiB
YAML

name: redbear-ci
on:
push:
# Any version-like release branch (0.3.1, 0.3.2, 0.4.0, 0.5.0, 1.0.0, ...)
# keeps triggering CI — including the versioning-machinery checks below —
# without editing this file on every bump. Release branches start with a
# digit; master is listed explicitly.
branches: ["[0-9]*", master]
pull_request:
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: dtolnay/rust-toolchain@nightly
with:
toolchain: nightly-2026-05-24
- uses: dtolnay/rust-toolchain@nightly
with:
toolchain: nightly-2026-05-24
components: rustfmt, clippy
- name: Check sync-versions compliance
run: ./local/scripts/sync-versions.sh --check
- name: Install b3sum (versioning machinery + validator)
run: sudo apt-get update && sudo apt-get install -y b3sum
- name: Versioning machinery unit tests
run: ./local/scripts/test-versioning-machinery.sh
- name: External recipe source-version consistency
# Fails if any tar recipe's vendored source/ (or tracked source.tar)
# diverges from its declared version — the Qt/KDE class of bug. Mirrors
# build-preflight.sh Phase 1.0C so divergence is caught on every push/PR,
# not only at build time.
run: ./local/scripts/verify-external-source-versions.sh
- name: cargo fmt check (redbear-* crates)
run: |
set -e
for f in $(find local/recipes -path "*redbear-*/source/Cargo.toml" -not -path "*/target/*"); do
echo "--- cargo fmt --check: $f ---"
cargo fmt --manifest-path "$f" -- --check
done
- name: cargo check (redbear-* crates)
run: |
set -e
for f in $(find local/recipes -path "*redbear-*/source/Cargo.toml" -not -path "*/target/*"); do
echo "--- cargo check: $f ---"
cargo check --manifest-path "$f" --target x86_64-unknown-redox --locked
done
continue-on-error: true
- name: cargo check host (library-only crates)
run: |
set -e
for f in $(find local/recipes -path "*redbear-hid-core/source/Cargo.toml" -not -path "*/target/*"); do
echo "--- cargo check host: $f ---"
cargo check --manifest-path "$f"
done
continue-on-error: true
- name: cargo test host (pure-logic crates)
run: |
set -e
for f in $(find local/recipes -path "*redbear-*/source/Cargo.toml" -not -path "*/target/*"); do
has_test=$(grep -c '\[\[test\]\]' "$f" 2>/dev/null || true)
if [ "$has_test" -gt 0 ]; then
echo "--- cargo test: $f ---"
cargo test --manifest-path "$f" || echo "NOTE: some tests may require Redox target; continuing"
fi
done
continue-on-error: true