rust-nex/.forgejo/workflows/build.yml

65 lines
1.8 KiB
YAML
Raw Normal View History

2026-04-26 00:32:38 +02:00
name: Build and Test
on:
push:
branches: ["**"]
env:
DOCKER_TLS_CERTDIR: /certs
2026-04-26 02:13:18 +02:00
IMAGE_TAG: ${{ github.sha }}
2026-04-26 00:32:38 +02:00
jobs:
2026-08-08 05:53:38 +02:00
build-editions:
2026-05-10 10:13:31 +02:00
runs-on: debian-trixie
2026-08-08 05:53:38 +02:00
strategy:
fail-fast: false
matrix:
include:
- edition: sonic-transformed
- edition: mario-tennis
- edition: wii-sports-club
db_secret: DATABASE_SMM
- edition: puyopuyo
db_secret: DATABASE_SMM
- edition: minecraft-wiiu
- edition: splatoon-testfire
- edition: fast-racing-neo
- edition: wii-u-chat
- edition: splatoon
- edition: friends
db_secret: DATABASE_FRIENDS
- edition: super-mario-maker
db_secret: DATABASE_SMM
- edition: terraria
2026-08-08 16:08:26 +01:00
name: ${{ matrix.edition }}
2026-05-10 10:13:31 +02:00
steps:
- name: Checkout repository
2026-06-25 15:48:14 +00:00
uses: actions/checkout@v7
2026-05-10 10:13:31 +02:00
with:
submodules: recursive
2026-08-08 05:53:38 +02:00
- name: Cache Cargo registry and target
2026-06-23 15:18:29 +00:00
uses: actions/cache@v6
2026-05-10 10:13:31 +02:00
with:
path: |
2026-08-08 05:53:38 +02:00
~/.cargo/registry
~/.cargo/git
target/
key: cargo-${{ matrix.edition }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
cargo-${{ matrix.edition }}-
2026-05-10 10:13:31 +02:00
- name: Login to registry
run: docker login -u ${{ secrets.PACKAGE_USER }} -p ${{ secrets.PACKAGE_PWD }} git.spbr.net
2026-08-08 05:53:38 +02:00
- name: Set environment variables & build
2026-07-09 14:57:45 +01:00
env:
CI_REGISTRY_IMAGE: git.spbr.net/spacebar/rust-nex
2026-08-08 05:53:38 +02:00
SHORT_SHA: ${{ github.sha }}
DATABASE_URL: ${{ matrix.db_secret != '' && secrets[matrix.db_secret] || '' }}
run: |
echo "SHORT_SHA=${SHORT_SHA::6}" >> $GITHUB_ENV
export CI_COMMIT_SHORT_SHA="${SHORT_SHA::6}"
./.forgejo/workflows/build.sh ${{ matrix.edition }}