mirror of
https://github.com/bybrooklyn/openbitdo.git
synced 2026-03-19 04:12:56 -04:00
release prep: rc.1 baseline and gating updates
This commit is contained in:
203
.github/workflows/ci.yml
vendored
203
.github/workflows/ci.yml
vendored
@@ -7,6 +7,10 @@ on:
|
||||
pull_request:
|
||||
paths:
|
||||
- '**'
|
||||
schedule:
|
||||
# 07:30 UTC is 02:30 America/New_York during standard time.
|
||||
# (GitHub cron does not support time zones/DST directly.)
|
||||
- cron: '30 7 * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
@@ -20,7 +24,42 @@ jobs:
|
||||
- name: Clean-room guard
|
||||
run: ./scripts/cleanroom_guard.sh
|
||||
|
||||
test:
|
||||
aur-validate:
|
||||
runs-on: ubuntu-latest
|
||||
needs: guard
|
||||
container: archlinux:base
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install AUR packaging toolchain
|
||||
run: |
|
||||
pacman -Sy --noconfirm --needed base-devel git
|
||||
- name: Ensure package metadata has pinned checksum fields
|
||||
run: |
|
||||
set -euo pipefail
|
||||
if grep -nE 'SKIP|:no_check' \
|
||||
packaging/aur/openbitdo/PKGBUILD \
|
||||
packaging/aur/openbitdo-bin/PKGBUILD \
|
||||
packaging/homebrew/Formula/openbitdo.rb; then
|
||||
echo "Found placeholder checksum markers; release metadata must be pinned." >&2
|
||||
exit 1
|
||||
fi
|
||||
test -f packaging/scripts/render_release_metadata.sh
|
||||
test -f packaging/aur/openbitdo/PKGBUILD.tmpl
|
||||
test -f packaging/aur/openbitdo-bin/PKGBUILD.tmpl
|
||||
test -f packaging/homebrew/Formula/openbitdo.rb.tmpl
|
||||
- name: Validate PKGBUILD and .SRCINFO
|
||||
run: |
|
||||
useradd -m builder
|
||||
chown -R builder:builder "$GITHUB_WORKSPACE"
|
||||
su builder -s /bin/bash -c "set -euo pipefail; \
|
||||
cd '$GITHUB_WORKSPACE/packaging/aur/openbitdo'; \
|
||||
makepkg --printsrcinfo > /tmp/openbitdo.srcinfo; \
|
||||
diff -u .SRCINFO /tmp/openbitdo.srcinfo; \
|
||||
cd '$GITHUB_WORKSPACE/packaging/aur/openbitdo-bin'; \
|
||||
makepkg --printsrcinfo > /tmp/openbitdo-bin.srcinfo; \
|
||||
diff -u .SRCINFO /tmp/openbitdo-bin.srcinfo"
|
||||
|
||||
tui-smoke-test:
|
||||
runs-on: ubuntu-latest
|
||||
needs: guard
|
||||
defaults:
|
||||
@@ -34,14 +73,80 @@ jobs:
|
||||
sudo apt-get install -y libudev-dev pkg-config
|
||||
- name: Install Rust
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: Run TUI smoke tests
|
||||
run: cargo test -p bitdo_tui --all-targets
|
||||
|
||||
build-macos-arm64:
|
||||
runs-on: macos-14
|
||||
needs: guard
|
||||
defaults:
|
||||
run:
|
||||
working-directory: sdk
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install Rust
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
targets: aarch64-apple-darwin
|
||||
- name: Build/package macOS arm64 artifacts
|
||||
run: ./scripts/package-macos.sh v0.0.0-ci arm64 aarch64-apple-darwin
|
||||
- name: Upload macOS arm64 artifact sample
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ci-macos-arm64-package
|
||||
path: sdk/dist/openbitdo-v0.0.0-ci-macos-arm64*
|
||||
|
||||
hardware-paths:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
hardware: ${{ steps.filter.outputs.hardware }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: dorny/paths-filter@v3
|
||||
id: filter
|
||||
with:
|
||||
filters: |
|
||||
hardware:
|
||||
- 'sdk/crates/bitdo_proto/**'
|
||||
- 'sdk/crates/bitdo_app_core/**'
|
||||
- 'sdk/crates/bitdo_tui/**'
|
||||
- 'sdk/crates/openbitdo/**'
|
||||
- 'sdk/tests/**'
|
||||
- 'sdk/scripts/run_hardware_smoke.sh'
|
||||
- 'spec/**'
|
||||
- 'harness/lab/device_lab.yaml'
|
||||
- '.github/workflows/ci.yml'
|
||||
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- guard
|
||||
- tui-smoke-test
|
||||
- aur-validate
|
||||
- build-macos-arm64
|
||||
defaults:
|
||||
run:
|
||||
working-directory: sdk
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install system deps
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libudev-dev pkg-config
|
||||
- name: Install Rust
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: Clippy (workspace strict)
|
||||
run: cargo clippy --workspace --all-targets -- -D warnings
|
||||
- name: Run tests
|
||||
run: cargo test --workspace --all-targets
|
||||
|
||||
hardware-smoke:
|
||||
hardware-dinput:
|
||||
if: vars.BITDO_ENABLE_EXTRA_HARDWARE == '1'
|
||||
runs-on: [self-hosted, linux, hid-lab]
|
||||
if: (github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch') && vars.HARDWARE_SMOKE_ENABLED == '1'
|
||||
continue-on-error: true
|
||||
needs: test
|
||||
env:
|
||||
BITDO_REQUIRED_FAMILIES: DInput
|
||||
defaults:
|
||||
run:
|
||||
working-directory: sdk
|
||||
@@ -55,5 +160,93 @@ jobs:
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: hardware-smoke-report
|
||||
name: hardware-smoke-dinput
|
||||
path: harness/reports/*.json
|
||||
|
||||
hardware-standard64:
|
||||
if: vars.BITDO_ENABLE_EXTRA_HARDWARE == '1'
|
||||
runs-on: [self-hosted, linux, hid-lab]
|
||||
needs: test
|
||||
env:
|
||||
BITDO_REQUIRED_FAMILIES: Standard64
|
||||
defaults:
|
||||
run:
|
||||
working-directory: sdk
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install Rust
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: Hardware smoke tests
|
||||
run: ./scripts/run_hardware_smoke.sh
|
||||
- name: Upload hardware smoke report
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: hardware-smoke-standard64
|
||||
path: harness/reports/*.json
|
||||
|
||||
hardware-ultimate2:
|
||||
if: github.event_name == 'schedule' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') || needs.hardware-paths.outputs.hardware == 'true'
|
||||
runs-on: [self-hosted, linux, hid-lab]
|
||||
needs: [test, hardware-paths]
|
||||
env:
|
||||
BITDO_REQUIRED_SUITE: ultimate2
|
||||
defaults:
|
||||
run:
|
||||
working-directory: sdk
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install Rust
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: Hardware smoke tests (Ultimate2)
|
||||
run: ./scripts/run_hardware_smoke.sh
|
||||
- name: Upload hardware smoke report
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: hardware-smoke-ultimate2
|
||||
path: harness/reports/*.json
|
||||
|
||||
hardware-108jp:
|
||||
if: github.event_name == 'schedule' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') || needs.hardware-paths.outputs.hardware == 'true'
|
||||
runs-on: [self-hosted, linux, hid-lab]
|
||||
needs: [test, hardware-paths]
|
||||
env:
|
||||
BITDO_REQUIRED_SUITE: 108jp
|
||||
defaults:
|
||||
run:
|
||||
working-directory: sdk
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install Rust
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: Hardware smoke tests (JP108)
|
||||
run: ./scripts/run_hardware_smoke.sh
|
||||
- name: Upload hardware smoke report
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: hardware-smoke-108jp
|
||||
path: harness/reports/*.json
|
||||
|
||||
hardware-jphandshake:
|
||||
if: vars.BITDO_ENABLE_JP_HARDWARE == '1'
|
||||
runs-on: [self-hosted, linux, hid-lab]
|
||||
needs: test
|
||||
env:
|
||||
BITDO_REQUIRED_FAMILIES: JpHandshake
|
||||
defaults:
|
||||
run:
|
||||
working-directory: sdk
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install Rust
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: Hardware smoke tests
|
||||
run: ./scripts/run_hardware_smoke.sh
|
||||
- name: Upload hardware smoke report
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: hardware-smoke-jphandshake
|
||||
path: harness/reports/*.json
|
||||
|
||||
Reference in New Issue
Block a user