build.yaml 3: someone kill me! (joking)
This commit is contained in:
@@ -1,33 +1,33 @@
|
||||
name: Build Project
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest]
|
||||
build:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os:
|
||||
- ubuntu-latest
|
||||
- windows-latest
|
||||
|
||||
```
|
||||
runs-on: ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
steps:
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# Linux dependencies
|
||||
- name: Install Dependencies (Linux)
|
||||
if: runner.os == 'Linux'
|
||||
run: |
|
||||
if command -v sudo >/dev/null 2>&1; then SUDO="sudo"; else SUDO=""; fi
|
||||
|
||||
$SUDO apt-get update
|
||||
$SUDO apt-get install -y \
|
||||
apt-get update
|
||||
apt-get install -y \
|
||||
build-essential \
|
||||
gcc \
|
||||
g++ \
|
||||
@@ -40,30 +40,26 @@ steps:
|
||||
libxi-dev \
|
||||
libgl1-mesa-dev
|
||||
|
||||
# Windows dependencies
|
||||
- name: Install MSYS2 and Raylib
|
||||
- name: Install MSYS2 and Raylib (Windows)
|
||||
if: runner.os == 'Windows'
|
||||
uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: MINGW64
|
||||
update: true
|
||||
install: >-
|
||||
install: >
|
||||
mingw-w64-x86_64-gcc
|
||||
mingw-w64-x86_64-make
|
||||
mingw-w64-x86_64-raylib
|
||||
|
||||
# Build on Linux
|
||||
- name: Build (Linux)
|
||||
if: runner.os == 'Linux'
|
||||
run: make
|
||||
|
||||
# Build on Windows
|
||||
- name: Build (Windows)
|
||||
if: runner.os == 'Windows'
|
||||
shell: msys2 {0}
|
||||
run: make
|
||||
|
||||
# Upload Linux artifact
|
||||
- name: Upload Linux Artifact
|
||||
if: runner.os == 'Linux'
|
||||
uses: actions/upload-artifact@v4
|
||||
@@ -71,13 +67,9 @@ steps:
|
||||
name: wrldbox-linux
|
||||
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
|
||||
```
|
||||
path: "*.exe"
|
||||
Reference in New Issue
Block a user