-
Notifications
You must be signed in to change notification settings - Fork 69
114 lines (95 loc) · 2.74 KB
/
Copy pathbuild.yml
File metadata and controls
114 lines (95 loc) · 2.74 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
name: CI
on:
create:
tags:
push:
branches:
- main
pull_request:
env:
EM_VERSION: 4.0.8
EM_CACHE_FOLDER: 'emsdk-cache'
jobs:
build:
name: build
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- uses: actions/checkout@v4
with:
submodules: true
- name: install packages (linux)
run: |
sudo apt-get update
sudo apt-get install ninja-build libsdl2-dev
if: matrix.os == 'ubuntu-latest'
- name: install packages (macos)
run: brew install ninja SDL2
if: matrix.os == 'macos-latest'
- name: mkdir bin
run: mkdir -p bin
if: matrix.os == 'windows-latest'
- name: download sdl2 (windows)
uses: albin-johansson/download-sdl2@v2
with:
version: 2.0.14
sources_destination: .
binaries_destination: bin
if: matrix.os == 'windows-latest'
- name: mkdir out
run: mkdir -p out
- name: cmake (linux + macos)
run: cmake -S . -B out -G Ninja
if: matrix.os != 'windows-latest'
- name: cmake (windows)
run: cmake -S . -B out "-DSDL2_ROOT_DIR=SDL2-2.0.14"
if: matrix.os == 'windows-latest'
- name: build
run: cmake --build out
- name: tests
run: |
python scripts/build_tests.py
python scripts/tester.py -vv --exe bin/binjgb-tester
if: matrix.os != 'windows-latest'
build-wasm-variants:
name: build-${{ matrix.target }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target: [wasm, rgbds-live, gbstudio]
include:
- target: wasm
cmake_flags: ""
- target: rgbds-live
cmake_flags: '-DWERROR=ON -DRGBDS_LIVE=ON -DCMAKE_C_FLAGS="-DBREAKPOINTS_MAX_BANKS_NUMBER=256"'
- target: gbstudio
cmake_flags: "-DWERROR=ON -DGBSTUDIO=ON"
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: install packages
run: sudo apt-get install ninja-build
- name: setup cache
uses: actions/cache@v4
with:
path: ${{ env.EM_CACHE_FOLDER }}
key: ${{ env.EM_VERSION }}-${{ runner.os }}
- name: emsdk install
uses: mymindstorm/setup-emsdk@v14
with:
version: ${{ env.EM_VERSION }}
actions-cache-folder: ${{ env.EM_CACHE_FOLDER }}
- name: mkdir
run: mkdir -p out
- name: cmake
run: emcmake cmake -S . -B out -G Ninja -DCMAKE_BUILD_TYPE=Release -DWASM=true ${{ matrix.cmake_flags }}
- name: build
run: emmake cmake --build out