chore: upgrade build

- Drop tls for embedded devices in release
- Upgrade cross
This commit is contained in:
Yujia Qiao 2023-10-01 15:28:14 +08:00
parent 3aa6557696
commit 35ca91b664
No known key found for this signature in database
GPG Key ID: DC129173B148701B
2 changed files with 10 additions and 3 deletions

View File

@ -68,11 +68,14 @@ jobs:
profile: minimal
toolchain: stable
- name: Install cross
run: cargo install --version 0.1.16 cross
run: cargo install --version 0.2.5 cross
- name: Use Compile Features For Embedded
if: contains(matrix.target, 'mips') || contains(matrix.target, 'arm')
run: echo "RATHOLE_FEATURES=embedded" >> $GITHUB_ENV
- name: Run tests
run: cross test --release --target ${{ matrix.target }} --verbose
run: cross test --release --target ${{ matrix.target }} --verbose --features ${RATHOLE_FEATURES:-default}
- name: Build release
run: cross build --release --target ${{ matrix.target }}
run: cross build --release --target ${{ matrix.target }} --features ${RATHOLE_FEATURES:-default}
- name: Run UPX
# Upx may not support some platforms. Ignore the errors
continue-on-error: true

View File

@ -26,6 +26,10 @@ websocket = ["tokio-tungstenite", "tokio-util", "futures-core", "futures-sink",
# Configuration hot-reload support
hot-reload = ["notify"]
# Default feature releasing embedded devices
# Cross-compiling with tls is hard. So we don't :(
embedded = ["server", "client", "hot-reload", "noise"]
# Feature to enable tokio-console. Disabled by default.
# Don't enable it unless for debugging purposes.
console = ["console-subscriber", "tokio/tracing"]