Skip to content
This repository has been archived by the owner on Nov 21, 2024. It is now read-only.

refactor: update return type syntax and add braces for code clarity #89

refactor: update return type syntax and add braces for code clarity

refactor: update return type syntax and add braces for code clarity #89

Workflow file for this run

name: Build
on: [push, pull_request]
jobs:
build:
strategy:
matrix:
os: [windows-latest, ubuntu-latest]
name: ${{matrix.os}}
runs-on: ${{matrix.os}}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup enviroment (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt update
sudo apt install libudev-dev libx11-dev libxcursor-dev libxrandr-dev libgl1-mesa-dev libalut-dev libvorbis-dev libsndfile1-dev libsfml-dev
- name: Setup clang (Windows)
if: matrix.os == 'windows-latest'
run: echo "PATH=$PATH:C:/msys64/mingw64/bin" >> $GITHUB_ENV
- name: Setup Ninja (Windows)
if: matrix.os == 'windows-latest'
uses: seanmiddleditch/gha-setup-ninja@v4
with:
version: 1.11.1
- name: Setup Ninja (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: sudo apt install ninja-build
- name: Generate CMake cache
run: cmake -S . -B target/release -Wno-dev -G Ninja -DCMAKE_BUILD_TYPE=Release
- name: Build (Release)
run: cmake --build target/release --config Release
- name: Upload binaries (Windows)
if: matrix.os == 'windows-latest'
uses: actions/upload-artifact@v4
with:
name: sokoban-windows
path: target/release/sokoban.exe
- name: Upload binaries (Ubuntu)
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v4
with:
name: sokoban-ubuntu
path: target/release/sokoban