- justfile with build/run/check/test/release/package/fmt/clean recipes - ols.json and odinfmt.json for neovim (ols) - Tests for memory game rules and card animation; memory.deal and memory.select_card split out so logic is testable without a window - Gitea workflows: build+test on main/develop, package and upload to the generic package registry on version branches - Game changes to the executable's directory so packaged builds find assets Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
54 lines
1.4 KiB
YAML
54 lines
1.4 KiB
YAML
#
|
|
# .gitea/workflows/gitea-build.yaml
|
|
#
|
|
# Builds and tests on every push and pull request to main and develop.
|
|
#
|
|
|
|
name: "Build and Test"
|
|
on:
|
|
push:
|
|
branches: [main, develop]
|
|
pull_request:
|
|
branches: [main, develop]
|
|
|
|
env:
|
|
ODIN_VERSION: dev-2026-09
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout Repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install System Dependencies
|
|
run: |
|
|
SUDO=""; command -v sudo >/dev/null && SUDO=sudo
|
|
$SUDO apt-get update
|
|
# clang links Odin programs; raylib needs X11 on Linux
|
|
$SUDO apt-get install -y --no-install-recommends clang libx11-dev curl ca-certificates
|
|
|
|
- name: Install Odin
|
|
run: |
|
|
curl -fsSL -o odin.tar.gz https://github.com/odin-lang/Odin/releases/download/$ODIN_VERSION/odin-linux-amd64-$ODIN_VERSION.tar.gz
|
|
mkdir -p "$HOME/odin"
|
|
tar -xzf odin.tar.gz -C "$HOME/odin" --strip-components=1
|
|
echo "$HOME/odin" >> "$GITHUB_PATH"
|
|
|
|
- name: Install just
|
|
run: |
|
|
mkdir -p "$HOME/.local/bin"
|
|
curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to "$HOME/.local/bin"
|
|
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
|
|
|
|
- name: Check
|
|
run: |
|
|
odin version
|
|
just check
|
|
|
|
- name: Test
|
|
run: just test
|
|
|
|
- name: Build
|
|
run: just release
|