irrlicht/.github/workflows/build.yml

313 lines
8.7 KiB
YAML
Raw Normal View History

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:
runs-on: ubuntu-20.04
2020-05-18 09:35:38 +02:00
steps:
- uses: actions/checkout@v4
2020-05-18 09:35:38 +02:00
- name: Install deps
run: |
sudo apt-get update
sudo 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: |
cmake . -DUSE_SDL2=OFF
2021-05-08 20:38:57 +02:00
make VERBOSE=1 -j2
2020-05-18 09:35:38 +02:00
2023-09-30 20:25:14 +02:00
- name: Test
run: |
ctest --output-on-failure
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 .
- uses: actions/upload-artifact@v4
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:
# Xvfb test is broken on 20.04 for unknown reasons (not our bug)
runs-on: ubuntu-22.04
2021-02-25 19:30:20 +01:00
steps:
- uses: actions/checkout@v4
2021-02-25 19:30:20 +01:00
- name: Install deps
run: |
sudo apt-get update
sudo 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: |
cmake . -DBUILD_EXAMPLES=1 -DUSE_SDL2=OFF -DENABLE_OPENGL=OFF -DENABLE_GLES2=ON
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:
# something is wrong with the SDL cmake files on 20.04
runs-on: ubuntu-22.04
2022-10-15 11:06:20 +02:00
steps:
- uses: actions/checkout@v4
2022-10-15 11:06:20 +02:00
- name: Install deps
run: |
sudo apt-get update
sudo apt-get install g++ cmake libsdl2-dev libpng-dev libjpeg-dev zlib1g-dev -qyy
2022-10-15 11:06:20 +02:00
- name: Build
run: |
2024-02-23 13:18:56 +01:00
cmake . -DBUILD_EXAMPLES=1 -DUSE_SDL2=ON -DCMAKE_BUILD_TYPE=Debug
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:
# Xvfb test is broken on 20.04 for unknown reasons (not our bug)
runs-on: ubuntu-22.04
2023-03-13 16:39:03 +01:00
steps:
- uses: actions/checkout@v4
2023-03-13 16:39:03 +01:00
- name: Install deps
run: |
sudo apt-get update
sudo 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_OPENGL=OFF -DENABLE_OPENGL3=ON
2023-03-13 16:39:03 +01:00
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:
# something is wrong with the SDL cmake files on 20.04
runs-on: ubuntu-22.04
2023-03-13 16:40:11 +01:00
steps:
- uses: actions/checkout@v4
2023-03-13 16:40:11 +01:00
- name: Install deps
run: |
sudo apt-get update
sudo 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_OPENGL=OFF -DENABLE_GLES2=ON
2023-03-13 16:40:11 +01:00
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 ogles2
2023-03-13 16:40:11 +01:00
2023-07-02 21:21:47 +02:00
mingw:
2023-09-13 13:17:24 +02:00
name: "MinGW ${{matrix.config.variant}}${{matrix.config.extras}}"
2023-12-13 12:37:40 +01:00
runs-on: ubuntu-22.04
2023-07-02 21:21:47 +02:00
strategy:
fail-fast: false
matrix:
config:
2023-09-13 13:17:24 +02:00
- {variant: win32, arch: i686}
- {variant: win64, arch: x86_64}
- {variant: win32, arch: i686, extras: "-sdl"}
- {variant: win64, arch: x86_64, extras: "-sdl"}
2021-03-08 23:48:28 +01:00
steps:
- uses: actions/checkout@v4
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
2024-01-30 13:37:20 +01:00
./scripts/ci-get-mingw.sh
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:
2024-01-30 13:37:20 +01:00
CC: ${{matrix.config.arch}}-w64-mingw32-clang
CXX: ${{matrix.config.arch}}-w64-mingw32-clang++
2023-09-13 13:17:24 +02:00
extras: ${{matrix.config.extras}}
2021-03-08 23:48:28 +01:00
- uses: actions/upload-artifact@v4
2022-02-04 21:08:37 +01:00
with:
2023-09-13 13:17:24 +02:00
name: irrlicht-${{matrix.config.variant}}${{matrix.config.extras}}
path: ./irrlicht-${{matrix.config.variant}}${{matrix.config.extras}}.zip
2022-02-04 21:08:37 +01:00
2021-07-17 11:27:51 +02:00
macos:
runs-on: macos-latest
2021-07-17 11:27:51 +02:00
steps:
- uses: actions/checkout@v4
2021-07-17 11:27:51 +02:00
- name: Install deps
run: |
2024-03-20 20:37:22 +01:00
brew update --auto-update
2021-07-17 11:27:51 +02:00
brew install cmake libpng jpeg
2024-03-20 20:37:22 +01:00
env:
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1
HOMEBREW_NO_INSTALL_CLEANUP: 1
2021-07-17 11:27:51 +02:00
- name: Build
run: |
cmake . -DCMAKE_FIND_FRAMEWORK=LAST -DBUILD_EXAMPLES=1
2021-07-17 11:27:51 +02:00
make -j3
- name: Test (headless)
run: |
./bin/OSX/AutomatedTest null
2022-07-07 21:44:48 +02:00
2024-01-17 00:05:13 +01:00
macos-sdl:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
2024-01-17 00:05:13 +01:00
- name: Install deps
run: |
2024-03-20 20:37:22 +01:00
brew update --auto-update
2024-01-17 00:05:13 +01:00
brew install cmake libpng jpeg sdl2
2024-03-20 20:37:22 +01:00
env:
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1
HOMEBREW_NO_INSTALL_CLEANUP: 1
2024-01-17 00:05:13 +01:00
- name: Build
run: |
cmake . -DCMAKE_FIND_FRAMEWORK=LAST -DBUILD_EXAMPLES=1 -DUSE_SDL2=1
make -j3
2022-07-07 21:44:48 +02:00
msvc:
2023-07-02 21:37:35 +02:00
name: VS 2019 ${{ matrix.config.arch }} ${{ matrix.sdl.label }}
2022-07-07 21:44:48 +02:00
runs-on: windows-2019
env:
2023-11-30 15:43:07 +01:00
VCPKG_VERSION: 8eb57355a4ffb410a2e94c07b4dca2dffbee8e50
# 2023.10.19
vcpkg_packages: zlib libpng libjpeg-turbo
2022-07-07 21:44:48 +02:00
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
2023-07-02 21:37:35 +02:00
sdl:
-
use: FALSE
label: '(no SDL)'
vcpkg_packages: opengl-registry
2023-07-02 21:37:35 +02:00
-
use: TRUE
label: '(with SDL)'
vcpkg_packages: sdl2
2022-07-07 21:44:48 +02:00
steps:
- name: Checkout
uses: actions/checkout@v4
2022-07-07 21:44:48 +02:00
- name: Restore from cache and run vcpkg
uses: lukka/run-vcpkg@v7
with:
2023-07-02 21:37:35 +02:00
vcpkgArguments: ${{env.vcpkg_packages}} ${{matrix.sdl.vcpkg_packages}}
2022-07-07 21:44:48 +02:00
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}} `
2023-07-02 21:37:35 +02:00
-DUSE_SDL2=${{matrix.sdl.use}} `
2022-07-07 21:44:48 +02:00
-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
uses: actions/upload-artifact@v4
2022-07-07 21:44:48 +02:00
with:
name: msvc-${{ matrix.config.arch }}-${{matrix.sdl.use}}
2022-07-07 21:44:48 +02:00
path: artifact/
2024-01-21 15:51:11 +01:00
android:
name: Android ${{ matrix.arch }}
runs-on: ubuntu-20.04
env:
ndk_version: "r25c"
ANDROID_NDK: ${{ github.workspace }}/android-ndk
strategy:
matrix:
arch: [armeabi-v7a, arm64-v8a, x86, x86_64]
steps:
- name: Checkout
uses: actions/checkout@v4
2024-01-21 15:51:11 +01:00
- name: Install deps
run: |
sudo rm /var/lib/man-db/auto-update
sudo apt-get update
sudo apt-get install -qyy wget unzip zip gcc-multilib make cmake
- name: Cache NDK
id: cache-ndk
uses: actions/cache@v4
2024-01-21 15:51:11 +01:00
with:
key: android-ndk-${{ env.ndk_version }}-linux
path: ${{ env.ANDROID_NDK }}
- name: Install NDK
run: |
wget --progress=bar:force "http://dl.google.com/android/repository/android-ndk-${ndk_version}-linux.zip"
unzip -q "android-ndk-${ndk_version}-linux.zip"
rm "android-ndk-${ndk_version}-linux.zip"
mv "android-ndk-${ndk_version}" "${ANDROID_NDK}"
if: ${{ steps.cache-ndk.outputs.cache-hit != 'true' }}
- name: Build
run: ./scripts/ci-build-android.sh ${{ matrix.arch }}
#- name: Upload Artifact
# uses: actions/upload-artifact@v4
2024-01-21 15:51:11 +01:00
# with:
# name: irrlicht-android-${{ matrix.arch }}
# path: ${{ runner.temp }}/pkg/${{ matrix.arch }}