Skip to content

ga build

ga build #13

Workflow file for this run

name: Build and Test
on: [push, pull_request]
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Check out
uses: actions/checkout@v3
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt, clippy
- name: Install pkg-config (macOS)
if: runner.os == 'macOS'
run: brew install pkg-config
- name: Cache Rust dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Cache pgrx
uses: actions/cache@v3
with:
path: ~/.pgrx
key: ${{ runner.os }}-pgrx-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-pgrx-
- name: Install pgrx
run: |
cargo install --locked cargo-pgrx || true
cargo pgrx init
env:
CARGO_HTTP_TIMEOUT: 300
- name: Lint
run: |
cargo fmt --all -- --check
cargo clippy --all -- -D warnings
- name: Build Extension
run: cargo pgrx package
- name: Upload Extension Artifact
uses: actions/upload-artifact@v3
with:
name: pg_sqids-${{ runner.os }}
path: |
target/release/libpg_sqids.so
target/release/libpg_sqids.dylib
target/release/pg_sqids.dll
- name: Test
run: cargo test --all
check:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v3
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Cache Rust dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-