ci: implement gitea actions pipeline and makefile
All checks were successful
build-service / compile-binaries (push) Successful in 2m40s
All checks were successful
build-service / compile-binaries (push) Successful in 2m40s
This commit is contained in:
36
.gitea/workflows/build.yml
Normal file
36
.gitea/workflows/build.yml
Normal file
@@ -0,0 +1,36 @@
|
||||
name: build-service
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
tags: ["v*"]
|
||||
|
||||
jobs:
|
||||
compile-binaries:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: install-rust
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
targets: aarch64-unknown-linux-gnu, x86_64-unknown-linux-gnu
|
||||
|
||||
- name: build-x86
|
||||
run: cargo build --release --target x86_64-unknown-linux-gnu
|
||||
|
||||
- name: build-arm64
|
||||
# Note: For ARM64 cross-compiling on x86, we use 'cross' or a linker
|
||||
run: |
|
||||
sudo apt-get update && sudo apt-get install -y gcc-aarch64-linux-gnu
|
||||
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc \
|
||||
cargo build --release --target aarch64-unknown-linux-gnu
|
||||
|
||||
- name: upload-artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: escape-room-binaries
|
||||
path: |
|
||||
target/x86_64-unknown-linux-gnu/release/escape_room_server
|
||||
target/aarch64-unknown-linux-gnu/release/escape_room_server
|
||||
Reference in New Issue
Block a user