@@ -21,6 +21,7 @@ concurrency:
21
21
cancel-in-progress : true
22
22
23
23
env :
24
+ LINUX_GCC_VERSION : 12
24
25
MACOSX_DEPLOYMENT_TARGET : 13.0
25
26
26
27
jobs :
84
85
- name : Checkout
85
86
uses : actions/checkout@v4
86
87
87
- - name : Setup cross compiling Linux
88
+ - name : Prepare Dependencies Linux
88
89
id : cross_compile
89
- if : contains(matrix .os, 'ubuntu')
90
+ if : runner .os == 'Linux'
90
91
run : |
91
92
echo "::group::distro detection"
92
93
# detect dist name like bionic, focal, etc
@@ -144,12 +145,19 @@ jobs:
144
145
package_arch=$(dpkg --print-architecture)
145
146
if [[ ${{ matrix.arch }} == "aarch64" ]]; then
146
147
dependencies+=("crossbuild-essential-arm64")
148
+ dependencies+=("gcc-${LINUX_GCC_VERSION}-aarch64-linux-gnu")
149
+ dependencies+=("g++-${LINUX_GCC_VERSION}-aarch64-linux-gnu")
147
150
cross_compile=true
148
151
package_arch="arm64"
149
152
elif [[ ${{ matrix.arch }} == "powerpc64le" ]]; then
150
153
dependencies+=("crossbuild-essential-ppc64el")
154
+ dependencies+=("gcc-${LINUX_GCC_VERSION}-powerpc64le-linux-gnu")
155
+ dependencies+=("g++-${LINUX_GCC_VERSION}-powerpc64le-linux-gnu")
151
156
cross_compile=true
152
157
package_arch="ppc64el"
158
+ else
159
+ dependencies+=("gcc-${LINUX_GCC_VERSION}")
160
+ dependencies+=("g++-${LINUX_GCC_VERSION}")
153
161
fi
154
162
echo "cross compiling: $cross_compile"
155
163
echo "package architecture: $package_arch"
@@ -235,10 +243,18 @@ jobs:
235
243
236
244
echo "PKG_CONFIG_PATH=${pkg_config_sysroot_dir}/pkgconfig"
237
245
echo "PKG_CONFIG_PATH=${pkg_config_sysroot_dir}/pkgconfig" >> $GITHUB_ENV
246
+
247
+ if [[ ${cross_compile} == false ]]; then
248
+ echo "CC=gcc-${LINUX_GCC_VERSION}"
249
+ echo "CC=gcc-${LINUX_GCC_VERSION}" >> $GITHUB_ENV
250
+
251
+ echo "CXX=g++-${LINUX_GCC_VERSION}"
252
+ echo "CXX=g++-${LINUX_GCC_VERSION}" >> $GITHUB_ENV
253
+ fi
238
254
echo "::endgroup::"
239
255
240
- - name : Install system dependencies Linux
241
- if : contains(matrix .os, 'ubuntu')
256
+ - name : Setup Dependencies Linux
257
+ if : runner .os == 'Linux'
242
258
run : |
243
259
echo "::group::apt update"
244
260
sudo apt-get update
@@ -274,7 +290,7 @@ jobs:
274
290
275
291
brew install ${dependencies[@]}
276
292
277
- - name : Setup Dependencies Windows
293
+ - name : Setup msys2 Windows
278
294
if : runner.os == 'Windows'
279
295
uses : msys2/setup-msys2@v2
280
296
with :
0 commit comments