mirror of
https://github.com/pantor/inja.git
synced 2026-02-17 09:03:58 +00:00
* add and document set_html_autoescape * add render_to to Environment that accepts a string (and turns it into a Template) * code style, update single include * update ci * revert macos-14 test --------- Co-authored-by: pantor <lars.berscheid@online.de>
113 lines
2.8 KiB
YAML
113 lines
2.8 KiB
YAML
name: CI
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
build-and-test:
|
|
name: test-${{ matrix.name }}
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- name: ubuntu-20.04-gcc-9
|
|
os: ubuntu-20.04
|
|
compiler: gcc-9
|
|
|
|
- name: ubuntu-20.04-gcc-11
|
|
os: ubuntu-20.04
|
|
compiler: gcc-11
|
|
|
|
- name: ubuntu-20.04-clang-9
|
|
os: ubuntu-20.04
|
|
compiler: clang-9
|
|
|
|
- name: ubuntu-20.04-clang-11
|
|
os: ubuntu-20.04
|
|
compiler: clang-11
|
|
|
|
- name: ubuntu-20.04-clang-12
|
|
os: ubuntu-20.04
|
|
compiler: clang-12
|
|
|
|
- name: ubuntu-20.04-clang-11-no-exceptions
|
|
os: ubuntu-20.04
|
|
compiler: clang-11
|
|
cmake_vars: "-DCMAKE_CXX_FLAGS=-fno-exceptions -DBUILD_TESTING=OFF -DBUILD_BENCHMARK=ON"
|
|
|
|
- name: ubuntu-22.04-gcc
|
|
os: ubuntu-22.04
|
|
compiler: gcc
|
|
|
|
- name: windows-2019-msvc
|
|
os: windows-2019
|
|
compiler: msvc
|
|
|
|
- name: windows-2019-clang
|
|
os: windows-2019
|
|
compiler: clang
|
|
|
|
- name: windows-2019-gcc
|
|
os: windows-2019
|
|
compiler: gcc
|
|
|
|
- name: windows-2022-msvc
|
|
os: windows-2022
|
|
compiler: msvc
|
|
|
|
- name: macOS-12-gcc
|
|
os: macOS-12
|
|
compiler: gcc
|
|
|
|
- name: macOS-12-clang
|
|
os: macOS-12
|
|
compiler: clang
|
|
|
|
# - name: macOS-14-clang
|
|
# os: macOS-14
|
|
# compiler: clang
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Setup Cpp
|
|
uses: aminya/setup-cpp@v0.26.2
|
|
with:
|
|
compiler: ${{ matrix.compiler }}
|
|
|
|
- name: Build & Test Debug
|
|
run: |
|
|
cmake -E remove_directory build
|
|
cmake -B build -S . -DCMAKE_BUILD_TYPE=Debug
|
|
cmake --build build -j2
|
|
cd build && ctest -j2 --output-on-failure
|
|
|
|
- name: Build & Test Release
|
|
run: |
|
|
cmake -E remove_directory build
|
|
cmake -B build -S . -DCMAKE_BUILD_TYPE=Release ${{ matrix.cmake_vars }}
|
|
cmake --build build -j2
|
|
cd build && ctest -j2 --output-on-failure
|
|
|
|
|
|
check-single-include:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Update single include
|
|
run: |
|
|
mv single_include/inja/inja.hpp single_include/inja/inja_old.hpp
|
|
bash scripts/update_single_include.sh
|
|
|
|
- name: Check if equal
|
|
working-directory: single_include
|
|
run: |
|
|
diff inja/inja.hpp inja/inja_old.hpp >/dev/null
|
|
|
|
- uses: actions/upload-artifact@v3
|
|
with:
|
|
name: single_include_inja
|
|
path: single_include/inja/inja.hpp
|