4 Commits

Author SHA1 Message Date
7234021014 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
- 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.
2025-10-01 20:46:27 +02:00
662d5bd919 Remove Gitea release workflow: deprecate unused configuration and scripts.
Some checks failed
ci/someci/tag/woodpecker/1 Pipeline was successful
ci/someci/tag/woodpecker/2 Pipeline failed
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
2025-10-01 20:10:13 +02:00
263b629257 Add Woodpecker CI and PKGBUILD 2025-10-01 20:08:13 +02:00
ff90b20baa Merge pull request 'Add PKGBUILD and release workflow for package distribution' (#21) from dev into main
Reviewed-on: #21
2025-10-01 20:04:35 +02:00
4 changed files with 130 additions and 150 deletions

20
.cargo/config.toml Normal file
View 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"

View File

@@ -1,149 +0,0 @@
name: Release
on:
push:
tags:
- 'v*'
jobs:
build:
name: Build ${{ matrix.target }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
# Linux
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
artifact_name: owlen-linux-x86_64-gnu
- os: ubuntu-latest
target: x86_64-unknown-linux-musl
artifact_name: owlen-linux-x86_64-musl
- os: ubuntu-latest
target: aarch64-unknown-linux-gnu
artifact_name: owlen-linux-aarch64-gnu
- os: ubuntu-latest
target: aarch64-unknown-linux-musl
artifact_name: owlen-linux-aarch64-musl
- os: ubuntu-latest
target: armv7-unknown-linux-gnueabihf
artifact_name: owlen-linux-armv7-gnu
- os: ubuntu-latest
target: armv7-unknown-linux-musleabihf
artifact_name: owlen-linux-armv7-musl
# Windows
- os: windows-latest
target: x86_64-pc-windows-msvc
artifact_name: owlen-windows-x86_64
- os: windows-latest
target: aarch64-pc-windows-msvc
artifact_name: owlen-windows-aarch64
# macOS
- os: macos-latest
target: x86_64-apple-darwin
artifact_name: owlen-macos-x86_64
- os: macos-latest
target: aarch64-apple-darwin
artifact_name: owlen-macos-aarch64
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Rust
uses: https://github.com/dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Install cross-compilation tools (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y musl-tools gcc-aarch64-linux-gnu gcc-arm-linux-gnueabihf
- name: Build
shell: bash
run: |
case "${{ matrix.target }}" in
aarch64-unknown-linux-gnu)
export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc
;;
aarch64-unknown-linux-musl)
export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER=aarch64-linux-gnu-gcc
export CC_aarch64_unknown_linux_musl=aarch64-linux-gnu-gcc
;;
armv7-unknown-linux-gnueabihf)
export CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER=arm-linux-gnueabihf-gcc
;;
armv7-unknown-linux-musleabihf)
export CARGO_TARGET_ARMV7_UNKNOWN_LINUX_MUSLEABIHF_LINKER=arm-linux-gnueabihf-gcc
export CC_armv7_unknown_linux_musleabihf=arm-linux-gnueabihf-gcc
;;
esac
cargo build --release --all-features --target ${{ matrix.target }}
- name: Package binaries (Unix)
if: runner.os != 'Windows'
run: |
mkdir -p dist
cp target/${{ matrix.target }}/release/owlen dist/owlen
cp target/${{ matrix.target }}/release/owlen-code dist/owlen-code
cd dist
tar czf ${{ matrix.artifact_name }}.tar.gz owlen owlen-code
cd ..
mv dist/${{ matrix.artifact_name }}.tar.gz .
- name: Package binaries (Windows)
if: runner.os == 'Windows'
shell: bash
run: |
mkdir -p dist
cp target/${{ matrix.target }}/release/owlen.exe dist/owlen.exe
cp target/${{ matrix.target }}/release/owlen-code.exe dist/owlen-code.exe
cd dist
7z a -tzip ../${{ matrix.artifact_name }}.zip owlen.exe owlen-code.exe
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact_name }}
path: |
${{ matrix.artifact_name }}.tar.gz
${{ matrix.artifact_name }}.zip
release:
name: Create Release
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Create source tarball
run: |
git archive --format=tar.gz --prefix=owlen/ -o owlen-${{ github.ref_name }}.tar.gz ${{ github.ref_name }}
- name: Generate checksums
shell: bash
run: |
cd artifacts
find . -name "*.tar.gz" -exec mv {} . \; 2>/dev/null || true
find . -name "*.zip" -exec mv {} . \; 2>/dev/null || true
cd ..
mv artifacts/*.tar.gz . 2>/dev/null || true
mv artifacts/*.zip . 2>/dev/null || true
sha256sum *.tar.gz *.zip > checksums.txt 2>/dev/null || sha256sum * > checksums.txt
- name: Create Release
uses: https://gitea.com/gitea/release-action@main
with:
files: |
*.tar.gz
*.zip
checksums.txt
api_key: ${{ secrets.RELEASE_TOKEN }}

109
.woodpecker.yml Normal file
View File

@@ -0,0 +1,109 @@
when:
event: tag
tag: v*
variables:
- &rust_image 'rust:1.83'
matrix:
include:
# Linux
- TARGET: x86_64-unknown-linux-gnu
ARTIFACT: owlen-linux-x86_64-gnu
PLATFORM: linux
EXT: ""
- TARGET: x86_64-unknown-linux-musl
ARTIFACT: owlen-linux-x86_64-musl
PLATFORM: linux
EXT: ""
- TARGET: aarch64-unknown-linux-gnu
ARTIFACT: owlen-linux-aarch64-gnu
PLATFORM: linux
EXT: ""
- TARGET: aarch64-unknown-linux-musl
ARTIFACT: owlen-linux-aarch64-musl
PLATFORM: linux
EXT: ""
- TARGET: armv7-unknown-linux-gnueabihf
ARTIFACT: owlen-linux-armv7-gnu
PLATFORM: linux
EXT: ""
- TARGET: armv7-unknown-linux-musleabihf
ARTIFACT: owlen-linux-armv7-musl
PLATFORM: linux
EXT: ""
# Windows
- TARGET: x86_64-pc-windows-gnu
ARTIFACT: owlen-windows-x86_64
PLATFORM: windows
EXT: ".exe"
steps:
- name: install-deps
image: *rust_image
commands:
- apt-get update
- apt-get install -y musl-tools gcc-aarch64-linux-gnu gcc-arm-linux-gnueabihf gcc-mingw-w64-x86-64 zip
- name: build
image: *rust_image
commands:
- rustup target add ${TARGET}
- |
case "${TARGET}" in
aarch64-unknown-linux-gnu)
export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc
;;
aarch64-unknown-linux-musl)
export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER=aarch64-linux-gnu-gcc
export CC_aarch64_unknown_linux_musl=aarch64-linux-gnu-gcc
;;
armv7-unknown-linux-gnueabihf)
export CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER=arm-linux-gnueabihf-gcc
;;
armv7-unknown-linux-musleabihf)
export CARGO_TARGET_ARMV7_UNKNOWN_LINUX_MUSLEABIHF_LINKER=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
- cargo build --release --all-features --target ${TARGET}
- name: package
image: *rust_image
commands:
- mkdir -p dist
- |
if [ "${PLATFORM}" = "windows" ]; then
cp target/${TARGET}/release/owlen.exe dist/owlen.exe
cp target/${TARGET}/release/owlen-code.exe dist/owlen-code.exe
cd dist
zip -9 ${ARTIFACT}.zip owlen.exe owlen-code.exe
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
image: plugins/gitea-release
settings:
api_key:
from_secret: gitea_token
base_url: https://somegit.dev
files:
- ${ARTIFACT}.tar.gz
- ${ARTIFACT}.tar.gz.sha256
- ${ARTIFACT}.zip
- ${ARTIFACT}.zip.sha256
title: Release ${CI_COMMIT_TAG}
note: "Release ${CI_COMMIT_TAG}"

View File

@@ -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"