feat: unify vchordrq and vchordrqfscan #211
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Rust | |
on: | |
pull_request: | |
paths: | |
- '.github/workflows/rust.yml' | |
- 'src/**' | |
- 'Cargo.lock' | |
- 'Cargo.toml' | |
- '*.control' | |
- 'rust-toolchain.toml' | |
push: | |
branches: | |
- main | |
paths: | |
- '.github/workflows/rust.yml' | |
- 'src/**' | |
- 'Cargo.lock' | |
- 'Cargo.toml' | |
- '*.control' | |
- 'rust-toolchain.toml' | |
merge_group: | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.ref }}-${{ github.workflow }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
strategy: | |
matrix: | |
include: | |
- runner: "ubicloud-standard-4" | |
arch: "x86_64" | |
- runner: "ubicloud-standard-4-arm" | |
arch: "aarch64" | |
runs-on: ${{ matrix.runner }} | |
env: | |
PGRX_IMAGE: "ghcr.io/tensorchord/vectorchord-pgrx:0.12.9-nightly-2024-12-25" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Configure sccache | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
const url = process.env.ACTIONS_CACHE_URL || ''; | |
const token = process.env.ACTIONS_RUNTIME_TOKEN || ''; | |
core.exportVariable( | |
'CACHE_ENVS', | |
`-e CARGO_INCREMENTAL=0 -e SCCACHE_GHA_ENABLED=true -e RUSTC_WRAPPER=sccache -e ACTIONS_CACHE_URL=${url} -e ACTIONS_RUNTIME_TOKEN=${token}`, | |
); | |
- name: Set up docker images and permissions | |
run: | | |
docker pull $PGRX_IMAGE | |
echo "Default user: $(id -u):$(id -g)" | |
sudo chown -R 1000:1000 . | |
- name: Clippy | |
run: | | |
for v in {14..17}; do | |
docker run --rm -v .:/workspace $CACHE_ENVS $PGRX_IMAGE cargo clippy --target ${{ matrix.arch }}-unknown-linux-gnu --features "pg$v" -- -D warnings | |
done | |
- name: Build | |
run: | | |
for v in {14..17}; do | |
docker run --rm -v .:/workspace $CACHE_ENVS $PGRX_IMAGE cargo build --lib --target ${{ matrix.arch }}-unknown-linux-gnu --features "pg$v" | |
done | |
- name: Test | |
run: | | |
# pg agnostic tests | |
docker run --rm -v .:/workspace $CACHE_ENVS $PGRX_IMAGE cargo test --no-fail-fast --target ${{ matrix.arch }}-unknown-linux-gnu --features pg17 |