Skip to content

Commit 20ecfa7

Browse files
committed
ci: use vendored openssl
1 parent dcf3999 commit 20ecfa7

File tree

3 files changed

+7
-30
lines changed

3 files changed

+7
-30
lines changed

.github/workflows/release.yaml

Lines changed: 4 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -80,53 +80,27 @@ jobs:
8080
scoop install llvm yasm
8181
- if: matrix.os == 'ubuntu-22.04' && matrix.build_type == 'portable'
8282
name: Build linux portable (x86_64)
83-
run: |
84-
export PWD_DIR=$(pwd)
85-
curl -LO https://www.openssl.org/source/openssl-1.1.1s.tar.gz
86-
tar -xzf openssl-1.1.1s.tar.gz
87-
cd openssl-1.1.1s
88-
./Configure linux-x86_64 shared
89-
make
90-
cd ..
91-
export OPENSSL_LIB_DIR=${PWD_DIR}/openssl-1.1.1s
92-
export OPENSSL_INCLUDE_DIR=${PWD_DIR}/openssl-1.1.1s/include
93-
export OPENSSL_STATIC=1
94-
cargo build --release --features portable
83+
run: cargo build --release --features portable,vendored-openssl
9584
- if: matrix.os == 'ubuntu-22.04' && matrix.build_type == 'standard'
9685
name: Build linux (x86_64)
9786
run: cargo build --release
9887
- if: matrix.os == 'ubuntu-22.04-arm' && matrix.build_type == 'portable'
9988
name: Build linux portable (aarch64)
100-
run: |
101-
export PWD_DIR=$(pwd)
102-
curl -LO https://www.openssl.org/source/openssl-1.1.1s.tar.gz
103-
tar -xzf openssl-1.1.1s.tar.gz
104-
cd openssl-1.1.1s
105-
./Configure linux-aarch64 shared
106-
make
107-
cd ..
108-
export OPENSSL_LIB_DIR=${PWD_DIR}/openssl-1.1.1s
109-
export OPENSSL_INCLUDE_DIR=${PWD_DIR}/openssl-1.1.1s/include
110-
export OPENSSL_STATIC=1
111-
cargo build --release --features portable
89+
run: cargo build --release --features portable,vendored-openssl
11290
- if: matrix.os == 'ubuntu-22.04-arm' && matrix.build_type == 'standard'
11391
name: Build linux (aarch64)
11492
run: cargo build --release
11593
- if: matrix.os == 'macos-15-intel' && matrix.build_type == 'portable'
11694
name: Build macos portable (x86_64)
117-
run: |
118-
export OPENSSL_LIB_DIR=/usr/local/opt/openssl@1.1/lib
119-
export OPENSSL_INCLUDE_DIR=/usr/local/opt/openssl@1.1/include
120-
export OPENSSL_STATIC=1
121-
cargo build --release --features portable
95+
run: cargo build --release --features portable,vendored-openssl
12296
- if: matrix.os == 'macos-15' && matrix.build_type == 'standard'
12397
name: Build macos (aarch64)
12498
run: |
12599
export OPENSSL_LIB_DIR=/opt/homebrew/opt/openssl@1.1/lib
126100
export OPENSSL_INCLUDE_DIR=/opt/homebrew/opt/openssl@1.1/include
127101
export OPENSSL_STATIC=1
128102
cargo build --release
129-
- if: matrix.os == 'windows-2022'
103+
- if: matrix.os == 'windows-2022' && matrix.build_type == 'standard'
130104
name: Build windows
131105
run: cargo build --release
132106
- name: Get the Version

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

light-client-bin/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ rocksdb = { package = "ckb-rocksdb", version = "=0.21.1", features = [
3232
], default-features = false }
3333
env_logger = "0.11"
3434
anyhow = "1.0.56"
35+
openssl = { version = "0.10", optional = true }
3536

3637
[target.'cfg(not(target_env = "msvc"))'.dependencies]
3738
tikv-jemallocator = "0.6"
@@ -49,6 +50,7 @@ tempfile = "3.0"
4950
default = []
5051
portable = ["rocksdb/portable"]
5152
march-native = ["rocksdb/march-native"]
53+
vendored-openssl = ["openssl/vendored"]
5254

5355
# [profile.release]
5456
# overflow-checks = true

0 commit comments

Comments
 (0)