-
Notifications
You must be signed in to change notification settings - Fork 0
91 lines (89 loc) · 2.69 KB
/
c-cpp.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
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
name: C/C++ CI
on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
jobs:
build-web:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
token: ${{secrets.CI_REPO_PAT}}
submodules: recursive
- uses: mymindstorm/setup-emsdk@v14
with:
version: 3.1.64
- name: make web build
run: make clean_build -f build-scripts/web.Makefile
- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: web-build
path: web
build-linux:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
token: ${{secrets.CI_REPO_PAT}}
submodules: recursive
- name: install sdl
run: sudo apt-get install -y libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev
- name: build directories
run: mkdir -p bin && mkdir -p bin/linux
- name: make
run: make clean_build -f build-scripts/linux/desktop.Makefile
- name: "Tar files to preserve permissions"
run: tar -cvf rebound.tar -C bin/linux .
- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: rebound-linux-binaries
path: rebound.tar
build-mac:
runs-on: macos-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
token: ${{secrets.CI_REPO_PAT}}
submodules: recursive
- name: install sdl
run: brew install SDL2 SDL2_image SDL2_mixer SDL2_ttf
- name: build directories
run: mkdir -p bin && mkdir -p bin/mac
- name: make
run: make clean_build -f build-scripts/mac/desktop.Makefile
- name: "Tar files to preserve permissions"
run: tar -cvf rebound.tar -C bin/mac .
- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: rebound-mac-binaries
path: rebound.tar
build-windows:
runs-on: windows-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
token: ${{secrets.CI_REPO_PAT}}
submodules: recursive
- name: Set up MinGW
uses: egor-tensin/[email protected]
with:
platform: x64
version: 12.2.0
- name: build directories
run: mkdir bin\\windows
- name: make
run: make clean_build -f build-scripts/windows/desktop.Makefile
- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: windows binaries
path: bin/windows