This repository has been archived by the owner on Jul 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
58 lines (46 loc) · 1.61 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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