This repository has been archived on 2026-05-19. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
de-socket-espace-room-server/.gitea/workflows/build.yml
KeshavAnandCode baad3d7791
Some checks failed
build-service / Build aarch64-unknown-linux-gnu (push) Failing after 1m38s
build-service / Build x86_64-unknown-linux-gnu (push) Successful in 43s
gemini workflow change
2026-05-14 19:59:28 -05:00

54 lines
1.5 KiB
YAML

name: build-service
on:
push:
branches: [main]
tags: ["v*"]
jobs:
build:
name: Build ${{ matrix.target }}
runs-on: ubuntu-latest
# A matrix lets us run the job twice in parallel: once for x86, once for arm.
strategy:
matrix:
include:
- target: x86_64-unknown-linux-gnu
use-cross: false
- target: aarch64-unknown-linux-gnu
use-cross: true
steps:
- name: Checkout repository
uses: actions/checkout@v4
# Sets up Rust correctly and caches it
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
# Downloads pre-compiled `cross` binary instantly (saves ~3 mins vs cargo install)
- name: Install cross
if: matrix.use-cross == true
uses: taiki-e/install-action@v2
with:
tool: cross
# Builds using cargo for x86, and cross for ARM
- name: Build binary
run: |
if [ "${{ matrix.use-cross }}" == "true" ]; then
cross build --release --target ${{ matrix.target }}
else
cargo build --release --target ${{ matrix.target }}
fi
# Uploads the artifact. They will be separated by target name.
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: escape-room-server-${{ matrix.target }}
path: target/${{ matrix.target }}/release/escape_room_server