2020-05-18 09:35:38 +02:00
|
|
|
name: build
|
|
|
|
|
|
|
|
# build on c/cpp changes or workflow changes
|
|
|
|
on:
|
|
|
|
- push
|
|
|
|
- pull_request
|
|
|
|
|
|
|
|
jobs:
|
2021-02-25 19:30:20 +01:00
|
|
|
|
|
|
|
linux-gl:
|
2022-10-14 16:08:51 +02:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
container:
|
|
|
|
image: ubuntu:bionic
|
|
|
|
env: { LANG: "C.UTF-8" }
|
2020-05-18 09:35:38 +02:00
|
|
|
steps:
|
2022-12-31 12:29:33 +01:00
|
|
|
- uses: actions/checkout@v3
|
2020-05-18 09:35:38 +02:00
|
|
|
- name: Install deps
|
|
|
|
run: |
|
2022-10-14 16:08:51 +02:00
|
|
|
apt-get update
|
|
|
|
apt-get install g++ cmake libxi-dev libgl1-mesa-dev libpng-dev libjpeg-dev zlib1g-dev -qyy
|
2020-05-18 09:35:38 +02:00
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: |
|
2021-03-06 21:23:00 +01:00
|
|
|
cmake .
|
2021-05-08 20:38:57 +02:00
|
|
|
make VERBOSE=1 -j2
|
2020-05-18 09:35:38 +02:00
|
|
|
|
2021-03-25 15:34:39 +01:00
|
|
|
- name: Package
|
|
|
|
run: |
|
|
|
|
make DESTDIR=$PWD/_install install
|
|
|
|
tar -c -I "gzip -9" -f irrlicht-linux.tar.gz -C ./_install/usr/local .
|
|
|
|
|
2022-10-14 16:08:51 +02:00
|
|
|
- uses: actions/upload-artifact@v3
|
2021-03-25 15:34:39 +01:00
|
|
|
with:
|
|
|
|
name: irrlicht-linux
|
|
|
|
path: ./irrlicht-linux.tar.gz
|
|
|
|
|
2021-02-25 19:30:20 +01:00
|
|
|
linux-gles:
|
2022-10-14 16:08:51 +02:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
container:
|
|
|
|
image: ubuntu:bionic
|
|
|
|
env: { LANG: "C.UTF-8" }
|
2021-02-25 19:30:20 +01:00
|
|
|
steps:
|
2022-12-31 12:29:33 +01:00
|
|
|
- uses: actions/checkout@v3
|
2021-02-25 19:30:20 +01:00
|
|
|
- name: Install deps
|
|
|
|
run: |
|
2022-10-14 16:08:51 +02:00
|
|
|
apt-get update
|
|
|
|
apt-get install g++ cmake libxi-dev libgles2-mesa-dev libpng-dev libjpeg-dev zlib1g-dev xvfb -qyy
|
2021-02-25 19:30:20 +01:00
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: |
|
2023-02-19 20:44:02 +01:00
|
|
|
cmake . -DBUILD_EXAMPLES=1 -DENABLE_OPENGL=OFF -DENABLE_GLES2=ON
|
2021-04-22 10:46:31 +02:00
|
|
|
make -j2
|
|
|
|
|
|
|
|
- name: Test (headless)
|
|
|
|
run: |
|
|
|
|
cd bin/Linux
|
|
|
|
./AutomatedTest null
|
|
|
|
|
|
|
|
- name: Test (Xvfb)
|
|
|
|
run: |
|
|
|
|
cd bin/Linux
|
2023-02-19 20:44:02 +01:00
|
|
|
LIBGL_ALWAYS_SOFTWARE=true xvfb-run ./AutomatedTest ogles2
|
2021-03-08 23:48:28 +01:00
|
|
|
|
2022-10-15 11:06:20 +02:00
|
|
|
linux-sdl:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
container:
|
|
|
|
image: ubuntu:jammy
|
|
|
|
env: { LANG: "C.UTF-8" }
|
|
|
|
steps:
|
2022-12-31 12:29:33 +01:00
|
|
|
- uses: actions/checkout@v3
|
2022-10-15 11:06:20 +02:00
|
|
|
- name: Install deps
|
|
|
|
run: |
|
|
|
|
apt-get update
|
|
|
|
apt-get install g++ cmake libsdl2-dev libpng-dev libjpeg-dev zlib1g-dev -qyy
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: |
|
2023-02-19 20:44:02 +01:00
|
|
|
cmake . -DBUILD_EXAMPLES=1 -DUSE_SDL2=ON
|
2022-10-15 11:06:20 +02:00
|
|
|
make -j2
|
|
|
|
|
|
|
|
- name: Test (headless)
|
|
|
|
run: |
|
|
|
|
cd bin/Linux
|
|
|
|
./AutomatedTest null
|
|
|
|
|
2023-03-13 16:39:03 +01:00
|
|
|
linux-sdl-gl3:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
container:
|
|
|
|
image: ubuntu:jammy
|
|
|
|
env: { LANG: "C.UTF-8" }
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Install deps
|
|
|
|
run: |
|
|
|
|
apt-get update
|
2023-03-13 16:45:40 +01:00
|
|
|
apt-get install g++ cmake libsdl2-dev libpng-dev libjpeg-dev zlib1g-dev xvfb -qyy
|
2023-03-13 16:39:03 +01:00
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: |
|
|
|
|
cmake . -DBUILD_EXAMPLES=1 -DUSE_SDL2=ON -DENABLE_OPENGL3=ON
|
|
|
|
make -j2
|
|
|
|
|
|
|
|
- name: Test (headless)
|
|
|
|
run: |
|
|
|
|
cd bin/Linux
|
|
|
|
./AutomatedTest null
|
|
|
|
|
|
|
|
- name: Test (Xvfb)
|
|
|
|
run: |
|
|
|
|
cd bin/Linux
|
|
|
|
LIBGL_ALWAYS_SOFTWARE=true xvfb-run ./AutomatedTest opengl3
|
|
|
|
|
2023-03-13 16:40:11 +01:00
|
|
|
linux-sdl-gles2:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
container:
|
|
|
|
image: ubuntu:jammy
|
|
|
|
env: { LANG: "C.UTF-8" }
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Install deps
|
|
|
|
run: |
|
|
|
|
apt-get update
|
2023-03-13 16:45:40 +01:00
|
|
|
apt-get install g++ cmake libsdl2-dev libpng-dev libjpeg-dev zlib1g-dev xvfb -qyy
|
2023-03-13 16:40:11 +01:00
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: |
|
|
|
|
cmake . -DBUILD_EXAMPLES=1 -DUSE_SDL2=ON -DENABLE_GLES2=ON
|
|
|
|
make -j2
|
|
|
|
|
|
|
|
- name: Test (headless)
|
|
|
|
run: |
|
|
|
|
cd bin/Linux
|
|
|
|
./AutomatedTest null
|
|
|
|
|
|
|
|
- name: Test (Xvfb)
|
|
|
|
run: |
|
|
|
|
cd bin/Linux
|
|
|
|
LIBGL_ALWAYS_SOFTWARE=true xvfb-run ./AutomatedTest gles2
|
|
|
|
|
2021-03-08 23:48:28 +01:00
|
|
|
win32:
|
2022-02-04 21:08:37 +01:00
|
|
|
runs-on: ubuntu-20.04
|
2021-03-08 23:48:28 +01:00
|
|
|
steps:
|
2022-12-31 12:29:33 +01:00
|
|
|
- uses: actions/checkout@v3
|
2022-02-04 21:08:37 +01:00
|
|
|
- name: Install compiler
|
2021-03-08 23:48:28 +01:00
|
|
|
run: |
|
2022-02-04 21:08:37 +01:00
|
|
|
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
|
2021-03-08 23:48:28 +01:00
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: |
|
2022-02-04 21:08:37 +01:00
|
|
|
./scripts/ci-build-mingw.sh package
|
2021-03-08 23:48:28 +01:00
|
|
|
env:
|
|
|
|
CC: i686-w64-mingw32-gcc
|
|
|
|
CXX: i686-w64-mingw32-g++
|
|
|
|
|
2022-10-14 16:08:51 +02:00
|
|
|
- uses: actions/upload-artifact@v3
|
2022-02-04 21:08:37 +01:00
|
|
|
with:
|
|
|
|
name: irrlicht-win32
|
2022-05-06 14:05:16 +02:00
|
|
|
path: ./irrlicht-win32.zip
|
2022-02-04 21:08:37 +01:00
|
|
|
|
2021-03-08 23:48:28 +01:00
|
|
|
win64:
|
2022-02-04 21:08:37 +01:00
|
|
|
runs-on: ubuntu-20.04
|
2021-03-08 23:48:28 +01:00
|
|
|
steps:
|
2022-12-31 12:29:33 +01:00
|
|
|
- uses: actions/checkout@v3
|
2022-02-04 21:08:37 +01:00
|
|
|
- name: Install compiler
|
2021-03-08 23:48:28 +01:00
|
|
|
run: |
|
2022-02-04 21:08:37 +01:00
|
|
|
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
|
2021-03-08 23:48:28 +01:00
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: |
|
2022-02-04 21:08:37 +01:00
|
|
|
./scripts/ci-build-mingw.sh package
|
2021-03-08 23:48:28 +01:00
|
|
|
env:
|
|
|
|
CC: x86_64-w64-mingw32-gcc
|
|
|
|
CXX: x86_64-w64-mingw32-g++
|
2021-07-17 11:27:51 +02:00
|
|
|
|
2022-10-14 16:08:51 +02:00
|
|
|
- uses: actions/upload-artifact@v3
|
2022-02-04 21:08:37 +01:00
|
|
|
with:
|
|
|
|
name: irrlicht-win64
|
2022-05-06 14:05:16 +02:00
|
|
|
path: ./irrlicht-win64.zip
|
2022-02-04 21:08:37 +01:00
|
|
|
|
2021-07-17 11:27:51 +02:00
|
|
|
macos:
|
2022-12-31 12:29:33 +01:00
|
|
|
runs-on: macos-latest
|
2021-07-17 11:27:51 +02:00
|
|
|
steps:
|
2022-12-31 12:29:33 +01:00
|
|
|
- uses: actions/checkout@v3
|
2021-07-17 11:27:51 +02:00
|
|
|
- name: Install deps
|
|
|
|
run: |
|
|
|
|
brew update
|
|
|
|
brew install cmake libpng jpeg
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: |
|
2022-03-09 22:43:35 +01:00
|
|
|
cmake . -DCMAKE_FIND_FRAMEWORK=LAST -DBUILD_EXAMPLES=1
|
2021-07-17 11:27:51 +02:00
|
|
|
make -j3
|
2022-03-09 22:43:35 +01:00
|
|
|
|
|
|
|
- name: Test (headless)
|
|
|
|
run: |
|
|
|
|
./bin/OSX/AutomatedTest null
|
2022-07-07 21:44:48 +02:00
|
|
|
|
|
|
|
msvc:
|
|
|
|
name: VS 2019 ${{ matrix.config.arch }}
|
|
|
|
runs-on: windows-2019
|
|
|
|
env:
|
|
|
|
VCPKG_VERSION: 14e7bb4ae24616ec54ff6b2f6ef4e8659434ea44
|
|
|
|
# 2022.05.10
|
|
|
|
vcpkg_packages: zlib libpng libjpeg-turbo opengl-registry
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
config:
|
|
|
|
-
|
|
|
|
arch: x86
|
|
|
|
generator: "-G'Visual Studio 16 2019' -A Win32"
|
|
|
|
vcpkg_triplet: x86-windows
|
|
|
|
-
|
|
|
|
arch: x64
|
|
|
|
generator: "-G'Visual Studio 16 2019' -A x64"
|
|
|
|
vcpkg_triplet: x64-windows
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Restore from cache and run vcpkg
|
|
|
|
uses: lukka/run-vcpkg@v7
|
|
|
|
with:
|
|
|
|
vcpkgArguments: ${{env.vcpkg_packages}}
|
|
|
|
vcpkgDirectory: '${{ github.workspace }}\vcpkg'
|
|
|
|
appendedCacheKey: ${{ matrix.config.vcpkg_triplet }}
|
|
|
|
vcpkgGitCommitId: ${{ env.VCPKG_VERSION }}
|
|
|
|
vcpkgTriplet: ${{ matrix.config.vcpkg_triplet }}
|
|
|
|
|
|
|
|
- name: CMake
|
|
|
|
run: |
|
|
|
|
cmake ${{matrix.config.generator}} `
|
|
|
|
-DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}\vcpkg\scripts\buildsystems\vcpkg.cmake" `
|
|
|
|
-DCMAKE_BUILD_TYPE=Release .
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: cmake --build . --config Release
|
|
|
|
|
|
|
|
- name: Create artifact folder
|
|
|
|
run: |
|
|
|
|
mkdir artifact/
|
|
|
|
mkdir artifact/lib/
|
|
|
|
|
|
|
|
- name: Move dlls into artifact folder
|
|
|
|
run: move bin\Win32-VisualStudio\Release\* artifact\lib\
|
|
|
|
|
|
|
|
- name: Move includes into artifact folder
|
|
|
|
run: move include artifact/
|
|
|
|
|
|
|
|
- name: Upload Artifact
|
2022-12-31 12:29:33 +01:00
|
|
|
uses: actions/upload-artifact@v3
|
2022-07-07 21:44:48 +02:00
|
|
|
with:
|
|
|
|
name: msvc-${{ matrix.config.arch }}
|
|
|
|
path: artifact/
|