DEBUG #1165
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Testing | |
| on: | |
| push: | |
| pull_request: | |
| jobs: | |
| testing: | |
| if: | | |
| github.event_name == 'push' || | |
| github.event_name == 'pull_request' && | |
| github.event.pull_request.head.repo.full_name != github.repository | |
| strategy: | |
| matrix: | |
| os: [ubuntu-24.04, macos-26] | |
| BUILDTYPE: [Debug, Release] | |
| LIBLUA: | |
| - "5.4" | |
| - "5.3" | |
| - "5.2" | |
| - "5.1" | |
| - "luajit-v2.1" | |
| exclude: | |
| - os: macos-26 | |
| LIBLUA: "5.4" | |
| - os: macos-26 | |
| LIBLUA: "5.3" | |
| - os: macos-26 | |
| LIBLUA: "5.2" | |
| - os: macos-26 | |
| LIBLUA: "5.1" | |
| include: | |
| - BUILDTYPE: Debug | |
| CMAKEFLAGS: -DCMAKE_BUILD_TYPE=Debug | |
| - BUILDTYPE: Release | |
| CMAKEFLAGS: -DCMAKE_BUILD_TYPE=RelWithDebInfo | |
| - LIBLUA: "5.4" | |
| PACKAGES: lua5.4 liblua5.4-dev | |
| - LIBLUA: "5.3" | |
| PACKAGES: lua5.3 liblua5.3-dev | |
| - LIBLUA: "5.2" | |
| PACKAGES: lua5.2 liblua5.2-dev | |
| - LIBLUA: "5.1" | |
| PACKAGES: lua5.1 liblua5.1-0-dev | |
| - LIBLUA: "luajit-v2.1" | |
| PACKAGES: libluajit-5.1-dev libluajit-5.1-2 luajit | |
| FLAVORFLAGS: -DLUAJIT_FRIENDLY_MODE=ON -DENABLE_LUAJIT=ON | |
| fail-fast: false | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Disable processing triggers for man-db | |
| if: runner.os == 'Linux' | |
| run: sudo apt-get remove --purge man-db | |
| - name: Setup Linux packages | |
| if: runner.os == 'Linux' | |
| run: sudo apt install -y clang-15 libclang-common-15-dev ${{ matrix.PACKAGES }} | |
| - name: Setup macOS packages | |
| if: runner.os == 'macOS' | |
| run: brew install llvm luajit cmake ninja | |
| - name: Running CMake (Linux) | |
| if: runner.os == 'Linux' | |
| run: > | |
| cmake -S . -B build -G Ninja -DENABLE_TESTING=ON | |
| -DCMAKE_C_COMPILER=clang-15 -DCMAKE_CXX_COMPILER=clang++-15 | |
| ${{ matrix.CMAKEFLAGS }} ${{ matrix.FLAVORFLAGS }} | |
| - name: Define Brew prefixes (macOS) | |
| if: runner.os == 'macOS' | |
| run: | | |
| echo "BREW_LLVM_PREFIX=`brew --prefix llvm`" >> $GITHUB_ENV | |
| echo "BREW_LUAJIT_PREFIX=`brew --prefix luajit`" >> $GITHUB_ENV | |
| - name: Running CMake (macOS) | |
| if: runner.os == 'macOS' | |
| run: | | |
| cmake -S . -B build -G Ninja \ | |
| -DCMAKE_C_COMPILER=$BREW_LLVM_PREFIX/bin/clang \ | |
| -DCMAKE_CXX_COMPILER=$BREW_LLVM_PREFIX/bin/clang++ \ | |
| -DLUA_INCLUDE_DIR=$BREW_LUAJIT_PREFIX/include/luajit-2.1 \ | |
| -DLUA_LIBRARIES=$BREW_LUAJIT_PREFIX/lib/libluajit-5.1.dylib \ | |
| -DENABLE_LUAJIT=ON \ | |
| -DLUAJIT_FRIENDLY_MODE=ON \ | |
| ${{ matrix.CMAKEFLAGS }} | |
| - name: Building | |
| run: cmake --build build --parallel $(getconf _NPROCESSORS_ONLN) | |
| - name: Testing | |
| run: cmake --build build --target test | |
| env: | |
| CTEST_OUTPUT_ON_FAILURE: 1 | |
| CTEST_PARALLEL_LEVEL: $(getconf _NPROCESSORS_ONLN) |