20
20
- { name: win-arm64, os: windows-latest, flags: -A ARM64 }
21
21
- { name: linux-x64, os: ubuntu-20.04, flags: -GNinja, target_apt_arch: ":amd64"}
22
22
- { name: linux-x86, os: ubuntu-20.04, flags: -GNinja, target_apt_arch: ":i386" }
23
- - { name: linux-arm64, os: ubuntu-20.04, container: arm64v8/ubuntu }
24
- - { name: linux-arm, os: ubuntu-20.04, container: arm32v7/ubuntu }
23
+ - { name: linux-arm64, os: ubuntu-20.04, flags: -GNinja, target_apt_arch: ":arm64", container: arm64v8/ubuntu }
24
+ - { name: linux-arm, os: ubuntu-20.04, flags: -GNinja, target_apt_arch: ":armhf", container: arm32v7/ubuntu }
25
25
- { name: osx-x64, os: macos-latest, flags: -DCMAKE_OSX_ARCHITECTURES="x86_64" -DCMAKE_OSX_DEPLOYMENT_TARGET="10.14" }
26
26
# NOTE: macOS 11.0 is the first released supported by Apple Silicon.
27
27
- { name: osx-arm64, os: macos-latest, flags: -DCMAKE_OSX_ARCHITECTURES="arm64" -DCMAKE_OSX_DEPLOYMENT_TARGET="11.0" }
@@ -44,50 +44,16 @@ jobs:
44
44
uses : addnab/docker-run-action@v3
45
45
with :
46
46
image : ${{ matrix.platform.container }}
47
- options : -v ${{ github.workspace }}:/workspace -e NAME=${{ matrix.platform.name }} -e BUILD_TYPE=${{ env.BUILD_TYPE }}
47
+ options : >
48
+ -v ${{ github.workspace }}:/workspace
49
+ -e NAME=${{ matrix.platform.name }}
50
+ -e TARGET_APT_ARCH=${{ matrix.platform.target_apt_arch }}
51
+ -e RUNNER_OS=${{ runner.os }}
52
+ -e FLAGS=${{ matrix.platform.flags }}
53
+ -e BUILD_TYPE=${{ env.BUILD_TYPE }}
48
54
run : |
49
- apt update -y -qq
50
- apt install -y \
51
- gcc \
52
- g++ \
53
- cmake \
54
- ninja-build \
55
- wayland-scanner++ \
56
- wayland-protocols \
57
- pkg-config \
58
- libasound2-dev \
59
- libdbus-1-dev \
60
- libegl1-mesa-dev \
61
- libgl1-mesa-dev \
62
- libgles2-mesa-dev \
63
- libglu1-mesa-dev \
64
- libibus-1.0-dev \
65
- libpulse-dev \
66
- libsndio-dev \
67
- libudev-dev \
68
- libwayland-dev \
69
- libx11-dev \
70
- libxcursor-dev \
71
- libxext-dev \
72
- libxi-dev \
73
- libxinerama-dev \
74
- libxkbcommon-dev \
75
- libxrandr-dev \
76
- libxss-dev \
77
- libxt-dev \
78
- libxv-dev \
79
- libxxf86vm-dev \
80
- libdrm-dev \
81
- libgbm-dev \
82
- libpulse-dev
83
-
84
55
cd /workspace
85
- cmake -B build -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DSDL_SHARED_ENABLED_BY_DEFAULT=ON -DSDL_STATIC_ENABLED_BY_DEFAULT=ON
86
- cmake --build build/ --config Release
87
- cmake --install build/ --prefix install_output --config Release
88
-
89
- mkdir -p SDL3-CS/native/$NAME
90
- cp install_output/lib/libSDL3.so SDL3-CS/native/$NAME/libSDL3.so
56
+ ./SDL3-CS/build.sh
91
57
92
58
- name : Build
93
59
if : ${{ !contains(matrix.platform.container, 'arm') }}
97
63
TARGET_APT_ARCH : ${{ matrix.platform.target_apt_arch }}
98
64
RUNNER_OS : ${{ runner.os }}
99
65
FLAGS : ${{ matrix.platform.flags }}
100
-
101
- run : |
102
- if [[ $RUNNER_OS == 'Linux' ]]; then
103
- # Setup Linux dependencies
104
- if [[ $TARGET_APT_ARCH == :i386 ]]; then
105
- sudo dpkg --add-architecture i386
106
- fi
107
-
108
- sudo apt-get update -y -qq
109
-
110
- if [[ $TARGET_APT_ARCH == :i386 ]]; then
111
- # Workaround GitHub's ubuntu-20.04 image issue <https://github.com/actions/virtual-environments/issues/4589>
112
- sudo apt-get install -y --allow-downgrades libpcre2-8-0=10.34-7
113
- fi
114
-
115
- sudo apt-get install -y \
116
- gcc-multilib \
117
- g++-multilib \
118
- cmake \
119
- ninja-build \
120
- wayland-scanner++ \
121
- wayland-protocols \
122
- pkg-config$TARGET_APT_ARCH \
123
- libasound2-dev$TARGET_APT_ARCH \
124
- libdbus-1-dev$TARGET_APT_ARCH \
125
- libegl1-mesa-dev$TARGET_APT_ARCH \
126
- libgl1-mesa-dev$TARGET_APT_ARCH \
127
- libgles2-mesa-dev$TARGET_APT_ARCH \
128
- libglu1-mesa-dev$TARGET_APT_ARCH \
129
- libibus-1.0-dev$TARGET_APT_ARCH \
130
- libpulse-dev$TARGET_APT_ARCH \
131
- libsndio-dev$TARGET_APT_ARCH \
132
- libudev-dev$TARGET_APT_ARCH \
133
- libwayland-dev$TARGET_APT_ARCH \
134
- libx11-dev$TARGET_APT_ARCH \
135
- libxcursor-dev$TARGET_APT_ARCH \
136
- libxext-dev$TARGET_APT_ARCH \
137
- libxi-dev$TARGET_APT_ARCH \
138
- libxinerama-dev$TARGET_APT_ARCH \
139
- libxkbcommon-dev$TARGET_APT_ARCH \
140
- libxrandr-dev$TARGET_APT_ARCH \
141
- libxss-dev$TARGET_APT_ARCH \
142
- libxt-dev$TARGET_APT_ARCH \
143
- libxv-dev$TARGET_APT_ARCH \
144
- libxxf86vm-dev$TARGET_APT_ARCH \
145
- libdrm-dev$TARGET_APT_ARCH \
146
- libgbm-dev$TARGET_APT_ARCH \
147
- libpulse-dev$TARGET_APT_ARCH
148
- fi
149
-
150
- # Configure CMake
151
- cmake -B build $FLAGS -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DSDL_SHARED_ENABLED_BY_DEFAULT=ON -DSDL_STATIC_ENABLED_BY_DEFAULT=ON
152
-
153
- # Build
154
- cmake --build build/ --config Release
155
-
156
- if [[ $RUNNER_OS == 'Windows' ]]; then
157
- # Install (Windows)
158
- cmake --install build/ --prefix install_output --config Release
159
- else
160
- # Install
161
- sudo cmake --install build/ --prefix install_output --config Release
162
- fi
163
-
164
- mkdir -p SDL3-CS/native/$NAME
165
-
166
- if [[ $RUNNER_OS == 'Windows' ]]; then
167
- # Prepare release (Windows)
168
- cp install_output/bin/SDL3.dll SDL3-CS/native/$NAME/SDL3.dll
169
- elif [[ $RUNNER_OS == 'Linux' ]]; then
170
- # Prepare release (Linux)
171
- cp install_output/lib/libSDL3.so SDL3-CS/native/$NAME/libSDL3.so
172
- elif [[ $RUNNER_OS == 'macOS' ]]; then
173
- # Prepare release (macOS)
174
- cp install_output/lib/libSDL3.dylib SDL3-CS/native/$NAME/libSDL3.dylib
175
- fi
66
+ run : ./SDL3-CS/build.sh
176
67
177
68
- name : Create pull request
178
69
uses : peter-evans/create-pull-request@v6
0 commit comments