-
Notifications
You must be signed in to change notification settings - Fork 32
129 lines (105 loc) · 3.67 KB
/
artifacts.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
name: binary artifacts
permissions:
contents: read
on:
push:
pull_request:
jobs:
windows-binaries:
runs-on: windows-2022 # x86_64
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Install stable Rust
uses: dtolnay/rust-toolchain@stable
- name: Install cargo-c
env:
LINK: https://github.com/lu-zero/cargo-c/releases/latest/download
CARGO_C_FILE: cargo-c-windows-msvc.zip
run: |
curl -L "$env:LINK/$env:CARGO_C_FILE" -o cargo-c-windows-msvc.zip
powershell -Command "Expand-Archive -Path cargo-c-windows-msvc.zip -DestinationPath $env:USERPROFILE\\.cargo\\bin -Force"
- name: Build rusts-ffi
run: |
cargo cinstall --features cert_compression --release --prefix dist --target x86_64-pc-windows-msvc
- name: Upload binaries
uses: actions/upload-artifact@v4
with:
name: rustls-ffi-x86_64-windows
path: dist
linux-binaries:
runs-on: ubuntu-20.04 # x86_64. Using older Ubuntu for greater GLIBC compat.
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Install stable Rust
uses: dtolnay/rust-toolchain@stable
- name: Install cargo-c (Ubuntu)
env:
LINK: https://github.com/lu-zero/cargo-c/releases/latest/download
CARGO_C_FILE: cargo-c-x86_64-unknown-linux-musl.tar.gz
run: |
curl -L $LINK/$CARGO_C_FILE | tar xz -C ~/.cargo/bin
- name: Build rusts-ffi
# The Ubuntu 20.04 GCC is too old to build aws-lc.
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95189.
env:
CC: clang
CXX: clang
run: |
cargo cinstall --locked --target x86_64-unknown-linux-gnu --features cert_compression --release --prefix dist
- name: Upload binaries
uses: actions/upload-artifact@v4
with:
name: rustls-ffi-x86_64-linux-gnu
path: dist
macos-binaries-arm64:
runs-on: macos-14 # arm64.
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Install stable Rust
uses: dtolnay/rust-toolchain@stable
- name: Install cargo-c (macOS)
env:
LINK: https://github.com/lu-zero/cargo-c/releases/latest/download
CARGO_C_FILE: cargo-c-macos.zip
run: |
curl -L $LINK/$CARGO_C_FILE -o cargo-c-macos.zip
unzip cargo-c-macos.zip -d ~/.cargo/bin
- name: Build rusts-ffi
run: |
cargo cinstall --features cert_compression --release --prefix dist
- name: Fix rpath
run: |
install_name_tool -id @rpath/librustls.dylib dist/lib/librustls.dylib
- name: Upload binaries
uses: actions/upload-artifact@v4
with:
name: rustls-ffi-arm64-macos
path: dist
macos-binaries-x86_64:
runs-on: macos-13 # x86_64.
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Install stable Rust
uses: dtolnay/rust-toolchain@stable
- name: Install cargo-c (macOS)
# This is slow, but upstream doesn't publish cargo-c binaries for x86_64 macos
run: cargo install cargo-c
- name: Build rusts-ffi
run: |
cargo cinstall --features cert_compression --release --prefix dist
- name: Fix rpath
run: |
install_name_tool -id @rpath/librustls.dylib dist/lib/librustls.dylib
- name: Upload binaries
uses: actions/upload-artifact@v4
with:
name: rustls-ffi-x86_64-macos
path: dist