123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310 |
- name: build
- # build on c/cpp changes or workflow changes
- on:
- - push
- - pull_request
- jobs:
- linux-gl:
- runs-on: ubuntu-20.04
- steps:
- - uses: actions/checkout@v4
- - 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
- - name: Build
- run: |
- cmake . -DUSE_SDL2=OFF
- make VERBOSE=1 -j2
- - name: Test
- run: |
- ctest --output-on-failure
- - 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
- with:
- name: irrlicht-linux
- path: ./irrlicht-linux.tar.gz
- linux-gles:
- # Xvfb test is broken on 20.04 for unknown reasons (not our bug)
- runs-on: ubuntu-22.04
- steps:
- - uses: actions/checkout@v4
- - 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
- - 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
- LIBGL_ALWAYS_SOFTWARE=true xvfb-run ./AutomatedTest ogles2
- linux-sdl:
- runs-on: ubuntu-20.04
- steps:
- - uses: actions/checkout@v4
- - name: Install deps
- run: |
- sudo apt-get update
- sudo apt-get install g++ cmake libsdl2-dev libpng-dev libjpeg-dev zlib1g-dev -qyy
- - name: Build
- run: |
- cmake . -DBUILD_EXAMPLES=1 -DUSE_SDL2=ON -DCMAKE_BUILD_TYPE=Debug
- make -j2
- - name: Test (headless)
- run: |
- cd bin/Linux
- ./AutomatedTest null
- linux-sdl-gl3:
- # Xvfb test is broken on 20.04 for unknown reasons (not our bug)
- runs-on: ubuntu-22.04
- steps:
- - uses: actions/checkout@v4
- - name: Install deps
- run: |
- sudo apt-get update
- sudo apt-get install g++ cmake libsdl2-dev libpng-dev libjpeg-dev zlib1g-dev xvfb -qyy
- - name: Build
- run: |
- cmake . -DBUILD_EXAMPLES=1 -DUSE_SDL2=ON -DENABLE_OPENGL=OFF -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
- linux-sdl-gles2:
- runs-on: ubuntu-20.04
- steps:
- - uses: actions/checkout@v4
- - name: Install deps
- run: |
- sudo apt-get update
- sudo apt-get install g++ cmake libsdl2-dev libpng-dev libjpeg-dev zlib1g-dev xvfb -qyy
- - name: Build
- run: |
- cmake . -DBUILD_EXAMPLES=1 -DUSE_SDL2=ON -DENABLE_OPENGL=OFF -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 ogles2
- mingw:
- name: "MinGW ${{matrix.config.variant}}${{matrix.config.extras}}"
- runs-on: ubuntu-22.04
- strategy:
- fail-fast: false
- matrix:
- config:
- - {variant: win32, arch: i686}
- - {variant: win64, arch: x86_64}
- - {variant: win32, arch: i686, extras: "-sdl"}
- - {variant: win64, arch: x86_64, extras: "-sdl"}
- steps:
- - uses: actions/checkout@v4
- - name: Install compiler
- run: |
- sudo apt-get update && sudo apt-get install cmake -qyy
- ./scripts/ci-get-mingw.sh
- - name: Build
- run: |
- ./scripts/ci-build-mingw.sh package
- env:
- CC: ${{matrix.config.arch}}-w64-mingw32-clang
- CXX: ${{matrix.config.arch}}-w64-mingw32-clang++
- extras: ${{matrix.config.extras}}
- - uses: actions/upload-artifact@v4
- with:
- name: irrlicht-${{matrix.config.variant}}${{matrix.config.extras}}
- path: ./irrlicht-${{matrix.config.variant}}${{matrix.config.extras}}.zip
- macos:
- runs-on: macos-latest
- steps:
- - uses: actions/checkout@v4
- - name: Install deps
- run: |
- brew update --auto-update
- brew install cmake libpng jpeg
- env:
- HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1
- HOMEBREW_NO_INSTALL_CLEANUP: 1
- - name: Build
- run: |
- cmake . -DCMAKE_FIND_FRAMEWORK=LAST -DBUILD_EXAMPLES=1
- make -j3
- - name: Test (headless)
- run: |
- ./bin/OSX/AutomatedTest null
- macos-sdl:
- runs-on: macos-latest
- steps:
- - uses: actions/checkout@v4
- - name: Install deps
- run: |
- brew update --auto-update
- brew install cmake libpng jpeg sdl2
- env:
- HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1
- HOMEBREW_NO_INSTALL_CLEANUP: 1
- - name: Build
- run: |
- cmake . -DCMAKE_FIND_FRAMEWORK=LAST -DBUILD_EXAMPLES=1 -DUSE_SDL2=1
- make -j3
- msvc:
- name: VS 2019 ${{ matrix.config.arch }} ${{ matrix.sdl.label }}
- runs-on: windows-2019
- env:
- VCPKG_VERSION: 8eb57355a4ffb410a2e94c07b4dca2dffbee8e50
- # 2023.10.19
- vcpkg_packages: zlib libpng libjpeg-turbo
- 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
- sdl:
- -
- use: FALSE
- label: '(no SDL)'
- vcpkg_packages: opengl-registry
- -
- use: TRUE
- label: '(with SDL)'
- vcpkg_packages: sdl2
- steps:
- - name: Checkout
- uses: actions/checkout@v4
- - name: Restore from cache and run vcpkg
- uses: lukka/run-vcpkg@v7
- with:
- vcpkgArguments: ${{env.vcpkg_packages}} ${{matrix.sdl.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}} `
- -DUSE_SDL2=${{matrix.sdl.use}} `
- -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
- with:
- name: msvc-${{ matrix.config.arch }}-${{matrix.sdl.use}}
- path: artifact/
- 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
- - 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
- 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
- # with:
- # name: irrlicht-android-${{ matrix.arch }}
- # path: ${{ runner.temp }}/pkg/${{ matrix.arch }}
|