Skip to content

chore(ci): Update install-tiledb action #600

chore(ci): Update install-tiledb action

chore(ci): Update install-tiledb action #600

Workflow file for this run

name: "Pull Request CI"
on:
push:
branches:
- main
- release-*
- refs/tags/*
pull_request:
branches:
- "*" # Quotes required because * is reserved by YAML
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
build-and-test:
name: "Build and Test"
runs-on: ubuntu-latest
steps:
- name: Checkout tiledb-rs
uses: actions/checkout@v4
- name: Install Rust Stable
uses: dtolnay/rust-toolchain@stable
- name: Setup Rustc Cache
uses: Swatinem/rust-cache@v2
- name: Install TileDB
uses: ./.github/actions/install-tiledb
- name: Build
run: cargo build --all-targets --all-features
- name: Test
run: |
cargo test --all-targets --all-features
status=$?
echo "Process exited with status ${status}"
lint:
name: "Lint - Stable"
strategy:
matrix:
os:
- "ubuntu-latest"
- "linux-arm64-ubuntu24"
- "macos-13"
- "macos-latest"
runs-on: ${{ matrix.os }}
steps:
- name: Checkout tiledb-rs
uses: actions/checkout@v4
- name: Install Rust Stable
uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- name: Setup Rustc Cache
uses: Swatinem/rust-cache@v2
- name: Install TileDB
uses: ./.github/actions/install-tiledb
- name: Check Formatting
run: cargo fmt --quiet --check
- name: Lint
run: cargo clippy --no-deps --all-targets --all-features -- -Dwarnings
lint-nightly:
name: "Lint - Nightly"
continue-on-error: true
strategy:
matrix:
os:
- "ubuntu-latest"
- "linux-arm64-ubuntu24"
- "macos-13"
- "macos-latest"
runs-on: ${{ matrix.os }}
steps:
- name: Checkout tiledb-rs
uses: actions/checkout@v4
- name: Install Rust Nightly
uses: dtolnay/rust-toolchain@nightly
with:
components: clippy, rustfmt
- name: Setup Rustc Cache
uses: Swatinem/rust-cache@v2
- name: Install TileDB
uses: ./.github/actions/install-tiledb
- name: Check Formatting
run: cargo fmt --quiet --check
- name: Lint
run: cargo clippy --no-deps --all-targets --all-features -- -Dwarnings
check-pr-title:
name: "Check Title Format"
if: ${{ github.ref != 'refs/heads/main' }}
runs-on: ubuntu-latest
steps:
- name: "Check Title Format"
shell: python
env:
PR_TITLE: ${{ github.event.pull_request.title }}
run: |
import os
import re
PAT = re.compile(r"^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test){1}(\([\w\-\.]+\))?(!)?: ([\w ])+([\s\S]*)")
if not PAT.match(os.environ["PR_TITLE"]):
print("The pull request title does not match Conventional Commits syntax")
print("See: https://www.conventionalcommits.org/en/v1.0.0/")
exit(1)
check-api-coverage:
name: "Check API Coverage"
runs-on: ubuntu-latest
steps:
- name: Checkout tiledb-rs
uses: actions/checkout@v4
- name: Install Rust Stable
uses: dtolnay/rust-toolchain@stable
- name: Setup Rustc Cache
uses: Swatinem/rust-cache@v2
- name: Install Cargo Expand
run: cargo install cargo-expand
- name: Install TileDB
uses: ./.github/actions/install-tiledb
- name: Build API Coverage Tool
run: cd tools/api-coverage && cargo build
- name: Calculate Coverage
run: ./target/debug/api-coverage 2>&1 >> $GITHUB_STEP_SUMMARY