Skip to content

Commit 78f1157

Browse files
committed
chore: fix build
- Drop tls for embedded devices in release - Upgrade cross - Specify rust 1.71
1 parent 3aa6557 commit 78f1157

File tree

2 files changed

+48
-4
lines changed

2 files changed

+48
-4
lines changed

.github/workflows/release.yml

Lines changed: 44 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,59 +20,99 @@ jobs:
2020
- os: ubuntu-latest
2121
target: x86_64-unknown-linux-gnu
2222
exe: rathole
23+
cross: false
2324
- os: ubuntu-latest
2425
target: x86_64-unknown-linux-musl
2526
exe: rathole
27+
cross: false
2628
- os: ubuntu-latest
2729
target: aarch64-unknown-linux-musl
2830
exe: rathole
31+
cross: true
2932
- os: ubuntu-latest
3033
target: arm-unknown-linux-musleabi
3134
exe: rathole
35+
cross: true
3236
- os: ubuntu-latest
3337
target: arm-unknown-linux-musleabihf
3438
exe: rathole
39+
cross: true
3540
- os: ubuntu-latest
3641
target: armv7-unknown-linux-musleabihf
3742
exe: rathole
43+
cross: true
3844
- os: ubuntu-latest
3945
target: mips-unknown-linux-gnu
4046
exe: rathole
47+
cross: true
4148
- os: ubuntu-latest
4249
target: mips-unknown-linux-musl
4350
exe: rathole
51+
cross: true
4452
- os: ubuntu-latest
4553
target: mipsel-unknown-linux-gnu
4654
exe: rathole
55+
cross: true
4756
- os: ubuntu-latest
4857
target: mipsel-unknown-linux-musl
4958
exe: rathole
59+
cross: true
5060
- os: ubuntu-latest
5161
target: mips64-unknown-linux-gnuabi64
5262
exe: rathole
63+
cross: true
5364
- os: ubuntu-latest
5465
target: mips64el-unknown-linux-gnuabi64
5566
exe: rathole
67+
cross: true
5668

5769
- os: macos-latest
5870
target: x86_64-apple-darwin
5971
exe: rathole
72+
cross: false
6073

6174
- os: windows-latest
6275
target: x86_64-pc-windows-msvc
6376
exe: rathole.exe
77+
cross: false
6478
steps:
6579
- uses: actions/checkout@v2
6680
- uses: actions-rs/toolchain@v1
6781
with:
6882
profile: minimal
69-
toolchain: stable
83+
# Since rust 1.72, some platforms are tier 3
84+
toolchain: 1.71
85+
default: true
86+
87+
- name: Install OpenSSL
88+
if: matrix.os == 'ubuntu-latest'
89+
run: sudo apt-get install pkg-config libssl-dev
90+
- name: Install OpenSSL
91+
if: matrix.os == 'macos-latest'
92+
run: brew install openssl@3
93+
94+
# Native build
95+
- name: Install target
96+
if: matrix.cross == false
97+
run: rustup target add ${{ matrix.target }}
98+
- name: Run tests
99+
if: matrix.cross == false
100+
run: cargo test --release --target ${{ matrix.target }} --verbose
101+
- name: Build release
102+
if: matrix.cross == false
103+
run: cargo build --release --target ${{ matrix.target }}
104+
105+
# Cross build
70106
- name: Install cross
71-
run: cargo install --version 0.1.16 cross
107+
if: matrix.cross
108+
run: cargo install --version 0.2.5 cross
72109
- name: Run tests
73-
run: cross test --release --target ${{ matrix.target }} --verbose
110+
if: matrix.cross
111+
run: cross test --release --target ${{ matrix.target }} --verbose --features embedded --no-default-features
74112
- name: Build release
75-
run: cross build --release --target ${{ matrix.target }}
113+
if: matrix.cross
114+
run: cross build --release --target ${{ matrix.target }} --features embedded --no-default-features
115+
76116
- name: Run UPX
77117
# Upx may not support some platforms. Ignore the errors
78118
continue-on-error: true

Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ websocket = ["tokio-tungstenite", "tokio-util", "futures-core", "futures-sink",
2626
# Configuration hot-reload support
2727
hot-reload = ["notify"]
2828

29+
# Default feature releasing embedded devices
30+
# Cross-compiling with tls is hard. So we don't :(
31+
embedded = ["server", "client", "hot-reload", "noise"]
32+
2933
# Feature to enable tokio-console. Disabled by default.
3034
# Don't enable it unless for debugging purposes.
3135
console = ["console-subscriber", "tokio/tracing"]

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy