File tree Expand file tree Collapse file tree 3 files changed +78
-3
lines changed Expand file tree Collapse file tree 3 files changed +78
-3
lines changed Original file line number Diff line number Diff line change 28
28
29
29
- name : Build rusts-ffi
30
30
run : |
31
- cargo cinstall --features cert_compression --release --prefix dist --target x86_64-pc-windows-msvc
31
+ cargo cinstall --locked --target x86_64-pc-windows-msvc --features cert_compression --release --prefix dist
32
32
33
33
- name : Upload binaries
34
34
uses : actions/upload-artifact@v4
68
68
name : rustls-ffi-x86_64-linux-gnu
69
69
path : dist
70
70
71
+ linux-deb :
72
+ runs-on : ubuntu-20.04 # x86_64. Using older Ubuntu for greater GLIBC compat.
73
+ steps :
74
+ - uses : actions/checkout@v4
75
+ with :
76
+ persist-credentials : false
77
+
78
+ - name : Install stable Rust
79
+ uses : dtolnay/rust-toolchain@stable
80
+
81
+ - name : Install cargo-c (Ubuntu)
82
+ env :
83
+ LINK : https://github.com/lu-zero/cargo-c/releases/latest/download
84
+ CARGO_C_FILE : cargo-c-x86_64-unknown-linux-musl.tar.gz
85
+ run : |
86
+ curl -L $LINK/$CARGO_C_FILE | tar xz -C ~/.cargo/bin
87
+
88
+ - name : Build deb
89
+ run : ./debian/build.sh
90
+
91
+ - name : Upload deb
92
+ uses : actions/upload-artifact@v4
93
+ with :
94
+ name : librustls_0.15.0_amd64.deb
95
+ path : librustls_0.15.0_amd64.deb
96
+
71
97
macos-binaries-arm64 :
72
98
runs-on : macos-14 # arm64.
73
99
steps :
88
114
89
115
- name : Build rusts-ffi
90
116
run : |
91
- cargo cinstall --features cert_compression --release --prefix dist
117
+ cargo cinstall --locked -- features cert_compression --release --prefix dist
92
118
93
119
- name : Fix rpath
94
120
run : |
@@ -116,7 +142,7 @@ jobs:
116
142
117
143
- name : Build rusts-ffi
118
144
run : |
119
- cargo cinstall --features cert_compression --release --prefix dist
145
+ cargo cinstall --locked -- features cert_compression --release --prefix dist
120
146
121
147
- name : Fix rpath
122
148
run : |
Original file line number Diff line number Diff line change @@ -4,3 +4,5 @@ librustls/cmake-build*
4
4
.idea
5
5
.venv
6
6
.vs
7
+ debian /usr
8
+ debian /DEBIAN
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+ set -eu
3
+ set -x
4
+
5
+ cd " $( dirname " $0 " ) "
6
+
7
+ VERSION=$( sed -n ' s/^version = "\(.*\)"$/\1/p' ../librustls/Cargo.toml)
8
+ if [ -z " $VERSION " ]; then
9
+ echo " Failed to extract version from Cargo.toml" >&2
10
+ exit 1
11
+ fi
12
+
13
+ PACKAGE=" librustls"
14
+ ARCH=" amd64"
15
+ DIST_DIR=" /tmp/dist"
16
+ DEB_ROOT=" ."
17
+
18
+ CC=clang CXX=clang cargo cinstall --locked --features cert_compression --release --prefix " ${DIST_DIR} "
19
+
20
+ mkdir -p " ${DEB_ROOT} /usr/" {lib,include}
21
+ mkdir -p " ${DEB_ROOT} /DEBIAN"
22
+
23
+ cp -r " ${DIST_DIR} /lib/" * " ${DEB_ROOT} /usr/lib/"
24
+ cp -r " ${DIST_DIR} /include/" * " ${DEB_ROOT} /usr/include/"
25
+
26
+ sed -i " s|prefix=.*|prefix=/usr|" " ${DEB_ROOT} /usr/lib/x86_64-linux-gnu/pkgconfig/rustls.pc"
27
+
28
+ cat > " ${DEB_ROOT} /DEBIAN/control" << EOF
29
+ Package: ${PACKAGE}
30
+ Version: ${VERSION}
31
+ Architecture: ${ARCH}
32
+ Maintainer: Daniel McCarney <[email protected] >
33
+ Description: FFI bindings for the Rustls TLS library
34
+ Section: libs
35
+ Depends: libc6
36
+ Priority: optional
37
+ EOF
38
+
39
+ cat > " ${DEB_ROOT} /DEBIAN/postinst" << EOF
40
+ #!/bin/sh
41
+ set -e
42
+ ldconfig
43
+ EOF
44
+ chmod 755 " ${DEB_ROOT} /DEBIAN/postinst"
45
+
46
+ cd ..
47
+ dpkg-deb --build debian " ${PACKAGE} _${VERSION} _${ARCH} .deb"
You can’t perform that action at this time.
0 commit comments