diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4fc1d3f..b6e5c10 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 diff --git a/Cargo.toml b/Cargo.toml index 501e8fa..1311f88 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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"]