18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-12-01 22:07:55 +01:00
Commit Graph

11 Commits

Author SHA1 Message Date
jerrrrycho 8038e4df37 Merge staging into build/ci-compiler-cache-master
# Conflicts:
#	.github/workflows/build.yml
#	.github/workflows/build_bin.yml
2026-11-29 11:46:35 +01:00
jerrrrycho fe6d3a1d18 ci: build the binaries once per commit, and not for docs or scenario tests
A pull request from a branch of this repository no longer builds the binaries: the
push run of that branch builds the same commit and publishes its download, and the
merge with the base is compiled by the Build and Coverage workflows. A pull request
from a fork has no push run here and builds both variants as before. A push that
changes only *.md, docs/, LICENSE or tests/scenarios/ builds nothing either (new
branches are compared with staging, then master); pushes to staging and master
and manual runs always build, and so does anything the check can't decide.

The decision is a job (`changes`) the build jobs need, so a skipped build counts as
passed. With the pull request builds gone, the AVX2-only matrix of a same-repository
pull request is no longer needed and both jobs list their two variants again.
Coverage skips tests/scenarios/ as well.
2026-11-29 10:23:04 +01:00
Hirek 0ce190eab2 fix: the review of the renderers PR: physics switches off by default, crashes on exit and at start, renderer, shader and editor fixes 2026-11-27 09:15:11 +01:00
jerrrrycho 92bd7066d4 ci: cache the apt packages of the Linux jobs, install only the X11 headers GLFW needs (#497)
* ci: cache the apt packages of the Linux jobs, install only the X11 headers GLFW needs

The "Install Linux dependencies" step timed out after 15 minutes in many runs: the
runners' Ubuntu mirror delivered about 150 kB/s, with 30 s stalls on single files,
and the step downloaded 136 packages (32.4 MB) every time.

- a local action, .github/actions/apt-install, keeps the downloaded .deb files in the
  Actions cache, keyed by the runner image and the package list. With the same image
  and list it installs the cached files without apt-get update and without the
  mirror; otherwise it runs apt-get update and downloads only what the cache lacks
- --no-install-recommends, and Acquire::Languages "none" for apt-get update
- xorg-dev (about 45 packages nothing used) is replaced by the X11 headers GLFW 3.4
  checks for: libx11-dev, libxcursor-dev, libxext-dev, libxi-dev, libxinerama-dev,
  libxrandr-dev; pkg-config is listed, as it is only a recommendation of libsndfile1-dev
- Build, Build binaries and Coverage use it; Coverage gets the 15-minute step timeout
  and the apt retries too
- Dependabot also updates the actions pinned in .github/actions

* ci: a repaired apt cache is saved under a key of its own run, and the newest one is restored
2026-11-25 05:41:39 +01:00
jerrrrycho b9e5ec51a8 ci: ccache through the precompiled header, both variants for forks, renamed files counted
- ccache caches the files built with the precompiled header (stdafx.h) only with
  CCACHE_SLOPPINESS pch_defines,time_macros (plus the include file times); without
  it every such file was compiled in full while the cache was still restored and saved
- a pull request from a fork has no push run here, so it builds the variant without
  AVX2 too; a branch of this repository still builds only the AVX2 one
- the docs-only check also counts the old name of a renamed file, so moving code
  out to docs/ or a .md name doesn't skip the coverage build
- no fallback to the cache of another GCC, which ccache can't use

Review of maj00r on #434.
2026-11-22 19:17:59 +01:00
jerrrrycho dc4fbb56f4 ci: skip the coverage build for documentation-only pull requests 2026-11-21 04:03:32 +01:00
jerrrrycho e64546385b ci: pin actions/checkout in the Coverage workflow to v6.1.0, as in build_bin.yml 2026-11-11 14:26:41 +01:00
jerrrrycho 666153473b ci: install gcovr from wheels only
SonarQube Cloud failed the quality gate of the pull request on this line (githubactions:S8541, a new vulnerability): without --only-binary :all: pip may run the setup script of a source package. gcovr 8.3 and its five dependencies all have wheels for Python 3.14 on Linux, as the first two runs show.
2026-11-11 11:33:12 +01:00
jerrrrycho c008d0cdca ci: fail the coverage report step when gcovr fails
The step pipes gcovr into tee, and the default shell of a run step has no pipefail: an error of gcovr after it printed the totals would have left the step green with an incomplete report.
2026-11-11 11:03:09 +01:00
jerrrrycho 4533fafd93 ci: leave yaml-cpp out of the coverage report
The first run of the Coverage workflow listed 66 files of betterRenderer/thirdparty/yaml-cpp, all at 0%: the library is linked by every target of the game, so it's built with the coverage flags as well. They made up 4388 of the 16592 lines and took the total from 84.4% to 62.1%. betterRenderer/ is excluded as it is in sonar-project.properties.
2026-11-11 11:02:59 +01:00
jerrrrycho c01007b9dd ci: measure the coverage of the core library by the unit tests
A new Coverage workflow builds the unit tests with GCC and gcov (unoptimised, the tests and the core library only), runs them and reports with gcovr: the totals and the per-file table in the summary of the run, the HTML report and the SonarQube generic coverage file in the unit-test-coverage artifact.

The report isn't sent to SonarQube Cloud. The project's quality gate (Sonar way) fails a pull request whose new code is covered in less than 80%; that condition isn't evaluated today because sonar-project.properties excludes every file from coverage, and sending the report would turn it on.
2026-11-11 10:49:03 +01:00