mirror of
https://github.com/minetest/irrlicht.git
synced 2024-11-18 05:33:52 +01:00
Update MinGW CI setup to match MT's
This commit is contained in:
parent
e5f69157db
commit
d3132e0731
32
.github/workflows/build.yml
vendored
32
.github/workflows/build.yml
vendored
@ -58,37 +58,49 @@ jobs:
|
||||
LIBGL_ALWAYS_SOFTWARE=true xvfb-run ./AutomatedTest
|
||||
|
||||
win32:
|
||||
runs-on: ubuntu-18.04
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Install deps
|
||||
- name: Install compiler
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install cmake g++-mingw-w64-i686 -qyy
|
||||
sudo apt-get update && sudo apt-get install cmake -qyy
|
||||
wget http://minetest.kitsunemimi.pw/mingw-w64-i686_11.2.0_ubuntu20.04.tar.xz -O mingw.tar.xz
|
||||
sudo tar -xaf mingw.tar.xz -C /usr
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
./scripts/ci-build-mingw.sh
|
||||
./scripts/ci-build-mingw.sh package
|
||||
env:
|
||||
CC: i686-w64-mingw32-gcc
|
||||
CXX: i686-w64-mingw32-g++
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: irrlicht-win32
|
||||
path: ./irrlicht-windows.zip
|
||||
|
||||
win64:
|
||||
runs-on: ubuntu-18.04
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Install deps
|
||||
- name: Install compiler
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install cmake g++-mingw-w64-x86-64 -qyy
|
||||
sudo apt-get update && sudo apt-get install cmake -qyy
|
||||
wget http://minetest.kitsunemimi.pw/mingw-w64-x86_64_11.2.0_ubuntu20.04.tar.xz -O mingw.tar.xz
|
||||
sudo tar -xaf mingw.tar.xz -C /usr
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
./scripts/ci-build-mingw.sh
|
||||
./scripts/ci-build-mingw.sh package
|
||||
env:
|
||||
CC: x86_64-w64-mingw32-gcc
|
||||
CXX: x86_64-w64-mingw32-g++
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: irrlicht-win64
|
||||
path: ./irrlicht-windows.zip
|
||||
|
||||
macos:
|
||||
runs-on: macos-10.15
|
||||
steps:
|
||||
|
@ -5,25 +5,27 @@
|
||||
variant=win32
|
||||
[[ "$(basename "$CXX")" == "x86_64-"* ]] && variant=win64
|
||||
|
||||
libjpeg_version=2.0.6
|
||||
libjpeg_version=2.1.2
|
||||
libpng_version=1.6.37
|
||||
zlib_version=1.2.11
|
||||
|
||||
mkdir -p libs
|
||||
pushd libs
|
||||
libs=$PWD
|
||||
tmp=
|
||||
[ "$variant" = win32 ] && tmp=dw2/
|
||||
[ -e libjpeg.zip ] || \
|
||||
wget "http://minetest.kitsunemimi.pw/libjpeg-$libjpeg_version-$variant.zip" -O libjpeg.zip
|
||||
[ -e libpng.zip ] || \
|
||||
wget "http://minetest.kitsunemimi.pw/libpng-$libpng_version-$variant.zip" -O libpng.zip
|
||||
wget "http://minetest.kitsunemimi.pw/${tmp}libpng-$libpng_version-$variant.zip" -O libpng.zip
|
||||
[ -e zlib.zip ] || \
|
||||
wget "http://minetest.kitsunemimi.pw/zlib-$zlib_version-$variant.zip" -O zlib.zip
|
||||
wget "http://minetest.kitsunemimi.pw/${tmp}zlib-$zlib_version-$variant.zip" -O zlib.zip
|
||||
[ -d libjpeg ] || unzip -o libjpeg.zip -d libjpeg
|
||||
[ -d libpng ] || unzip -o libpng.zip -d libpng
|
||||
[ -d zlib ] || unzip -o zlib.zip -d zlib
|
||||
popd
|
||||
|
||||
cmake . \
|
||||
tmp=(
|
||||
-DCMAKE_SYSTEM_NAME=Windows \
|
||||
-DPNG_LIBRARY=$libs/libpng/lib/libpng.dll.a \
|
||||
-DPNG_PNG_INCLUDE_DIR=$libs/libpng/include \
|
||||
@ -31,6 +33,16 @@ cmake . \
|
||||
-DJPEG_INCLUDE_DIR=$libs/libjpeg/include \
|
||||
-DZLIB_LIBRARY=$libs/zlib/lib/libz.dll.a \
|
||||
-DZLIB_INCLUDE_DIR=$libs/zlib/include
|
||||
)
|
||||
[ "$1" = "package" ] && tmp+=(-DCMAKE_EXE_LINKER_FLAGS="-s")
|
||||
|
||||
cmake . "${tmp[@]}"
|
||||
make -j$(nproc)
|
||||
|
||||
if [ "$1" = "package" ]; then
|
||||
make DESTDIR=$PWD/_install install
|
||||
# bundle the DLLs that are specific to Irrlicht (kind of a hack)
|
||||
cp -p $libs/*/bin/lib{jpeg,png}*.dll _install/usr/local/lib/
|
||||
(cd _install/usr/local; zip -9r "$OLDPWD"/irrlicht-windows.zip -- *)
|
||||
fi
|
||||
exit 0
|
||||
|
Loading…
Reference in New Issue
Block a user