Files
navop/.github/workflows/ci.yml
T
胡飞 9df168af77 chore(ci): 清理和优化GitHub Actions缓存配置
- 移除 ci.yml 和 release.yml 中缓存路径 ~/.cargo/bin/
- 删除 release.yml 中 macOS 运行器清理 Xcode 和开发者目录的命令
- 保留其他清理命令以维持环境整洁
- 减少无用缓存,优化CI流程效率
2026-04-04 23:50:51 +08:00

65 lines
1.8 KiB
YAML

name: CI
on:
pull_request:
push:
branches:
- main
tags:
- "*"
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.ref_name == 'main' && github.sha || 'anysha' }}
cancel-in-progress: true
jobs:
test:
name: Test
strategy:
fail-fast: false
matrix:
include:
- target: aarch64-apple-darwin
run_on: macos-latest
- target: x86_64-linux-gnu
run_on: ubuntu-latest
- target: x86_64-windows-msvc
run_on: windows-latest
runs-on: ${{ matrix.run_on }}
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: clippy
- name: Install system dependencies
if: ${{ matrix.run_on != 'windows-latest' }}
run: script/bootstrap
- name: Machete
if: ${{ matrix.run_on == 'macos-latest' }}
uses: bnjbvr/cargo-machete@v0.9.1
- name: Setup | Cache Cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: test-cargo-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }}
- name: Lint
if: ${{ matrix.run_on == 'macos-latest' }}
run: |
cargo clippy --workspace --all-targets
- name: Test Linux
if: ${{ matrix.run_on == 'ubuntu-latest' }}
run: |
cargo test --all
- name: Test Windows
if: ${{ matrix.run_on == 'windows-latest' }}
run: |
cargo test --all
- name: Test MacOS
if: ${{ matrix.run_on == 'macos-latest' }}
run: |
cargo test --all
cargo test -p gpui-component --doc