-
-
Notifications
You must be signed in to change notification settings - Fork 147
170 lines (163 loc) · 5.53 KB
/
cmake.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
163
164
165
166
167
168
169
170
name: cmake
on: [push, pull_request]
env:
DESTDIR: ${{ github.workspace }}/build/tmp
jobs:
linux:
strategy:
matrix:
include:
- container: debian:11
- container: debian:12
- container: ubuntu:20.04
- container: ubuntu:22.04
- container: ubuntu:23.10
runs-on: ubuntu-latest
container:
image: ${{ matrix.container }}
steps:
- uses: actions/checkout@v3
- name: Set up dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -yqq cmake libfluidsynth-dev liblo-dev libmagic-dev libsndfile1-dev libx11-dev lsb-release pkg-config
echo "PACK_NAME=$(lsb_release -cs 2>/dev/null)" >> "${GITHUB_ENV}"
- name: configure
run: cmake -S cmake -B build
- name: build
run: cmake --build build -j $(nproc)
- name: install
run: cmake --install build --verbose
- uses: actions/upload-artifact@v3
with:
name: linux-${{ env.PACK_NAME }}
path: ${{ env.DESTDIR }}
macos:
strategy:
matrix:
include:
- frameworks: ON
- frameworks: OFF
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Set up dependencies
run: |
brew install cmake fluid-synth liblo libmagic libsndfile pkg-config
if [ "${{ matrix.frameworks }}" = "" ]; then
echo "PACK_NAME=frameworks" >> "${GITHUB_ENV}"
else
echo "PACK_NAME=libs" >> "${GITHUB_ENV}"
fi
- name: configure
run: cmake -S cmake -B build -DCARLA_BUILD_FRAMEWORKS=${{ matrix.frameworks }}
- name: build
run: cmake --build build -j $(sysctl -n hw.logicalcpu)
- name: install
run: cmake --install build --verbose
- uses: actions/upload-artifact@v3
with:
name: macos-${{ env.PACK_NAME }}
path: ${{ env.DESTDIR }}
mingw32-cross:
strategy:
matrix:
include:
- container: debian:11
- container: debian:12
- container: ubuntu:20.04
- container: ubuntu:22.04
- container: ubuntu:23.10
runs-on: ubuntu-latest
container:
image: ${{ matrix.container }}
steps:
- uses: actions/checkout@v3
- name: Set up dependencies
run: |
sudo dpkg --add-architecture i386
sudo apt-get update -qq
sudo apt-get install -yqq cmake binutils-mingw-w64-i686 g++-mingw-w64-i686 lsb-release mingw-w64
if [ "$(lsb_release -si 2>/dev/null)" = "Debian" ]; then
apt-get install -yqq wine wine32 wine64
else
apt-get install -yqq wine-stable
fi
echo "PACK_NAME=$(lsb_release -cs 2>/dev/null)" >> "${GITHUB_ENV}"
- name: configure
env:
PKG_CONFIG: false
run: cmake -S cmake -B build \
-DCMAKE_CROSSCOMPILING=ON \
-DCMAKE_CROSSCOMPILING_EMULATOR=wine \
-DCMAKE_SYSTEM_NAME=Windows \
-DCMAKE_SYSTEM_PROCESSOR=i686 \
-DCMAKE_C_COMPILER=i686-w64-mingw32-gcc \
-DCMAKE_CXX_COMPILER=i686-w64-mingw32-g++ \
-DCMAKE_RANLIB=i686-w64-mingw32-ranlib \
-DCMAKE_AR=$(which i686-w64-mingw32-ar)
- name: build
run: cmake --build build -j $(nproc)
- name: install
run: cmake --install build --verbose
- uses: actions/upload-artifact@v3
with:
name: mingw32-${{ env.PACK_NAME }}
path: ${{ env.DESTDIR }}
mingw64-cross:
strategy:
matrix:
include:
- container: debian:11
- container: debian:12
- container: ubuntu:20.04
- container: ubuntu:22.04
- container: ubuntu:23.10
runs-on: ubuntu-latest
container:
image: ${{ matrix.container }}
steps:
- uses: actions/checkout@v3
- name: Set up dependencies
run: |
sudo dpkg --add-architecture i386
sudo apt-get update -qq
sudo apt-get install -yqq cmake binutils-mingw-w64-x86-64 g++-mingw-w64-x86-64 lsb-release mingw-w64
if [ "$(lsb_release -si 2>/dev/null)" = "Debian" ]; then
apt-get install -yqq wine wine32 wine64
else
apt-get install -yqq wine-stable
fi
echo "PACK_NAME=$(lsb_release -cs 2>/dev/null)" >> "${GITHUB_ENV}"
- name: configure
env:
PKG_CONFIG: false
run: cmake -S cmake -B build \
-DCMAKE_CROSSCOMPILING=ON \
-DCMAKE_CROSSCOMPILING_EMULATOR=wine \
-DCMAKE_SYSTEM_NAME=Windows \
-DCMAKE_SYSTEM_PROCESSOR=x86_64 \
-DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc \
-DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-g++ \
-DCMAKE_RANLIB=x86_64-w64-mingw32-ranlib \
-DCMAKE_AR=$(which x86_64-w64-mingw32-ar)
- name: build
run: cmake --build build -j $(nproc)
- name: install
run: cmake --install build --verbose
- uses: actions/upload-artifact@v3
with:
name: mingw64-${{ env.PACK_NAME }}
path: ${{ env.DESTDIR }}
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: configure
run: cmake -S cmake -B build
- name: build
run: cmake --build build
# FIXME fails with error
# https://github.com/falkTX/Carla/actions/runs/5137608233/jobs/9245932221
#- name: install
#run: cmake --install build --verbose