Files
evol-testbed/.gitea/actions/setup-build-env/README.md
T
mo7sen 62cfb45fe1
build / linux (push) Failing after 0s
Add setup build environment action
2026-05-02 17:52:25 +03:00

2.5 KiB

setup-build-env Gitea Action

Reusable Gitea/GitHub-compatible composite action for Debian/Ubuntu runners. It installs:

  • Clang/LLVM, default 22
  • Meson, installed in an isolated Python virtual environment to avoid PEP 668 externally-managed-environment errors
  • Ninja
  • Python 3, pip, venv
  • Vulkan development tooling / SDK packages

Local use inside a repository

Put this directory at:

.gitea/actions/setup-build-env

Then use it from a workflow:

name: build

on:
  push:
  pull_request:

jobs:
  linux:
    runs-on: ubuntu-latest
    container:
      image: debian:trixie

    steps:
      - uses: actions/checkout@v4

      - uses: ./.gitea/actions/setup-build-env
        with:
          llvm-version: "22"
          vulkan-source: apt

      - run: |
          meson setup build --native-file build_options/meson-clang-linux
          meson compile -C build

Use from a shared action repository

Create a dedicated repository, for example:

gitea.example.com/actions/setup-build-env

Put action.yml, scripts/setup.sh, and this README at the root of that repository. Then tag it:

git tag v1
git push origin v1

Use it from all projects:

- uses: actions/setup-build-env@v1

or with your full Gitea owner/repo path, depending on your Gitea Actions configuration:

- uses: your-org/setup-build-env@v1

Inputs

Input Default Description
llvm-version 22 LLVM/Clang major version. Installs packages like clang-22, lld-22, llvm-22-dev.
meson-version latest Meson version installed into /opt/meson-venv. Use e.g. 1.6.1 to pin.
install-vulkan true Install Vulkan packages.
vulkan-source apt apt for distro packages, or lunarg for the LunarG apt repository.
lunarg-sdk-version 1.4.309.0 LunarG SDK version used when vulkan-source: lunarg.
make-default true Makes clang, clang++, lld, etc point at the selected LLVM version through update-alternatives.

Notes

  • This action assumes an apt-based Debian/Ubuntu runner/container.
  • If your runner is not root, it needs passwordless sudo.
  • vulkan-source: apt is recommended for CI because it is the most robust across Debian/Ubuntu images.
  • vulkan-source: lunarg is best used on Ubuntu images supported by LunarG.
  • Because this installs system packages, caching the entire result is normally done at the runner/container-image level. For faster builds, consider creating your own Docker image from the commands in scripts/setup.sh.