Skip to content

Commit 2505960

Browse files
committed
Build Debian packages from datom-c
1 parent af45cd4 commit 2505960

File tree

3 files changed

+38
-0
lines changed

3 files changed

+38
-0
lines changed

.github/workflows/ci.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,3 +153,24 @@ jobs:
153153
cache: "gradle"
154154
- uses: Swatinem/rust-cache@v1
155155
- run: cargo test --all --verbose -- --nocapture
156+
157+
deb:
158+
name: Build Debian packages
159+
runs-on: ubuntu-latest
160+
steps:
161+
- uses: actions/checkout@v2
162+
- uses: actions-rs/toolchain@v1
163+
with:
164+
toolchain: "1.63"
165+
profile: minimal
166+
override: true
167+
- uses: Swatinem/rust-cache@v1
168+
- run: cargo install cargo-deb cbindgen
169+
- run: cd datom-c && ./run_cbindgen.sh
170+
- run: cargo deb -p datom-c --variant lib
171+
- run: cargo deb -p datom-c --variant dev
172+
- run: sudo apt-get install -y ./target/debian/*.deb
173+
- uses: actions/upload-artifact@v3
174+
with:
175+
name: debian-packages
176+
path: target/debian

datom-c/Cargo.toml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,20 @@ libc = "0.2"
2525

2626
[build-dependencies]
2727
cbindgen = "0.24"
28+
29+
[package.metadata.deb.variants.lib]
30+
name = "libdatom"
31+
extended-description = "C bindings for an open-source database inspired by Datomic"
32+
depends = "$auto"
33+
assets = [
34+
["target/release/libdatom_c.so", "usr/lib/libdatom.so", "644"],
35+
]
36+
37+
[package.metadata.deb.variants.dev]
38+
name = "libdatom-dev"
39+
depends = "$auto, libdatom"
40+
extended-description = "Development files for C bindings for an open-source database inspired by Datomic"
41+
assets = [
42+
["target/release/libdatom_c.a", "usr/lib/libdatom.a", "644"],
43+
["datom.h", "usr/include/", "644"]
44+
]

datom-c/run_cbindgen.sh

100644100755
File mode changed.

0 commit comments

Comments
 (0)