feat: Dandelion teas have vitamins (#5752) #13777
This file contains 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: General build matrix | |
on: | |
push: | |
branches: [main] | |
paths-ignore: [doc/**, scripts/**] | |
pull_request: | |
branches: [main] | |
paths-ignore: [doc/**, scripts/**] | |
types: [opened, reopened, synchronize, ready_for_review] | |
workflow_dispatch: | |
# Cancel all previous instances in favor of latest revision of a PR. | |
# Allow running main builds to complete to help with ccache refreshes. | |
concurrency: | |
group: general-build-${{ github.event.pull_request.number || github.ref_name }} | |
cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
jobs: | |
skip-duplicates: | |
continue-on-error: true | |
runs-on: ubuntu-24.04 | |
outputs: | |
should_skip_code: ${{ steps.skip_code_check.outputs.should_skip }} | |
should_skip_data: ${{ steps.skip_data_check.outputs.should_skip }} | |
steps: | |
- id: skip_code_check | |
uses: fkirc/skip-duplicate-actions@master | |
with: | |
paths_ignore: '["android/**", "build-data/osx/**", "doc/**", "doxygen_doc/**", "msvc-**", "tools/**", "utilities/**", "scripts/**", "data/**", "lang/**"]' | |
- id: skip_data_check | |
uses: fkirc/skip-duplicate-actions@master | |
with: | |
paths_ignore: '["android/**", "build-data/osx/**", "doc/**", "doxygen_doc/**", "msvc-**", "tools/**", "utilities/**", "scripts/**"]' | |
varied_builds: | |
needs: skip-duplicates | |
strategy: | |
fail-fast: ${{ github.ref_name == 'main' }} | |
max-parallel: ${{ github.ref_name == 'main' && 20 || 1 }} | |
matrix: | |
include: | |
- title: GCC 12, Ubuntu, Curses | |
compiler: g++-12 | |
os: ubuntu-24.04 | |
cmake: 0 | |
tiles: 0 | |
sound: 0 | |
lua: 0 | |
test-stage: 1 | |
libbacktrace: 1 | |
native: linux64 | |
ccache_limit: 2G | |
ccache_key: linux-gcc-12 | |
always-run: true | |
- title: GCC 12, Ubuntu, Tiles, Sound, Lua, CMake, Languages | |
compiler: g++-12 | |
os: ubuntu-24.04 | |
cmake: 1 | |
tiles: 1 | |
sound: 1 | |
lua: 1 | |
languages: all | |
native: linux64 | |
ccache_limit: 2G | |
ccache_key: linux-gcc-12-cmake-tiles | |
upload-artifact: true | |
- title: GCC 12, Ubuntu, Tiles, Sound, Lua | |
compiler: g++-12 | |
os: ubuntu-24.04 | |
cmake: 1 | |
tiles: 1 | |
sound: 1 | |
lua: 1 | |
test-stage: 1 | |
libbacktrace: 1 | |
native: linux64 | |
ccache_limit: 1G | |
ccache_key: linux-gcc-12-tiles | |
# === Temporarily disabled because of #3664 === | |
# - title: GCC 12, Ubuntu, Tiles, NoSound, ASan | |
# compiler: g++-12 | |
# os: ubuntu-24.04 | |
# cmake: 0 | |
# tiles: 1 | |
# sound: 0 | |
# lua: 0 | |
# sanitize: address | |
# native: linux64 | |
# ccache_limit: 2G | |
# ccache_key: linux-gcc-12-asan | |
# === Temporarily disabled because of #3664 === | |
# - title: Clang 14, Ubuntu, Tiles, NoSound, ASan, UBSan | |
# compiler: clang++-14 | |
# os: ubuntu-24.04 | |
# cmake: 0 | |
# tiles: 1 | |
# sound: 0 | |
# lua: 0 | |
# sanitize: address,undefined | |
# cxxflags: --gcc-toolchain=/opt/mock-gcc-11 | |
# native: linux64 | |
# ccache_limit: 2G | |
# ccache_key: linux-llvm-14-asan | |
# - title: Clang 14, macOS 12, Tiles, Sound, Localize, Lua | |
# compiler: clang++ | |
# os: macos-14 | |
# cmake: 0 | |
# tiles: 1 | |
# sound: 1 | |
# lua: 1 | |
# test-stage: 1 | |
# native: osx | |
# grep_clang_version_rxp: "14\\.[0-9]+\\.[0-9]+" | |
# ccache_limit: 1G # avg. 980MB~1100MB | |
# ccache_key: macos-llvm-14 | |
name: ${{ matrix.title }} | |
runs-on: ${{ matrix.os }} | |
env: | |
ZSTD_CLEVEL: 17 | |
CMAKE: ${{ matrix.cmake }} | |
COMPILER: ${{ matrix.compiler }} | |
# CXXFLAGS: ${{ matrix.cxxflags }} | |
OS: ${{ matrix.os }} | |
TILES: ${{ matrix.tiles }} | |
SOUND: ${{ matrix.sound }} | |
LUA: ${{ matrix.lua }} | |
# SANITIZE: ${{ matrix.sanitize }} | |
TEST_STAGE: ${{ matrix.test-stage }} | |
LANGUAGES: ${{ matrix.languages }} | |
LIBBACKTRACE: ${{ matrix.libbacktrace }} | |
NATIVE: ${{ matrix.native }} | |
RELEASE: 1 | |
CCACHE_LIMIT: ${{ matrix.ccache_limit }} | |
CCACHE_FILECLONE: true | |
CCACHE_HARDLINK: true | |
CCACHE_NOCOMPRESS: true | |
SKIP: ${{ matrix.always-run != true && ( github.event.pull_request.draft == true || needs.skip-duplicates.outputs.should_skip_code == true || needs.skip-duplicates.outputs.should_skip_data == true ) }} | |
steps: | |
- name: checkout repository | |
if: ${{ env.SKIP == 'false' }} | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: install dependencies (ubuntu) | |
if: ${{ env.SKIP == 'false' && runner.os == 'Linux' }} | |
run: | | |
sudo apt-get update | |
sudo apt-get install libncursesw5-dev ccache gettext parallel | |
sudo locale-gen en_US.UTF-8 fr_FR.UTF-8 ru_RU.UTF-8 | |
- name: install SDL2 dependencies (ubuntu) | |
if: ${{ env.SKIP == 'false' && runner.os == 'Linux' && matrix.tiles == 1 }} | |
run: | | |
sudo apt-get install libsdl2-dev libsdl2-ttf-dev libsdl2-image-dev libsdl2-mixer-dev libpulse-dev libflac-dev | |
# === Temporarily disabled because of #3664 === | |
# - name: set up a mock GCC toolchain root for Clang (Ubuntu) | |
# if: ${{ env.SKIP == 'false' && runner.os == 'Linux' && (matrix.compiler == 'clang++-14') }} | |
# run: | | |
# sudo mkdir /opt/mock-gcc-11 | |
# sudo ln -s /usr/include /opt/mock-gcc-11/include | |
# sudo ln -s /usr/bin /opt/mock-gcc-11/bin | |
# sudo mkdir -p /opt/mock-gcc-11/lib/gcc/x86_64-linux-gnu | |
# sudo ln -s /usr/lib/gcc/x86_64-linux-gnu/11 /opt/mock-gcc-11/lib/gcc/x86_64-linux-gnu/11 | |
- name: install runtime dependencies (mac) | |
if: ${{ env.SKIP == 'false' && runner.os == 'macOS' }} | |
uses: BrettDong/setup-sdl2-frameworks@v1 | |
with: | |
sdl2: latest | |
sdl2-ttf: latest | |
sdl2-image: latest | |
sdl2-mixer: latest | |
- name: install build dependencies (mac) | |
if: ${{ env.SKIP == 'false' && runner.os == 'macOS' }} | |
run: | | |
${{ matrix.compiler }} --version | |
# Ensure that it is actually needed version | |
${{ matrix.compiler }} --version | grep -q -E "${{ matrix.grep_clang_version_rxp }}" | |
HOMEBREW_NO_AUTO_UPDATE=yes HOMEBREW_NO_INSTALL_CLEANUP=yes brew install gettext ccache parallel | |
# problem matchers are only ran on GCC to reduce error spam | |
- name: add problem matcher | |
if: ${{ matrix.always-run == true }} | |
run: | | |
# Enable GitHub actions problem matchers | |
# (See https://github.com/actions/toolkit/blob/master/docs/problem-matchers.md) | |
echo "::add-matcher::build-scripts/problem-matchers/catch2.json" | |
echo "::add-matcher::build-scripts/problem-matchers/debugmsg.json" | |
- name: prepare | |
if: ${{ env.SKIP == 'false' }} | |
run: bash ./build-scripts/requirements.sh | |
- name: Get ccache vars | |
id: get-ccache-vars | |
if: ${{ env.SKIP == 'false' }} | |
shell: bash | |
run: | | |
echo "datetime=$(/bin/date -u "+%Y%m%d%H%M")" >> $GITHUB_OUTPUT | |
echo "ccache-path=$([ "$RUNNER_OS" = "macOS" ] && echo '/Users/runner/Library/Caches/ccache' || echo '~/.cache/ccache')" >> $GITHUB_OUTPUT | |
- name: ccache cache files | |
if: ${{ env.SKIP == 'false' && ( runner.os == 'Linux' || runner.os == 'macOS' ) }} | |
uses: actions/cache@v3 | |
id: cache | |
with: | |
path: ${{ steps.get-ccache-vars.outputs.ccache-path }} | |
# double-dash after compiler is not a typo, it is to disambiguate between g++-<date> and g++-11-<date> for restore key prefix matching | |
key: ccache-${{ github.ref_name }}-${{ matrix.ccache_key }}--${{ steps.get-ccache-vars.outputs.datetime }} | |
restore-keys: ccache-main-${{ matrix.ccache_key }}-- | |
- name: ccache info | |
if: ${{ env.SKIP == 'false' && steps.cache.outputs.cache-hit != 'true' }} | |
run: | | |
echo CCache failed to restore from cache, emmiting stats | |
ccache --show-stats --verbose | |
- uses: ammaraskar/gcc-problem-matcher@master | |
- name: build | |
if: ${{ env.SKIP == 'false' }} | |
run: bash ./build-scripts/gha_compile_only.sh | |
- name: post-build ccache stats and cleanup | |
if: ${{ env.SKIP == 'false' && !failure() && (runner.os == 'Linux' || runner.os == 'macOS') }} | |
run: | | |
ccache --show-stats --verbose | |
ccache --max-size ${{ env.CCACHE_LIMIT }} | |
ccache --cleanup | |
ccache --show-stats --verbose | |
- name: clear ccache on PRs | |
if: ${{ github.ref_name != 'main' && env.SKIP == 'false' && !failure() && (runner.os == 'Linux' || runner.os == 'macOS') }} | |
run: ccache --clear | |
- name: run tests | |
if: ${{ github.ref_name != 'main' && env.SKIP == 'false' }} | |
run: bash ./build-scripts/gha_test_only.sh | |
- name: emit success artifact | |
if: ${{ success() && matrix.upload-artifact == 'true' }} | |
uses: actions/[email protected] | |
with: | |
name: ${{ github.event.number }} | |
path: ${{ github.event.number }} | |
- name: upload artifacts if failed | |
uses: actions/[email protected] | |
if: failure() | |
with: | |
name: cata_test | |
path: tests/cata_test | |
if-no-files-found: ignore |