Build this way

This commit is contained in:
QuantumEntangledAndy committed 2023-05-03 16:00:25 +07:00
1 parent c20b944411
commit 26d894222a
4 files changed
+7 -8

No files matched your search

+1 -4
View File
@@ -136,8 +136,6 @@ jobs:
- name: Install rustup
run: |
curl https://sh.rustup.rs -sSf | sh -s -- --no-modify-path --quiet -y
. "$HOME/.cargo/env"
rustup toolchain install nightly
echo "${HOME}/.cargo/bin" >> "${GITHUB_PATH}"
- name: Install ${{ matrix.arch }} Rust toolchain
run: |
@@ -146,13 +144,12 @@ jobs:
TARGET: ${{ matrix.target }}
- name: Build
run: |
cargo +nightly build --verbose --release --all-features --target=${TARGET}
cargo build --verbose --release --all-features --target=${TARGET}
env:
# Retarget pkg-config as described in https://www.freedesktop.org/wiki/Software/pkg-config/CrossCompileProposal/
PKG_CONFIG_ALLOW_CROSS: 1
PKG_CONFIG_LIBDIR: /usr/lib/${{ matrix.pkgconfig }}/pkgconfig
TARGET: ${{ matrix.target }}
RUSTFLAGS: "--cfg tokio_unstable"
- uses: actions/upload-artifact@v3
with:
name: release-${{ matrix.arch }}-bullseye
+1 -1
View File
@@ -30,7 +30,7 @@ regex = "1.7.3"
rumqttc = "0.20.0"
serde = { version = "1.0.160", features = ["derive"] }
time = "0.3.20"
tokio = { version = "1.27.0", features = ["rt", "macros", "io-util"] } # rt-multi-thread
tokio = { version = "1.27.0", features = ["rt-multi-thread", "macros", "io-util", "tracing"] }
tokio-stream = "0.1.12"
toml = "0.7.3"
validator = "0.16.0"
+1 -1
View File
@@ -28,7 +28,7 @@ serde = { version = "1.0.106", features = ["derive"] }
time = { version = "0.3.20" , features = [ "macros", "parsing", "local-offset" ]}
tokio = { version = "1.27.0", features = ["full"] }
tokio-stream = { version = "0.1.12", features = ["sync", "time", "net"] }
tokio-util = { version = "0.7.7", features = ["full"] }
tokio-util = { version = "0.7.7", features = ["full", "tracing"] }
yaserde = "0.8.0"
yaserde_derive = "0.8.0"
+4 -2
View File
@@ -51,12 +51,14 @@ fn tokio_console_enable() {
}
#[cfg(not(tokio_unstable))]
fn tokio_console_enable() {}
fn tokio_console_enable() {
debug!("Tokio Console Disabled");
}
#[tokio::main]
async fn main() -> Result<()> {
tokio_console_enable();
env_logger::Builder::from_env(Env::default().default_filter_or("info")).init();
tokio_console_enable();
info!(
"Neolink {} {}",