Skip to content

Commit e98fee9

Browse files
authored
add linux and macos arm64 release build (#265)
Signed-off-by: Eval EXEC <execvy@gmail.com>
1 parent 876eb7a commit e98fee9

File tree

3 files changed

+38
-32
lines changed

3 files changed

+38
-32
lines changed

.github/workflows/release.yaml

Lines changed: 35 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -34,21 +34,33 @@ jobs:
3434
runs-on: ${{ matrix.os }}
3535
strategy:
3636
matrix:
37-
os: [ ubuntu-22.04, ubuntu-24.04, macos-15-intel, macos-14, windows-2022 ]
3837
include:
3938
- os: ubuntu-22.04
39+
build_type: portable
4040
bin_suffix:
4141
pkg_suffix: x86_64-linux-portable
42-
- os: ubuntu-24.04
42+
- os: ubuntu-22.04
43+
build_type: standard
4344
bin_suffix:
4445
pkg_suffix: x86_64-linux
46+
- os: ubuntu-22.04-arm
47+
build_type: portable
48+
bin_suffix:
49+
pkg_suffix: aarch64-linux-portable
50+
- os: ubuntu-22.04-arm
51+
build_type: standard
52+
bin_suffix:
53+
pkg_suffix: aarch64-linux
4554
- os: macos-15-intel
55+
build_type: portable
4656
bin_suffix:
4757
pkg_suffix: x86_64-darwin-portable
48-
- os: macos-14
58+
- os: macos-15
59+
build_type: standard
4960
bin_suffix:
50-
pkg_suffix: x86_64-darwin
61+
pkg_suffix: aarch64-darwin
5162
- os: windows-2022
63+
build_type: standard
5264
bin_suffix: .exe
5365
pkg_suffix: x86_64-windows
5466
steps:
@@ -66,38 +78,29 @@ jobs:
6678
echo "LIBCLANG_PATH=$($HOME)/scoop/apps/llvm/current/bin" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
6779
echo "$env:USERPROFILE\scoop\shims" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
6880
scoop install llvm yasm
69-
- if: matrix.os == 'ubuntu-22.04'
70-
name: Build linux portable
71-
run: |
72-
export PWD_DIR=$(pwd)
73-
curl -LO https://www.openssl.org/source/openssl-1.1.1s.tar.gz
74-
tar -xzf openssl-1.1.1s.tar.gz
75-
cd openssl-1.1.1s
76-
./Configure linux-x86_64 shared
77-
make
78-
cd ..
79-
export OPENSSL_LIB_DIR=${PWD_DIR}/openssl-1.1.1s
80-
export OPENSSL_INCLUDE_DIR=${PWD_DIR}/openssl-1.1.1s/include
81-
export OPENSSL_STATIC=1
82-
cargo build --release --features portable
83-
- if: matrix.os == 'ubuntu-24.04'
84-
name: Build linux
81+
- if: matrix.os == 'ubuntu-22.04' && matrix.build_type == 'portable'
82+
name: Build linux portable (x86_64)
83+
run: cargo build --release --features portable,vendored-openssl
84+
- if: matrix.os == 'ubuntu-22.04' && matrix.build_type == 'standard'
85+
name: Build linux (x86_64)
8586
run: cargo build --release
86-
- if: matrix.os == 'macos-15-intel'
87-
name: Build macos portable
88-
run: |
89-
export OPENSSL_LIB_DIR=/usr/local/opt/openssl@1.1/lib
90-
export OPENSSL_INCLUDE_DIR=/usr/local/opt/openssl@1.1/include
91-
export OPENSSL_STATIC=1
92-
cargo build --release --features portable
93-
- if: matrix.os == 'macos-14'
94-
name: Build macos
87+
- if: matrix.os == 'ubuntu-22.04-arm' && matrix.build_type == 'portable'
88+
name: Build linux portable (aarch64)
89+
run: cargo build --release --features portable,vendored-openssl
90+
- if: matrix.os == 'ubuntu-22.04-arm' && matrix.build_type == 'standard'
91+
name: Build linux (aarch64)
92+
run: cargo build --release
93+
- if: matrix.os == 'macos-15-intel' && matrix.build_type == 'portable'
94+
name: Build macos portable (x86_64)
95+
run: cargo build --release --features portable,vendored-openssl
96+
- if: matrix.os == 'macos-15' && matrix.build_type == 'standard'
97+
name: Build macos (aarch64)
9598
run: |
96-
export OPENSSL_LIB_DIR=/usr/local/opt/openssl@1.1/lib
97-
export OPENSSL_INCLUDE_DIR=/usr/local/opt/openssl@1.1/include
99+
export OPENSSL_LIB_DIR=/opt/homebrew/opt/openssl@1.1/lib
100+
export OPENSSL_INCLUDE_DIR=/opt/homebrew/opt/openssl@1.1/include
98101
export OPENSSL_STATIC=1
99102
cargo build --release
100-
- if: matrix.os == 'windows-2022'
103+
- if: matrix.os == 'windows-2022' && matrix.build_type == 'standard'
101104
name: Build windows
102105
run: cargo build --release
103106
- 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, optional = true }
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"
@@ -51,6 +52,7 @@ portable = ["rocksdb", "rocksdb/portable", "ckb-light-client-lib/rocksdb"]
5152
march-native = ["rocksdb", "rocksdb/march-native", "ckb-light-client-lib/rocksdb"]
5253
sqlite = ["ckb-light-client-lib/sqlite"]
5354
rocksdb = ["dep:rocksdb"]
55+
vendored-openssl = ["openssl/vendored"]
5456

5557
# [profile.release]
5658
# overflow-checks = true

0 commit comments

Comments
 (0)