Skip to content

Commit 04893c5

Browse files
committed
ga build
1 parent a76de0c commit 04893c5

File tree

3 files changed

+46
-11
lines changed

3 files changed

+46
-11
lines changed

.github/workflows/tests.yml renamed to .github/workflows/build.yml

+43-8
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,24 @@
1-
name: tests
1+
name: Build and Test
22
on: [push, pull_request]
3+
34
jobs:
4-
check:
5-
runs-on: ubuntu-latest
5+
build:
6+
strategy:
7+
matrix:
8+
os: [ubuntu-latest, macos-latest, windows-latest]
9+
runs-on: ${{ matrix.os }}
610
steps:
711
- name: Check out
812
uses: actions/checkout@v3
13+
914
- name: Install Rust
1015
uses: actions-rs/toolchain@v1
1116
with:
1217
profile: minimal
1318
toolchain: stable
1419
override: true
1520
components: rustfmt, clippy
21+
1622
- name: Set up cargo cache
1723
uses: actions/cache@v3
1824
continue-on-error: false
@@ -25,20 +31,49 @@ jobs:
2531
target/
2632
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
2733
restore-keys: ${{ runner.os }}-cargo-
34+
2835
- name: Install pgrx
2936
run: |
3037
cargo install --locked cargo-pgrx || true
3138
cargo pgrx init
39+
3240
- name: Lint
3341
run: |
34-
rustfmt **/*.rs
42+
cargo fmt --all -- --check
3543
cargo clippy --all -- -D warnings
44+
45+
- name: Build Extension
46+
run: cargo pgrx package
47+
48+
- name: Upload Extension Artifact
49+
uses: actions/upload-artifact@v3
50+
with:
51+
name: pg_sqids-${{ runner.os }}
52+
path: |
53+
target/release/libpg_sqids.so
54+
target/release/libpg_sqids.dylib
55+
target/release/pg_sqids.dll
56+
57+
- name: Test
58+
run: cargo test --all
59+
60+
check:
61+
runs-on: ubuntu-latest
62+
steps:
63+
- name: Check out
64+
uses: actions/checkout@v3
65+
66+
- name: Install Rust
67+
uses: actions-rs/toolchain@v1
68+
with:
69+
profile: minimal
70+
toolchain: stable
71+
override: true
72+
3673
- name: Install cargo check tools
37-
run: |
38-
cargo install --locked cargo-outdated || true
74+
run: cargo install --locked cargo-outdated || true
75+
3976
- name: Check
4077
run: |
4178
cargo outdated --exit-code 1
4279
rm -rf ~/.cargo/advisory-db
43-
- name: Test
44-
run: cargo test --all

Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ pg_test = []
1818

1919
[dependencies]
2020
pgrx = "=0.11.4"
21-
sqids = "0.4.1"
22-
thiserror = "1.0.62"
21+
sqids = "0.4.2"
22+
thiserror = "2.0.8"
2323

2424
[dev-dependencies]
2525
pgrx-tests = "=0.11.4"

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# [Sqids PostgreSQL](https://sqids.org/postgresql)
22

3-
[![Github Actions](https://img.shields.io/github/actions/workflow/status/sqids/sqids-postgresql/tests.yml)](https://github.com/sqids/sqids-postgresql/actions)
3+
[![Github Actions](https://img.shields.io/github/actions/workflow/status/sqids/sqids-postgresql/build.yml)](https://github.com/sqids/sqids-postgresql/actions)
44

55
[Sqids](https://sqids.org/postgresql) (*pronounced "squids"*) is a small library that lets you **generate unique IDs from numbers**. It's good for link shortening, fast & URL-safe ID generation and decoding back into numbers for quicker database lookups.
66

0 commit comments

Comments
 (0)