Testing workflow
Some checks failed
Multi-Platform Release Build / build (false, native) (push) Failing after 3m34s
Multi-Platform Release Build / build (true, aarch64-linux-gnu-gcc, aarch64-unknown-linux-gnu) (push) Failing after 30s
Multi-Platform Release Build / build (true, arm-linux-gnueabihf-gcc, armv7-unknown-linux-gnueabihf) (push) Failing after 11s
Multi-Platform Release Build / build (true, x86_64-linux-gnu-gcc, x86_64-unknown-linux-gnu) (push) Failing after 11s
Multi-Platform Release Build / build (true, x86_64-w64-mingw32-gcc, x86_64-pc-windows-gnu) (push) Failing after 14s
Multi-Platform Release Build / create-release (push) Has been skipped
Some checks failed
Multi-Platform Release Build / build (false, native) (push) Failing after 3m34s
Multi-Platform Release Build / build (true, aarch64-linux-gnu-gcc, aarch64-unknown-linux-gnu) (push) Failing after 30s
Multi-Platform Release Build / build (true, arm-linux-gnueabihf-gcc, armv7-unknown-linux-gnueabihf) (push) Failing after 11s
Multi-Platform Release Build / build (true, x86_64-linux-gnu-gcc, x86_64-unknown-linux-gnu) (push) Failing after 11s
Multi-Platform Release Build / build (true, x86_64-w64-mingw32-gcc, x86_64-pc-windows-gnu) (push) Failing after 14s
Multi-Platform Release Build / create-release (push) Has been skipped
This commit is contained in:
parent
5e8732c513
commit
e1b7b570c5
1 changed files with 16 additions and 64 deletions
|
|
@ -1,31 +1,17 @@
|
|||
name: Multi-Platform Release Build
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v*.*.*"
|
||||
|
||||
jobs:
|
||||
detect-architecture:
|
||||
runs-on: docker
|
||||
outputs:
|
||||
runner_arch: ${{ env.RUNNER_ARCH }}
|
||||
steps:
|
||||
- name: Simply output architecture
|
||||
run: |
|
||||
echo "Runner architecture: $RUNNER_ARCH"
|
||||
env | grep -i arch
|
||||
|
||||
build:
|
||||
runs-on: docker
|
||||
needs: detect-architecture
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- target: native
|
||||
cross: false
|
||||
|
||||
- target: x86_64-unknown-linux-gnu
|
||||
cross: true
|
||||
linker: x86_64-linux-gnu-gcc
|
||||
|
|
@ -35,51 +21,35 @@ jobs:
|
|||
- target: armv7-unknown-linux-gnueabihf
|
||||
cross: true
|
||||
linker: arm-linux-gnueabihf-gcc
|
||||
|
||||
- target: x86_64-pc-windows-gnu
|
||||
cross: true
|
||||
linker: x86_64-w64-mingw32-gcc
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Rust
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
toolchain: stable
|
||||
uses: docker://rust:1.84.0-alpine
|
||||
|
||||
- name: Add Rust target
|
||||
if: matrix.target != 'native'
|
||||
run: rustup target add ${{ matrix.target }}
|
||||
|
||||
- name: Install cross-compilation tools
|
||||
if: matrix.cross
|
||||
- name: Install build dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y \
|
||||
apk update
|
||||
apk add --no-cache \
|
||||
build-base \
|
||||
gcc-arm-linux-gnueabihf \
|
||||
gcc-aarch64-linux-gnu \
|
||||
gcc-x86-64-linux-gnu \
|
||||
gcc-x86_64-linux-gnu \
|
||||
g++-arm-linux-gnueabihf \
|
||||
g++-aarch64-linux-gnu \
|
||||
mingw-w64 \
|
||||
libc6-dev-armhf-cross \
|
||||
libc6-dev-arm64-cross
|
||||
libc6-dev-arm64-cross \
|
||||
musl-dev \
|
||||
linux-headers
|
||||
|
||||
- name: Cache dependencies
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/bin/
|
||||
~/.cargo/registry/index/
|
||||
~/.cargo/registry/cache/
|
||||
~/.cargo/git/db/
|
||||
target/
|
||||
key: ${{ runner.os }}-cargo-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-cargo-${{ matrix.target }}-
|
||||
${{ runner.os }}-cargo-
|
||||
- name: Add Rust target
|
||||
if: matrix.target != 'native'
|
||||
run: rustup target add ${{ matrix.target }}
|
||||
|
||||
- name: Configure cross-compilation
|
||||
if: matrix.cross && matrix.target != 'native'
|
||||
|
|
@ -103,7 +73,6 @@ jobs:
|
|||
# Build com target específico
|
||||
echo "Building for target: ${{ matrix.target }}"
|
||||
cargo build --release --target ${{ matrix.target }} --features production
|
||||
|
||||
if [[ "${{ matrix.target }}" == *"windows"* ]]; then
|
||||
TARGET_BINARY="target/${{ matrix.target }}/release/uptime-kuma-dashboard.exe"
|
||||
OUTPUT_NAME="uptime-kuma-dashboard-${{ matrix.target }}.exe"
|
||||
|
|
@ -112,29 +81,23 @@ jobs:
|
|||
OUTPUT_NAME="uptime-kuma-dashboard-${{ matrix.target }}"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Criar diretório de artifacts
|
||||
mkdir -p release-artifacts
|
||||
|
||||
# Verificar se o binário foi criado
|
||||
if [ ! -f "$TARGET_BINARY" ]; then
|
||||
echo "Error: Binary not found at $TARGET_BINARY"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Copiar binário
|
||||
cp "$TARGET_BINARY" "release-artifacts/$OUTPUT_NAME"
|
||||
|
||||
# Strip binário para Linux (reduz tamanho)
|
||||
if [[ "${{ matrix.target }}" == *"linux"* ]] || [ "${{ matrix.target }}" = "native" ]; then
|
||||
strip "release-artifacts/$OUTPUT_NAME" 2>/dev/null || echo "Strip failed, continuing..."
|
||||
fi
|
||||
|
||||
# Tornar executável
|
||||
if [[ "${{ matrix.target }}" != *"windows"* ]]; then
|
||||
chmod +x "release-artifacts/$OUTPUT_NAME"
|
||||
fi
|
||||
|
||||
# Mostrar informações do arquivo
|
||||
ls -lh "release-artifacts/$OUTPUT_NAME"
|
||||
file "release-artifacts/$OUTPUT_NAME" || true
|
||||
|
|
@ -148,7 +111,7 @@ jobs:
|
|||
|
||||
create-release:
|
||||
runs-on: docker
|
||||
needs: [detect-architecture, build]
|
||||
needs: build
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
|
|
@ -181,45 +144,34 @@ jobs:
|
|||
name: Release ${{ forgejo.ref_name }}
|
||||
body: |
|
||||
## 🚀 Multi-Platform Release
|
||||
|
||||
Compiled on runner **${{ needs.detect-architecture.outputs.runner_arch }}**
|
||||
|
||||
Compiled on runner **${{ env.RUNNER_ARCH }}**
|
||||
### 📦 Available Binaries
|
||||
|
||||
This release includes binaries for the following platforms:
|
||||
|
||||
- **Linux x86_64** (Intel/AMD 64-bit)
|
||||
- **Linux ARM64** (aarch64) - Raspberry Pi 4, Apple Silicon Linux, ARM servers
|
||||
- **Linux ARMv7** (armhf) - Raspberry Pi 3 and earlier
|
||||
- **Windows x86_64** (64-bit)
|
||||
|
||||
### 🚀 How to use
|
||||
|
||||
#### Linux/ARM:
|
||||
```bash
|
||||
# Download the appropriate binary
|
||||
wget https://your-forgejo.com/releases/download/${{ forgejo.ref_name }}/uptime-kuma-dashboard-<your-target>
|
||||
|
||||
# Make executable
|
||||
chmod +x uptime-kuma-dashboard-*
|
||||
|
||||
# Run
|
||||
./uptime-kuma-dashboard-* --base-url https://your-kuma --slug your-slug
|
||||
```
|
||||
|
||||
#### Windows:
|
||||
```powershell
|
||||
# Download uptime-kuma-dashboard-x86_64-pc-windows-gnu.exe
|
||||
# Run in PowerShell or CMD
|
||||
.\uptime-kuma-dashboard-x86_64-pc-windows-gnu.exe --base-url https://your-kuma --slug your-slug
|
||||
```
|
||||
|
||||
### ✅ Verify Checksums
|
||||
```bash
|
||||
sha256sum -c SHA256SUMS.txt
|
||||
```
|
||||
|
||||
### 🏗️ Build Information
|
||||
- Runner Architecture: ${{ needs.detect-architecture.outputs.runner_arch }}
|
||||
- Rust Version: stable
|
||||
- Runner Architecture: ${{ env.RUNNER_ARCH }}
|
||||
- Rust Version: 1.84.0
|
||||
- Build Type: Release (optimized)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue