18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-20 03:24:58 +01:00
Commit Graph

31 Commits

Author SHA1 Message Date
maj00r
348a814ce2 fix(ci): the no-AVX2 Windows build has its own concurrency group and its own public download
After master was merged the two Windows variants shared one concurrency group with
cancel-in-progress, so one cancelled the other, and the publish job looked for an artifact
name the matrix no longer produces. Each variant now has its own group, the publish job
downloads both, and the release carries maszyna-windows-x64.zip (AVX2, the old name, so the
links already handed out still work) and maszyna-windows-x64-noavx2.zip. The AVX2 variant
passes -DENABLE_AVX2=ON explicitly instead of an empty flag.
2026-11-15 21:18:22 +01:00
maj00r
6ffbc0a6f6 Merge master into feature/no-avx-build 2026-11-15 21:16:45 +01:00
maj00r
73d535f73e fix(ci): build OpenAL Soft with the PipeWire, PulseAudio and ALSA backends, so the Linux game has sound
The Linux job builds OpenAL Soft 1.24.2 from source, but the runner had none of the headers of its
audio backends, and OpenAL Soft's CMake leaves out every backend it can't find. The bundled
libopenal.so.1 had only OSS, Null, Wave and Loopback. Modern distributions and the Steam Linux
Runtime have no /dev/dsp, so the game logged "Failed to obtain audio device" and played nothing,
with any Steam Linux Runtime and without one.

- install libasound2-dev, libpulse-dev and libpipewire-0.3-dev before building OpenAL Soft
- configure it with ALSOFT_REQUIRE_PIPEWIRE/PULSEAUDIO/ALSA, so a missing header fails the build
  instead of shipping a library without sound

The backends are loaded with dlopen at run time (ALSOFT_DLOPEN is on by default), so the bundled
library gains no new dependency. Tested by putting an OpenAL Soft 1.24.2 with these backends next to
the game from the Steam depot: under Steam Linux Runtime 4.0 the sound works.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 20:58:04 +01:00
maj00r
59a9df6aa3 fix(ci): build the Linux game with libcurl, so the editor can download maps
The Linux job never installed libcurl's headers, so find_package(CURL QUIET)
missed it and the game was built without EU07_WITH_CURL: the editor showed
"no http client in this build" instead of the orthophoto, the terrain model
and the topo map. bundle_runtime_libs.cmake copies libcurl and its
dependencies next to the game with the other bundled libraries.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 20:59:16 +01:00
maj00r
c2ea47648b Merge pull request #325 from MaSzyna-EU07/feat/ci-unit-test-coverage
CI: coverage of the core library by the unit tests
2026-11-11 22:25:27 +01:00
34991dbe11 apt timeout and retry (#329) 2026-11-11 21:08:59 +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
jerrrrycho
c2db969bd1 ci: point from the linux job to the note on the concurrency groups 2026-11-11 10:17:36 +01:00
jerrrrycho
963791e3f3 ci: cancel the builds of a commit superseded by a newer push
A push to a pull request or to a branch started new runs of the Build and Build binaries workflows while the runs for the older commit went on to the end, holding the runners for results nobody needs.

The Build workflow now has a concurrency group per pull request, and the build jobs of Build binaries one per branch or pull request, with cancel-in-progress: the run for the older commit is cancelled when a newer one starts. Pushes to master get a group of their own (the commit), so the runs on master are neither cancelled nor held back by one another. In Build binaries the groups are on the build jobs, not on the workflow, so a publish job already running is left to finish.

sonar.yml needs no change: it already posts an error status (analysis skipped) on the commit of a cancelled Build run, and the newer commit gets its own pending status and analysis.
2026-11-11 10:16:23 +01:00
5764e942a7 build(linux): load the shared libraries from the game folder and ship them in the build (#320) 2026-11-11 04:29:36 +01:00
b3e6e02779 ci(windows): build lua51.dll for the unit tests 2026-11-11 00:34:59 +01:00
pwarszawski
eb75089ba2 Python screens: ship Pillow with the Windows build, and the screen module for Pillow 10+
- The Windows build job installs Pillow into the Python 3.14 whose Lib, with
  site-packages, CMake copies next to the executable as python64\Lib, as the
  Linux job already does; the README says the same for a local build.
- Both build jobs copy staticFiles/python/local (the Python 3 version of the
  module every cab screen subclasses) into python/local of the build.
- The module puts back what Pillow 10 removed and the screen scripts use:
  ImageFont.getsize() and ImageDraw.textsize() on top of getbbox() /
  textbbox(), and Image.ANTIALIAS as LANCZOS. With an older Pillow nothing
  changes.

Part of #300.
2026-11-08 21:12:35 +01:00
917c8f7285 Merge branch 'master' into feat/modern-editor 2026-10-08 17:44:58 +02:00
maj00r
f5d328c3a5 ci: translations of lang/ packaged with the builds; each push of a branch publishes its Windows and Linux builds as the rolling pre-release build-<branch>, downloadable without a GitHub account and removed along with the branch 2026-10-06 22:19:12 +02:00
jerrrrycho
79bd0c8e91 fix(sonar): addressing reliability/security issues (#202) 2026-10-04 20:00:13 +02:00
jerrrrycho
4137f5504a fix: sonar sast fixes - sonar.yml, nosonar, linux chmod modification 2026-09-28 21:07:53 +02:00
maj00r
2acc8213ef Enhance Windows build matrix with AVX2 variants 2026-09-20 15:14:36 +02:00
6b50a6aa68 Update CI configuration for Windows and Linux builds 2026-08-19 14:23:40 +02:00
1cfe44a9d3 Add Linux Python environment setup in workflow
Added a step to prepare a Linux Python environment with a virtual environment and install Pillow.
2026-08-19 14:07:30 +02:00
fee2dcea28 Fix path for vswhere.exe in build_bin.yml 2026-08-19 13:20:53 +02:00
af08beaaa8 Change push branch filter to include all branches 2026-08-19 13:17:00 +02:00
518ac093ac Rename workflow from 'Build' to 'Build binaries' 2026-08-19 13:15:29 +02:00
9d1a8244ed Add GitHub Actions workflow for building binaries 2026-08-19 13:14:53 +02:00
jerrrrycho
8fbdf21ab8 ci: remove potential script injection (#145) 2026-07-19 14:36:09 +02:00
jerrrrycho
f3881a2432 ci: create an individual check for sonar workflow in pull requests (#144) 2026-07-19 12:04:57 +02:00
jerrrrycho
44113e84de ci: fix sast from forked repos (#142) 2026-07-19 10:22:51 +02:00
jerrrrycho
9cfbbc567e ci: create github actions for sonarqube 2026-07-11 13:44:30 +02:00