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 56275c7369
All checks were successful
build-service / Build aarch64-unknown-linux-gnu (push) Successful in 59s
build-service / Build x86_64-unknown-linux-gnu (push) Successful in 40s
giving up if this doesn't work
2026-05-14 20:03:31 -05:00

51 lines
1.3 KiB
YAML

name: build-service
on:
push:
branches: [main]
tags: ["v*"]
jobs:
build:
name: Build ${{ matrix.target }}
runs-on: ubuntu-latest
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
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Install cross
if: matrix.use-cross == true
uses: taiki-e/install-action@v2
with:
tool: cross
- name: Build binary
env:
# This is the magic fix for 'act' and Docker-in-Docker
CROSS_CONTAINER_IN_CONTAINER: true
run: |
if [ "${{ matrix.use-cross }}" == "true" ]; then
cross build --release --target ${{ matrix.target }}
else
cargo build --release --target ${{ matrix.target }}
fi
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: escape-room-server-${{ matrix.target }}
path: target/${{ matrix.target }}/release/escape_room_server