From e5938b9014b924a4afa133238cda6f4fb3b75f77 Mon Sep 17 00:00:00 2001 From: Marco De Araujo Date: Fri, 2 Jan 2026 06:47:40 -0400 Subject: [PATCH] Testing workflow --- .forgejo/workflows/release.yaml | 47 +++++++++++++++++++-------------- 1 file changed, 27 insertions(+), 20 deletions(-) diff --git a/.forgejo/workflows/release.yaml b/.forgejo/workflows/release.yaml index 1850902..ded5e24 100644 --- a/.forgejo/workflows/release.yaml +++ b/.forgejo/workflows/release.yaml @@ -17,10 +17,19 @@ jobs: - target: x86_64-unknown-linux-gnu cross: true platform: linux/amd64 + deps: "build-essential libssl-dev pkg-config" + env: + PKG_CONFIG_ALLOW_CROSS: "1" + OPENSSL_DIR: /usr + PKG_CONFIG_PATH: "/usr/lib/pkgconfig:/usr/share/pkgconfig" - target: x86_64-pc-windows-gnu cross: true platform: linux/amd64 + deps: "build-essential gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64" + env: + CC_x86_64_pc_windows_gnu: x86_64-w64-mingw32-gcc + CARGO_TARGET_X86_64_PC_WINDOWS_GNU_LINKER: x86_64-w64-mingw32-gcc steps: - name: Checkout code @@ -63,39 +72,37 @@ jobs: chmod +x "release-artifacts/$OUTPUT_NAME" ls -lh "release-artifacts/$OUTPUT_NAME" - - name: Cross-Build Release (Linux x86_64) + - name: Cross-Build Linux x86_64 Release if: matrix.target == 'x86_64-unknown-linux-gnu' - uses: docker://rust:alpine + uses: docker://rust:slim with: args: > sh -c " - apk add --no-cache build-base openssl-dev pkgconf && + apt-get update && apt-get install -y ${{ matrix.deps }} && rustup target add x86_64-unknown-linux-gnu && cargo build --release --target x86_64-unknown-linux-gnu && - mkdir -p release-artifacts && - cp target/x86_64-unknown-linux-gnu/release/uptime-kuma-dashboard release-artifacts/uptime-kuma-dashboard-x86_64-unknown-linux-gnu && - strip release-artifacts/uptime-kuma-dashboard-x86_64-unknown-linux-gnu && - chmod +x release-artifacts/uptime-kuma-dashboard-x86_64-unknown-linux-gnu && - ls -lh release-artifacts/" - env: - CARGO_TARGET_DIR: target - options: --platform linux/amd64 + mkdir -p /github/workspace/release-artifacts && + cp target/x86_64-unknown-linux-gnu/release/uptime-kuma-dashboard /github/workspace/release-artifacts/uptime-kuma-dashboard-x86_64-unknown-linux-gnu && + strip /github/workspace/release-artifacts/uptime-kuma-dashboard-x86_64-unknown-linux-gnu && + chmod +x /github/workspace/release-artifacts/uptime-kuma-dashboard-x86_64-unknown-linux-gnu && + ls -lh /github/workspace/release-artifacts/" + env: ${{ matrix.env }} + options: --platform ${{ matrix.platform }} - - name: Cross-Build Release (Windows x86_64) + - name: Cross-Build Windows x86_64 Release if: matrix.target == 'x86_64-pc-windows-gnu' - uses: docker://rust:alpine + uses: docker://rust:slim with: args: > sh -c " - apk add --no-cache build-base mingw-w64-gcc mingw-w64-headers mingw-w64-crt mingw-w64-winpthreads + apt-get update && apt-get install -y ${{ matrix.deps }} && rustup target add x86_64-pc-windows-gnu && cargo build --release --target x86_64-pc-windows-gnu && - mkdir -p release-artifacts && - cp target/x86_64-pc-windows-gnu/release/uptime-kuma-dashboard.exe release-artifacts/uptime-kuma-dashboard-x86_64-pc-windows-gnu.exe && - ls -lh release-artifacts/" - env: - CARGO_TARGET_DIR: target - options: --platform linux/amd64 + mkdir -p /github/workspace/release-artifacts && + cp target/x86_64-pc-windows-gnu/release/uptime-kuma-dashboard.exe /github/workspace/release-artifacts/uptime-kuma-dashboard-x86_64-pc-windows-gnu.exe && + ls -lh /github/workspace/release-artifacts/" + env: ${{ matrix.env }} + options: --platform ${{ matrix.platform }} - name: Upload artifacts uses: https://data.forgejo.org/forgejo/upload-artifact@v4