Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 0 additions & 6 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,3 @@
[build]
target-dir = "target"
incremental = true

# tree-sitter (via pulsing-forge) needs BSD endian macros when built against
# glibc 2.17 (manylinux2014). Its build.rs sets _DEFAULT_SOURCE, which glibc
# 2.17 ignores, leaving le16toh/be16toh undefined at link/load time.
[env]
CFLAGS = { value = "-D_GNU_SOURCE", condition = { platform = "linux" } }
13 changes: 1 addition & 12 deletions .github/actions/setup-build-env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,23 +50,12 @@ runs:
${{ runner.os }}-cargo-${{ inputs.rust-toolchain }}-
${{ runner.os }}-cargo-
- uses: cargo-bins/cargo-binstall@main
- name: Install Linux GUI build dependencies
- name: Install Linux native build dependencies
if: runner.os == 'Linux'
shell: bash
run: |
sudo apt-get update -qq
sudo apt-get install -y -qq --no-install-recommends \
libxcb1-dev \
libxkbcommon-dev \
libxkbcommon-x11-dev \
libx11-dev \
libxi-dev \
libxrandr-dev \
libxcursor-dev \
libxinerama-dev \
libgl1-mesa-dev \
libfontconfig1-dev \
libfreetype6-dev \
libffi-dev \
pkg-config

Expand Down
37 changes: 14 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1

concurrency:
group: ci-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
# ============================================
# 代码规范检查(快速反馈)
Expand All @@ -32,7 +36,7 @@ jobs:
run: cargo fmt --all -- --check

- name: Rust clippy
run: cargo clippy --workspace --exclude pulsing-py --exclude pulsing-bench-py --all-targets -- -D warnings
run: cargo clippy --locked --workspace --exclude pulsing-py --all-targets -- -D warnings

- name: Python lint (ruff)
run: ruff check python/
Expand Down Expand Up @@ -61,10 +65,10 @@ jobs:
uses: Swatinem/rust-cache@v2

- name: Build
run: cargo build --workspace --exclude pulsing-py --exclude pulsing-bench-py --all-targets
run: cargo build --locked --workspace --exclude pulsing-py --all-targets

- name: Test
run: cargo test --workspace --exclude pulsing-py --exclude pulsing-bench-py --all-targets
run: cargo test --locked --workspace --exclude pulsing-py --all-targets

# ============================================
# Rust 覆盖率收集
Expand All @@ -91,7 +95,7 @@ jobs:
export CARGO_TARGET_DIR=$CARGO_LLVM_COV_TARGET_DIR
export CARGO_INCREMENTAL=1
cargo llvm-cov clean --workspace
cargo test --workspace --exclude pulsing-py --exclude pulsing-bench-py
cargo test --locked --workspace --exclude pulsing-py
cargo llvm-cov --no-run --lcov --output-path coverage.lcov

- name: Upload coverage report
Expand Down Expand Up @@ -176,23 +180,15 @@ jobs:
dist/pulsing-*.tar.gz

# ============================================
# 构建 Linux aarch64 Wheel(使用 QEMU 仿真原生构建)
# 构建 Linux aarch64 Wheel(原生 ARM64 runner)
# ============================================
build-linux-aarch64:
name: Build (Linux aarch64 wheel + binary)
runs-on: ubuntu-latest
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: arm64

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build wheel + binary in QEMU
- name: Build wheel + binary on ARM64
run: |
docker run --rm --platform linux/arm64 \
-v ${{ github.workspace }}:/workspace -w /workspace \
Expand Down Expand Up @@ -292,12 +288,12 @@ jobs:
run: pytest tests/python -v

# ============================================
# Ubuntu aarch64 Python 测试(使用 QEMU 仿真)
# Ubuntu aarch64 Python 测试(原生 ARM64 runner)
# ============================================
test-ubuntu-aarch64:
name: Test Ubuntu aarch64 (Python ${{ matrix.python-version }})
needs: build-linux-aarch64
runs-on: ubuntu-latest
runs-on: ubuntu-24.04-arm
strategy:
fail-fast: false
matrix:
Expand All @@ -306,18 +302,13 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: arm64

- name: Download wheel
uses: actions/download-artifact@v4
with:
name: wheels-linux-aarch64
path: dist/

- name: Test on Ubuntu aarch64 (QEMU)
- name: Test on Ubuntu aarch64
run: |
docker run --rm --platform linux/arm64 \
-v ${{ github.workspace }}:/workspace -w /workspace \
Expand Down
14 changes: 3 additions & 11 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,23 +47,15 @@ jobs:
dist/pulsing-*.tar.gz

# ============================================
# Build Linux aarch64 wheels (使用 QEMU 仿真原生构建)
# Build Linux aarch64 wheels (native ARM64 runner)
# ============================================
linux-aarch64:
name: Build Linux aarch64 wheels
runs-on: ubuntu-latest
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: arm64

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build wheel + binary in QEMU
- name: Build wheel + binary on ARM64
run: |
docker run --rm --platform linux/arm64 \
-v ${{ github.workspace }}:/workspace -w /workspace \
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ dist/pulsing-*.zip
# npc workspace local state (per-project; run `npc init` in your app repo)
.pulsing/

# Vendored Codex reference tree (refresh: scripts/sync-codex-forge.sh)
# Local vendor trees
vendor/
.cursor/
.claude/
Expand Down
Loading
Loading