-
Notifications
You must be signed in to change notification settings - Fork 14
162 lines (152 loc) · 4.78 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
name: Continuous Integration
on: [push, pull_request]
jobs:
linux_build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install SDL
run: |
sudo apt update
sudo apt -q install libsdl2-dev
- name: autogen
run: ./autogen.sh
- name: configure
run: ./configure
- name: make
run: make -j4
- name: make check
run: make check
macos_build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Install SDL
run: brew install sdl2 autoconf automake libtool pandoc
- name: autogen
run: ./autogen.sh
- name: configure
run: ./configure
- name: make
run: make -j4
- name: Find Git version
id: version
run: |
VERSION=$(git rev-parse --short HEAD)
echo "VERSION=$VERSION-macos" >> $GITHUB_OUTPUT
- name: Make package
run: |
cd pkg/macos
make PACKAGE_VERSION=${{steps.version.outputs.VERSION}} \
PACKAGE_STRING="Sopwith build ${{steps.version.outputs.VERSION}}"
- name: Upload build
uses: actions/upload-artifact@v1
with:
path: "pkg/macos/sdl-sopwith-${{steps.version.outputs.VERSION}}.dmg"
name: sdl-sopwith-${{steps.version.outputs.VERSION}}
emscripten_build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Emscripten
run: |
sudo apt update
sudo apt -q install emscripten
- name: Find Git version
id: version
run: |
VERSION=$(git rev-parse --short HEAD)
echo "VERSION=$VERSION-js" >> $GITHUB_OUTPUT
- name: build
run: ./embuild.sh
- name: make pkg
run: |
make -C pkg/emscripten
- name: Upload build
uses: actions/upload-artifact@v1
with:
path: "pkg/emscripten/page"
name: sdl-sopwith-${{steps.version.outputs.VERSION}}
windows_crossbuild:
strategy:
matrix:
host: [i686-w64-mingw32, x86_64-w64-mingw32]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Find Git version
id: version
run: |
export VERSION=$(git rev-parse --short HEAD)
if [[ ${{ matrix.host }} = x86_64-w64-mingw32 ]]; then
VERSION=$VERSION-win64
else
VERSION=$VERSION-win32
fi
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
- name: Install dependencies
run: |
sudo apt update
sudo apt -q install mingw-w64 pandoc
- name: Build SDL
run: |
git clone -b SDL2 --depth 1 https://github.com/libsdl-org/SDL.git
pushd SDL
mv .git .gitz
export AUTOTOOLS_BUILD_PATH=build-artifacts
./configure --host=${{ matrix.host }} --prefix=$PWD/../inst \
--disable-alsa \
--disable-altivec \
--disable-arm-neon \
--disable-arm-simd \
--disable-arts \
--disable-dbus \
--disable-diskaudio \
--disable-esd \
--disable-fcitx \
--disable-fusionsound \
--disable-hidapi-joystick \
--disable-hidapi-libusb \
--disable-ibus \
--disable-ime \
--disable-jack \
--disable-lasx \
--disable-libdecor \
--disable-libsamplerate \
--disable-libudev \
--disable-lsx \
--disable-nas \
--disable-oss \
--disable-pipewire \
--disable-pulseaudio \
--disable-render-metal \
--disable-sndio \
--disable-video-cocoa \
--disable-video-directfb \
--disable-video-kmsdrm \
--disable-video-metal \
--disable-video-rpi \
--disable-video-vivante \
--disable-video-vulkan \
--disable-video-wayland \
--disable-video-x11
make -j8
make install
popd
- name: autogen
run: |
export PKG_CONFIG_PATH=$PWD/inst/lib/pkgconfig
./autogen.sh --host=${{ matrix.host }}
- name: make
run: make -j8
- name: make package
run: |
export PATH=$PATH:$PWD/inst/bin
pushd pkg/win32
make
popd
- name: Upload build
uses: actions/upload-artifact@v1
with:
path: "pkg/win32/staging"
name: sdl-sopwith-${{steps.version.outputs.VERSION}}