chore: consistent slice behavior with python (#352) #653
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 check | |
on: | |
push: | |
branches: ["main"] | |
paths: | |
- ".cargo/**" | |
- ".github/**" | |
- "crates/**" | |
- "scripts/**" | |
- "src/**" | |
- "tests/**" | |
- "Cargo.lock" | |
- "Cargo.toml" | |
- "rust-toolchain.toml" | |
- "vectors.control" | |
pull_request: | |
branches: ["main"] | |
paths: | |
- ".cargo/**" | |
- ".github/**" | |
- "crates/**" | |
- "scripts/**" | |
- "src/**" | |
- "tests/**" | |
- "Cargo.lock" | |
- "Cargo.toml" | |
- "rust-toolchain.toml" | |
- "vectors.control" | |
merge_group: | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.ref }}-${{ github.workflow }} | |
cancel-in-progress: true | |
env: | |
CARGO_TERM_COLOR: always | |
RUST_BACKTRACE: 1 | |
SCCACHE_GHA_ENABLED: true | |
RUSTC_WRAPPER: sccache | |
RUSTFLAGS: "-Dwarnings" | |
jobs: | |
check: | |
strategy: | |
matrix: | |
include: | |
- { version: 12, os: "ubuntu-latest" } | |
- { version: 13, os: "ubuntu-latest" } | |
- { version: 14, os: "ubuntu-latest" } | |
- { version: 15, os: "ubuntu-latest" } | |
- { version: 16, os: "ubuntu-latest" } | |
runs-on: ${{ matrix.os }} | |
env: | |
VERSION: ${{ matrix.version }} | |
OS: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache/restore@v3 | |
with: | |
path: | | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
key: cargo-${{ matrix.os }}-pg${{ matrix.version }}-${{ hashFiles('./Cargo.lock') }} | |
restore-keys: cargo-${{ matrix.os }}-pg${{ matrix.version }} | |
- uses: mozilla-actions/sccache-action@v0.0.3 | |
- name: Setup | |
shell: bash | |
run: ./scripts/ci_setup.sh | |
- name: Format check | |
run: cargo fmt --check | |
- name: Semantic check | |
run: | | |
cargo clippy --no-default-features --features "pg${{ matrix.version }} pg_test" --target x86_64-unknown-linux-gnu | |
cargo clippy --no-default-features --features "pg${{ matrix.version }} pg_test" --target aarch64-unknown-linux-gnu | |
- name: Debug build | |
run: | | |
cargo build --no-default-features --features "pg${{ matrix.version }} pg_test" --target x86_64-unknown-linux-gnu | |
cargo build --no-default-features --features "pg${{ matrix.version }} pg_test" --target aarch64-unknown-linux-gnu | |
- name: Test | |
run: | | |
cargo test --all --no-fail-fast --no-default-features --features "pg${{ matrix.version }} pg_test" --target x86_64-unknown-linux-gnu -- --nocapture | |
- name: Install release | |
run: ./scripts/ci_install.sh | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Test 2 | |
run: ./tests/tests.sh | |
- uses: actions/cache/save@v3 | |
with: | |
path: | | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
key: cargo-${{ matrix.os }}-pg${{ matrix.version }}-${{ hashFiles('./Cargo.lock') }} |