Skip to content

Run examples

Run examples #46

Workflow file for this run

name: Run examples
on:
push:
schedule:
- cron: '0 0 * * 0'
jobs:
build:
runs-on: ${{matrix.os}}
name: "${{matrix.title}} (${{matrix.cc}})"
strategy:
fail-fast: false
matrix:
include:
# gcc
- { title: "Linux", os: "ubuntu-20.04", cc: "gcc-9" }
- { title: "Linux", os: "ubuntu-20.04", cc: "gcc-10" }
- { title: "Linux", os: "ubuntu-20.04", cc: "gcc-11" }
- { title: "Linux", os: "ubuntu-22.04", cc: "gcc-12" }
- { title: "Linux", os: "ubuntu-22.04", cc: "gcc-13" }
- { title: "Linux (bundled cpr)", os: "ubuntu-22.04", cc: "gcc-13", build_defs: "-DBANANA_USE_BUNDLED_CPR=ON" }
# clang
- { title: "Linux", os: "ubuntu-20.04", cc: "clang-9" }
- { title: "Linux", os: "ubuntu-20.04", cc: "clang-10" }
- { title: "Linux", os: "ubuntu-20.04", cc: "clang-11" }
- { title: "Linux", os: "ubuntu-20.04", cc: "clang-12" }
# - { title: "Linux", os: "ubuntu-22.04", cc: "clang-13" } # libstdc++ issues
# - { title: "Linux", os: "ubuntu-22.04", cc: "clang-14" } # libstdc++ issues
- { title: "Linux", os: "ubuntu-22.04", cc: "clang-15" }
- { title: "Linux", os: "ubuntu-22.04", cc: "clang-16" }
- { title: "Linux", os: "ubuntu-22.04", cc: "clang-17" }
- { title: "Linux", os: "ubuntu-22.04", cc: "clang-18" }
# msvc
# - { title: "Windows", os: "windows-2019", cc: "vs2019" } # CTAD issues
- { title: "Windows", os: "windows-2022", cc: "vs2022" }
# macOS
- { title: "macOS", os: "macos-13", cc: "clang" }
steps:
- uses: actions/checkout@v4
- name: Install python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: "Checkout build-actions"
uses: actions/checkout@v4
with:
repository: build-actions/build-actions
path: "build-actions"
ref: "16a2f094d084ab72fe3d68586b2e8ba395bb6712"
- name: Install vcpkg dependencies
uses: lukka/run-vcpkg@v11
with:
vcpkgJsonGlob: 'examples/vcpkg.json'
- name: "[Debug] Examples (Prepare & Configure & Build & Run)"
shell: bash
run: |
export BANANA_BOT_TOKEN=${{secrets.TG_TEST_BOT_TOKEN}}
export BANANA_EXAMPLE_TARGET=${{secrets.TG_TEST_USER}}
export BANANA_EXAMPLE_CONTEXT="${{matrix.title}} (${{matrix.cc}})"
export BANANA_EXAMPLE_DELAY=3000
python build-actions/action.py \
--step=all \
--compiler=${{matrix.cc}} \
--architecture=x64 \
--config=.github/workflows/examples-config.json \
--source-dir=examples \
--build-type=Debug \
--build-defs="CMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake"