-
Notifications
You must be signed in to change notification settings - Fork 42
97 lines (80 loc) · 2.48 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
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
name: CI
on:
# Run on pushes to tags, the "master" branch, and PR's
push:
branches:
- master
pull_request:
jobs:
sdl-release:
runs-on: ubuntu-latest
container:
image: debian:latest
steps:
# Must install git before checking out the repo otherwise github doesn't fetch the .git directory.
- name: Install dependencies
run: |
apt update
apt install --yes build-essential git libjpeg-dev libsdl2-dev libcurl4-openssl-dev libpng-dev libfreetype-dev libvorbis-dev
- name: Fetch repository
uses: actions/[email protected]
with:
# make `git describe` show the correct commit hash
fetch-depth: '0'
- name: Compile
run: |
# prevent git complaining about dubious ownership of the repo
chown -R root:root .
# fail if `git describe` doesn't work (required for the buildstring)
git describe --always
# fail if there's any warnings
export CC="cc -Werror"
make sdl-release
- name: Upload Linux artifacts
uses: actions/upload-artifact@v4
with:
name: Linux
path: |
darkplaces-sdl
wasm-release:
runs-on: ubuntu-latest
container:
image: debian:latest
steps:
- name: Install dependencies
run: |
apt update
apt install --yes build-essential python3-certifi
- name: Fetch repository
uses: actions/[email protected]
with:
# make `git describe` show the correct commit hash
fetch-depth: '0'
- uses: actions/setup-python@v5
with:
python-version: '3'
- name: Install emsdk
uses: actions/[email protected]
with:
repository: emscripten-core/emsdk
path: emsdk
- name: Compile
shell: bash
run: |
cd emsdk
# Download and install the latest SDK tools.
./emsdk install latest
# Make the "latest" SDK "active" for the current user. (writes .emscripten file)
./emsdk activate latest
# Activate PATH and other environment variables in the current terminal
source ./emsdk_env.sh
cd ..
# fail if there's any warnings
#export CC="cc"
make emscripten-release
- name: Upload WASM artifacts
uses: actions/upload-artifact@v4
with:
name: Wasm
path: |
darkplaces-wasm.js