change github workflow to be forgejo compatible

This commit is contained in:
Chance 2025-04-10 16:11:17 -04:00 committed by lily
parent 4126296339
commit d70e4a8e6d
Signed by: lily
GPG key ID: 601F3263FBCBC4B9
4 changed files with 61 additions and 112 deletions

11
.forgejo/dependabot.yml Normal file
View file

@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
version: 2
updates:
- package-ecosystem: "cargo" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"

View file

@ -0,0 +1,57 @@
name: Build Zenyx ⚡
on:
push:
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
build:
strategy:
fail-fast: false
matrix:
target:
- x86_64-unknown-linux-gnu
- aarch64-unknown-linux-gnu
include:
- target: x86_64-unknown-linux-gnu
binary_name: zenyx-x86_64
- target: aarch64-unknown-linux-gnu
binary_name: zenyx-aarch64
runs-on: codeberg-small
steps:
- name: 📥 Clone repository
uses: actions/checkout@v4
- name: 🛠️ Install cross-compilation dependencies
run: |
apt-get update
apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu qemu-user
- name: 🔧 Install Rust
uses: https://github.com/actions-rs/toolchain@v1
with:
toolchain: stable
override: true
target: ${{ matrix.target }}
profile: minimal
- name: 🏗️ Build
uses: https://github.com/actions-rs/cargo@v1
with:
command: build
args: --release --target ${{ matrix.target }}
env:
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
- name: 📦 Prepare binary
run: |
mkdir -p artifacts
cp target/${{ matrix.target }}/release/zenyx artifacts/${{ matrix.binary_name }}
chmod +x artifacts/${{ matrix.binary_name }}
- name: Upload artifacts
uses: https://code.forgejo.org/forgejo/upload-artifact@v4
with:
name: ${{ matrix.binary_name }}
path: artifacts/${{ matrix.binary_name }}
compression-level: 9