Add Windows support to builds and enhance multi-platform configuration
Some checks failed
ci/someci/tag/woodpecker/1 Pipeline was successful
ci/someci/tag/woodpecker/2 Pipeline was successful
ci/someci/tag/woodpecker/3 Pipeline failed
ci/someci/tag/woodpecker/4 Pipeline failed
ci/someci/tag/woodpecker/5 Pipeline failed
ci/someci/tag/woodpecker/6 Pipeline failed
ci/someci/tag/woodpecker/7 Pipeline failed
Some checks failed
ci/someci/tag/woodpecker/1 Pipeline was successful
ci/someci/tag/woodpecker/2 Pipeline was successful
ci/someci/tag/woodpecker/3 Pipeline failed
ci/someci/tag/woodpecker/4 Pipeline failed
ci/someci/tag/woodpecker/5 Pipeline failed
ci/someci/tag/woodpecker/6 Pipeline failed
ci/someci/tag/woodpecker/7 Pipeline failed
- Introduce `.cargo/config.toml` with platform-specific linker and flags. - Update Woodpecker CI to include Windows target, adjust build and packaging steps. - Modify `Cargo.toml` to use `reqwest` with `rustls-tls` for TLS support.
This commit is contained in:
20
.cargo/config.toml
Normal file
20
.cargo/config.toml
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
[target.x86_64-unknown-linux-musl]
|
||||||
|
linker = "x86_64-linux-gnu-gcc"
|
||||||
|
rustflags = ["-C", "target-feature=+crt-static", "-C", "link-arg=-lgcc"]
|
||||||
|
|
||||||
|
[target.aarch64-unknown-linux-gnu]
|
||||||
|
linker = "aarch64-linux-gnu-gcc"
|
||||||
|
|
||||||
|
[target.aarch64-unknown-linux-musl]
|
||||||
|
linker = "aarch64-linux-gnu-gcc"
|
||||||
|
rustflags = ["-C", "target-feature=+crt-static", "-C", "link-arg=-lgcc"]
|
||||||
|
|
||||||
|
[target.armv7-unknown-linux-gnueabihf]
|
||||||
|
linker = "arm-linux-gnueabihf-gcc"
|
||||||
|
|
||||||
|
[target.armv7-unknown-linux-musleabihf]
|
||||||
|
linker = "arm-linux-gnueabihf-gcc"
|
||||||
|
rustflags = ["-C", "target-feature=+crt-static", "-C", "link-arg=-lgcc"]
|
||||||
|
|
||||||
|
[target.x86_64-pc-windows-gnu]
|
||||||
|
linker = "x86_64-w64-mingw32-gcc"
|
||||||
@@ -11,28 +11,39 @@ matrix:
|
|||||||
- TARGET: x86_64-unknown-linux-gnu
|
- TARGET: x86_64-unknown-linux-gnu
|
||||||
ARTIFACT: owlen-linux-x86_64-gnu
|
ARTIFACT: owlen-linux-x86_64-gnu
|
||||||
PLATFORM: linux
|
PLATFORM: linux
|
||||||
|
EXT: ""
|
||||||
- TARGET: x86_64-unknown-linux-musl
|
- TARGET: x86_64-unknown-linux-musl
|
||||||
ARTIFACT: owlen-linux-x86_64-musl
|
ARTIFACT: owlen-linux-x86_64-musl
|
||||||
PLATFORM: linux
|
PLATFORM: linux
|
||||||
|
EXT: ""
|
||||||
- TARGET: aarch64-unknown-linux-gnu
|
- TARGET: aarch64-unknown-linux-gnu
|
||||||
ARTIFACT: owlen-linux-aarch64-gnu
|
ARTIFACT: owlen-linux-aarch64-gnu
|
||||||
PLATFORM: linux
|
PLATFORM: linux
|
||||||
|
EXT: ""
|
||||||
- TARGET: aarch64-unknown-linux-musl
|
- TARGET: aarch64-unknown-linux-musl
|
||||||
ARTIFACT: owlen-linux-aarch64-musl
|
ARTIFACT: owlen-linux-aarch64-musl
|
||||||
PLATFORM: linux
|
PLATFORM: linux
|
||||||
|
EXT: ""
|
||||||
- TARGET: armv7-unknown-linux-gnueabihf
|
- TARGET: armv7-unknown-linux-gnueabihf
|
||||||
ARTIFACT: owlen-linux-armv7-gnu
|
ARTIFACT: owlen-linux-armv7-gnu
|
||||||
PLATFORM: linux
|
PLATFORM: linux
|
||||||
|
EXT: ""
|
||||||
- TARGET: armv7-unknown-linux-musleabihf
|
- TARGET: armv7-unknown-linux-musleabihf
|
||||||
ARTIFACT: owlen-linux-armv7-musl
|
ARTIFACT: owlen-linux-armv7-musl
|
||||||
PLATFORM: linux
|
PLATFORM: linux
|
||||||
|
EXT: ""
|
||||||
|
# Windows
|
||||||
|
- TARGET: x86_64-pc-windows-gnu
|
||||||
|
ARTIFACT: owlen-windows-x86_64
|
||||||
|
PLATFORM: windows
|
||||||
|
EXT: ".exe"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: install-deps
|
- name: install-deps
|
||||||
image: *rust_image
|
image: *rust_image
|
||||||
commands:
|
commands:
|
||||||
- apt-get update
|
- apt-get update
|
||||||
- apt-get install -y musl-tools gcc-aarch64-linux-gnu gcc-arm-linux-gnueabihf
|
- apt-get install -y musl-tools gcc-aarch64-linux-gnu gcc-arm-linux-gnueabihf gcc-mingw-w64-x86-64 zip
|
||||||
|
|
||||||
- name: build
|
- name: build
|
||||||
image: *rust_image
|
image: *rust_image
|
||||||
@@ -54,6 +65,9 @@ steps:
|
|||||||
export CARGO_TARGET_ARMV7_UNKNOWN_LINUX_MUSLEABIHF_LINKER=arm-linux-gnueabihf-gcc
|
export CARGO_TARGET_ARMV7_UNKNOWN_LINUX_MUSLEABIHF_LINKER=arm-linux-gnueabihf-gcc
|
||||||
export CC_armv7_unknown_linux_musleabihf=arm-linux-gnueabihf-gcc
|
export CC_armv7_unknown_linux_musleabihf=arm-linux-gnueabihf-gcc
|
||||||
;;
|
;;
|
||||||
|
x86_64-pc-windows-gnu)
|
||||||
|
export CARGO_TARGET_X86_64_PC_WINDOWS_GNU_LINKER=x86_64-w64-mingw32-gcc
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
- cargo build --release --all-features --target ${TARGET}
|
- cargo build --release --all-features --target ${TARGET}
|
||||||
|
|
||||||
@@ -61,13 +75,24 @@ steps:
|
|||||||
image: *rust_image
|
image: *rust_image
|
||||||
commands:
|
commands:
|
||||||
- mkdir -p dist
|
- mkdir -p dist
|
||||||
- cp target/${TARGET}/release/owlen dist/owlen
|
- |
|
||||||
- cp target/${TARGET}/release/owlen-code dist/owlen-code
|
if [ "${PLATFORM}" = "windows" ]; then
|
||||||
- cd dist
|
cp target/${TARGET}/release/owlen.exe dist/owlen.exe
|
||||||
- tar czf ${ARTIFACT}.tar.gz owlen owlen-code
|
cp target/${TARGET}/release/owlen-code.exe dist/owlen-code.exe
|
||||||
- cd ..
|
cd dist
|
||||||
- mv dist/${ARTIFACT}.tar.gz .
|
zip -9 ${ARTIFACT}.zip owlen.exe owlen-code.exe
|
||||||
- sha256sum ${ARTIFACT}.tar.gz > ${ARTIFACT}.tar.gz.sha256
|
cd ..
|
||||||
|
mv dist/${ARTIFACT}.zip .
|
||||||
|
sha256sum ${ARTIFACT}.zip > ${ARTIFACT}.zip.sha256
|
||||||
|
else
|
||||||
|
cp target/${TARGET}/release/owlen dist/owlen
|
||||||
|
cp target/${TARGET}/release/owlen-code dist/owlen-code
|
||||||
|
cd dist
|
||||||
|
tar czf ${ARTIFACT}.tar.gz owlen owlen-code
|
||||||
|
cd ..
|
||||||
|
mv dist/${ARTIFACT}.tar.gz .
|
||||||
|
sha256sum ${ARTIFACT}.tar.gz > ${ARTIFACT}.tar.gz.sha256
|
||||||
|
fi
|
||||||
|
|
||||||
- name: release
|
- name: release
|
||||||
image: plugins/gitea-release
|
image: plugins/gitea-release
|
||||||
@@ -78,5 +103,7 @@ steps:
|
|||||||
files:
|
files:
|
||||||
- ${ARTIFACT}.tar.gz
|
- ${ARTIFACT}.tar.gz
|
||||||
- ${ARTIFACT}.tar.gz.sha256
|
- ${ARTIFACT}.tar.gz.sha256
|
||||||
|
- ${ARTIFACT}.zip
|
||||||
|
- ${ARTIFACT}.zip.sha256
|
||||||
title: Release ${CI_COMMIT_TAG}
|
title: Release ${CI_COMMIT_TAG}
|
||||||
note: "Release ${CI_COMMIT_TAG}"
|
note: "Release ${CI_COMMIT_TAG}"
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ crossterm = "0.28"
|
|||||||
tui-textarea = "0.6"
|
tui-textarea = "0.6"
|
||||||
|
|
||||||
# HTTP client and JSON handling
|
# HTTP client and JSON handling
|
||||||
reqwest = { version = "0.12", features = ["json", "stream"] }
|
reqwest = { version = "0.12", default-features = false, features = ["json", "stream", "rustls-tls"] }
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user