build.yaml 3: someone kill me! (joking)
Some checks failed
Build Project / build (ubuntu-latest) (push) Failing after 7m46s
Build Project / build (windows-latest) (push) Has been cancelled

This commit is contained in:
2026-06-24 14:05:10 -04:00
parent bdb6a0aca0
commit 257be0b3c5

View File

@@ -1,83 +1,75 @@
name: Build Project name: Build Project
on: on:
push: push:
branches: [ "main" ] branches:
pull_request: - main
branches: [ "main" ] pull_request:
branches:
- main
jobs: jobs:
build: build:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
os: [ubuntu-latest, windows-latest] os:
- ubuntu-latest
- windows-latest
``` runs-on: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
# Linux dependencies - name: Install Dependencies (Linux)
- name: Install Dependencies (Linux) if: runner.os == 'Linux'
if: runner.os == 'Linux' run: |
run: | apt-get update
if command -v sudo >/dev/null 2>&1; then SUDO="sudo"; else SUDO=""; fi apt-get install -y \
build-essential \
gcc \
g++ \
make \
raylib-dev \
libx11-dev \
libxrandr-dev \
libxinerama-dev \
libxcursor-dev \
libxi-dev \
libgl1-mesa-dev
$SUDO apt-get update - name: Install MSYS2 and Raylib (Windows)
$SUDO apt-get install -y \ if: runner.os == 'Windows'
build-essential \ uses: msys2/setup-msys2@v2
gcc \ with:
g++ \ msystem: MINGW64
make \ update: true
raylib-dev \ install: >
libx11-dev \ mingw-w64-x86_64-gcc
libxrandr-dev \ mingw-w64-x86_64-make
libxinerama-dev \ mingw-w64-x86_64-raylib
libxcursor-dev \
libxi-dev \
libgl1-mesa-dev
# Windows dependencies - name: Build (Linux)
- name: Install MSYS2 and Raylib if: runner.os == 'Linux'
if: runner.os == 'Windows' run: make
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: >-
mingw-w64-x86_64-gcc
mingw-w64-x86_64-make
mingw-w64-x86_64-raylib
# Build on Linux - name: Build (Windows)
- name: Build (Linux) if: runner.os == 'Windows'
if: runner.os == 'Linux' shell: msys2 {0}
run: make run: make
# Build on Windows - name: Upload Linux Artifact
- name: Build (Windows) if: runner.os == 'Linux'
if: runner.os == 'Windows' uses: actions/upload-artifact@v4
shell: msys2 {0} with:
run: make name: wrldbox-linux
path: wrldbox
# Upload Linux artifact - name: Upload Windows Artifact
- name: Upload Linux Artifact if: runner.os == 'Windows'
if: runner.os == 'Linux' uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v4 with:
with: name: wrldbox-windows
name: wrldbox-linux path: "*.exe"
path: wrldbox
# Upload Windows artifact
- name: Upload Windows Artifact
if: runner.os == 'Windows'
uses: actions/upload-artifact@v4
with:
name: wrldbox-windows
path: |
wrldbox.exe
*.exe
```