mirror of
https://github.com/Hmbown/DeepSeek-TUI.git
synced 2026-09-03 06:50:13 +08:00
Main and schedule/dispatch runs share one concurrency group via github.ref when there is no pull_request.number. cancel-in-progress: true then killed prior main CI before it could fail, which is how v0.9.8 assertion regressions shipped (#5383). Keep cancel-in-progress only for pull_request events so superseded PR heads still cancel; apply the same fix to ohos.yml which used the identical group pattern. Agent-assisted change. Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Hunter Bown <Hmbown@users.noreply.github.com>
73 lines
2.1 KiB
YAML
73 lines
2.1 KiB
YAML
name: OpenHarmony
|
|
|
|
on:
|
|
push:
|
|
branches: [main, master]
|
|
paths:
|
|
- '.github/workflows/ohos.yml'
|
|
- 'Cargo.lock'
|
|
- 'Cargo.toml'
|
|
- 'crates/**'
|
|
- 'scripts/ohos/**'
|
|
- 'scripts/ohos-env.sh'
|
|
- 'scripts/release/check-ohos-deps.sh'
|
|
pull_request:
|
|
branches: [main, master]
|
|
paths:
|
|
- '.github/workflows/ohos.yml'
|
|
- 'Cargo.lock'
|
|
- 'Cargo.toml'
|
|
- 'crates/**'
|
|
- 'scripts/ohos/**'
|
|
- 'scripts/ohos-env.sh'
|
|
- 'scripts/release/check-ohos-deps.sh'
|
|
schedule:
|
|
- cron: '47 7 * * 1'
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: ohos-${{ github.event.pull_request.number || github.ref }}
|
|
# Same as ci.yml: cancel superseded PR heads only; never cancel main pushes.
|
|
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
CARGO_INCREMENTAL: 0
|
|
RUSTFLAGS: -Dwarnings
|
|
|
|
jobs:
|
|
cargo-check:
|
|
name: cargo check (aarch64-unknown-linux-ohos)
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 45
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- name: Install Rust target
|
|
uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
targets: aarch64-unknown-linux-ohos
|
|
- name: Install OpenHarmony native SDK
|
|
id: ohos-sdk
|
|
# Pin the action: it downloads a published OpenHarmony SDK and verifies
|
|
# the archive checksum. This job must never substitute host headers or
|
|
# a stub sysroot and report that as target support.
|
|
uses: openharmony-rs/setup-ohos-sdk@b312caf8a43bb836aa24c08f65f97e1f09a89cad
|
|
with:
|
|
version: '6.1'
|
|
components: native
|
|
cache: true
|
|
mirror: true
|
|
- name: Check Codewhale TUI with the real SDK/sysroot
|
|
shell: bash
|
|
env:
|
|
OHOS_NATIVE_SDK: ${{ steps.ohos-sdk.outputs.ohos_sdk_native }}
|
|
run: |
|
|
set -euo pipefail
|
|
test -x "${OHOS_NATIVE_SDK}/llvm/bin/clang"
|
|
test -d "${OHOS_NATIVE_SDK}/sysroot"
|
|
. ./scripts/ohos-env.sh
|
|
cargo check --target aarch64-unknown-linux-ohos -p codewhale-tui --locked
|