guitea build
Some checks failed
Build / Build - linux (push) Failing after 4s
Build / Build - macos (push) Failing after 58s
Build / Build - windows (push) Failing after 4s

This commit is contained in:
2025-12-09 21:55:55 +01:00
parent c70cf7e6f0
commit 248ec1e8f5

View File

@@ -9,40 +9,49 @@ on:
jobs: jobs:
build: build:
name: Build - ${{ matrix.platform }} name: Build - ${{ matrix.platform }}
runs-on: ${{ matrix.os }} runs-on: gitea-runner
container: container:
image: rust:latest # or a specific version like rust:1.75-slim image: ${{ matrix.docker_image }}
options: --user 1000:1000 # Good practice to run as non-root
strategy: strategy:
matrix: matrix:
include: include:
- platform: linux - platform: linux
os: gitea-runner docker_image: rust:latest
target: x86_64-unknown-linux-gnu target: x86_64-unknown-linux-gnu
artifact_name: rlogg-linux-x86_64 artifact_name: rlogg-linux-x86_64
binary_extension: "" binary_extension: ""
# - platform: macos setup_cmd: ""
# os: macos-latest - platform: macos
# target: x86_64-apple-darwin docker_image: messense/cargo-zigbuild:latest
# artifact_name: rlogg-macos-x86_64 target: x86_64-apple-darwin
# binary_extension: "" artifact_name: rlogg-macos-x86_64
# - platform: windows binary_extension: ""
# os: windows-latest setup_cmd: ""
# target: x86_64-pc-windows-msvc - platform: windows
# artifact_name: rlogg-windows-x86_64 docker_image: rust:latest
# binary_extension: ".exe" target: x86_64-pc-windows-gnu
artifact_name: rlogg-windows-x86_64
binary_extension: ".exe"
setup_cmd: "apt-get update && apt-get install -y mingw-w64"
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Setup Rust - name: Setup cross-compilation tools
uses: actions-rust-lang/setup-rust-toolchain@v1 if: matrix.setup_cmd != ''
with: run: ${{ matrix.setup_cmd }}
target: ${{ matrix.target }}
- name: Add Rust target
run: rustup target add ${{ matrix.target }}
- name: Build release binary - name: Build release binary
run: cargo build --release --target ${{ matrix.target }} run: |
if [ "${{ matrix.platform }}" = "macos" ]; then
cargo zigbuild --release --target ${{ matrix.target }}
else
cargo build --release --target ${{ matrix.target }}
fi
- name: Prepare artifact - name: Prepare artifact
shell: bash shell: bash