updated Serbian translation credits #1355
This file contains hidden or 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: CI | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| workflow_dispatch: | |
| jobs: | |
| checks: # checks that don't need a wesnoth binary | |
| runs-on: ubuntu-latest | |
| container: | |
| image: wesnoth/wesnoth:2404-sdl3 | |
| options: --tty # docker create options | |
| env: | |
| CLICOLOR_FORCE: 1 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set git safe directory | |
| if: success() || failure() | |
| run: | | |
| git config --global --add safe.directory '*' | |
| - name: Check for invalid characters | |
| if: success() || failure() | |
| run: | | |
| ./utils/CI/check_utf8.sh | |
| ./utils/CI/utf8_bom_dog.sh | |
| - name: Run wmllint | |
| if: success() || failure() | |
| run: | | |
| ./data/tools/wmllint --config=./data/tools/lint.toml ./data > ./wmllint.log 2>&1 | |
| if [ "$(wc -l < wmllint.log)" != "0" ]; then cat wmllint.log; exit 1; fi | |
| - name: Whitespace and WML indentation check | |
| if: success() || failure() | |
| run: ./utils/CI/fix_whitespace.sh && git status && git diff --exit-code | |
| - name: WML missing images check | |
| if: success() || failure() | |
| run: utils/CI/check_wml_images.sh | |
| - name: Run luacheck | |
| if: success() || failure() | |
| run: luacheck . | |
| - name: Doxygen check | |
| if: success() || failure() | |
| run: doxygen doc/doxygen/Doxyfile | |
| copyright: # check takes a bit longer and does not need to run in docker (sound/music only) | |
| runs-on: ubuntu-slim | |
| steps: | |
| - { uses: actions/checkout@v6, with: { fetch-depth: 50 } } | |
| - name: Sound/Music copyright check | |
| run: ./update_copyrights | |
| ubuntu: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| # the check for WML tests below may need to be adjusted if configurations are changed | |
| - { cfg: debug, tool: scons, cc: gcc, cxx: g++, std: 17, lto: false, sys_lua: false } | |
| - { cfg: release, tool: cmake, cc: gcc, cxx: g++, std: 20, lto: true, sys_lua: false } | |
| - { cfg: release, tool: cmake, cc: clang, cxx: clang++, std: 17, lto: true, sys_lua: true } | |
| runs-on: ubuntu-latest | |
| container: | |
| image: wesnoth/wesnoth:2404-sdl3 | |
| options: --tty # docker create options | |
| env: | |
| TOOL: ${{ matrix.tool }} | |
| CFG: ${{ matrix.cfg }} | |
| CC: ${{ matrix.cc }} | |
| CXX: ${{ matrix.cxx }} | |
| CXX_STD: ${{ matrix.std }} | |
| LTO: ${{ matrix.lto }} | |
| SYS_LUA: ${{ matrix.sys_lua }} | |
| CLICOLOR_FORCE: 1 | |
| SDL_VIDEODRIVER: dummy | |
| steps: | |
| - { uses: actions/checkout@v6, with: { submodules: "recursive" } } | |
| # 1) wesnothd and campaignd should be buildable without SDL3 being present | |
| # 2) boost is installed via apt as well as built and installed into /usr/local (for _GLIBCXX_DEBUG support in boost program options) | |
| - name: Build wesnoth, wesnothd, campaignd and unit tests | |
| id: build # needed to check step outcome | |
| run: | | |
| case $TOOL in | |
| scons) | |
| build() { | |
| ldconfig | |
| scons "$@" build="$CFG" ctool="$CC" cxxtool="$CXX" cxx_std="$CXX_STD" \ | |
| extra_flags_config="-pipe" forum_user_handler=true strict=true \ | |
| nls=false enable_lto="$LTO" system_lua="$SYS_LUA" force_color=true \ | |
| jobs=2 --debug=time glibcxx_debug=true glibcxx_assertions=true compile_db=true | |
| } | |
| build wesnoth boost_unit_tests | |
| build cdb | |
| # disable all warnings since we have coverage on them in a standard build, and clang-tidy | |
| # triggers false positive compiler warnings that clang itself won't | |
| run-clang-tidy -quiet -use-color -j 2 -extra-arg="-w" -warnings-as-errors='*' '^(?!.*src/modules/|.*build/)' | |
| # re-enable once libsdl3 etc is installed normally | |
| #apt remove -y -qq libsdl3-dev libsdl3-image-dev libsdl3-mixer-dev | |
| build wesnothd campaignd | |
| ;; | |
| cmake) | |
| build() { | |
| ldconfig | |
| cmake "$@" -DCMAKE_BUILD_TYPE="$CFG" -DCXX_STD="$CXX_STD" \ | |
| -DEXTRA_FLAGS_CONFIG="-pipe" -DENABLE_MYSQL=true -DENABLE_STRICT_COMPILATION=true \ | |
| -DENABLE_NLS=false -DENABLE_LTO="$LTO" -DFORCE_COLOR_OUTPUT=true -DLTO_JOBS=2 \ | |
| -DENABLE_SYSTEM_LUA="$SYS_LUA -DCLANG_TIDY=true" -DCMAKE_PREFIX_PATH="/usr/local/lib/cmake/SDL3;/usr/local/lib/cmake/SDL3_image;/usr/local/lib/cmake/SDL3_mixer" -S . -B . | |
| } | |
| # still need the rest of /usr/local/lib/cmake for SDL3 for now | |
| rm -R /usr/local/lib/cmake/boost* | |
| rm -R /usr/local/lib/cmake/Boost* | |
| rm /usr/local/lib/libboost* | |
| rm -R /usr/local/include/boost | |
| build -DENABLE_GAME=true -DENABLE_SERVER=false -DENABLE_CAMPAIGN_SERVER=false -DENABLE_TESTS=true | |
| make -C . VERBOSE=1 -j2 | |
| #apt remove -y -qq libsdl3-dev libsdl3-image-dev libsdl3-mixer-dev | |
| build -DENABLE_GAME=false -DENABLE_SERVER=true -DENABLE_CAMPAIGN_SERVER=true -DENABLE_TESTS=false | |
| make -C . VERBOSE=1 -j2 | |
| ;; | |
| esac | |
| - name: Check path options | |
| if: success() || steps.build.outcome == 'success' | |
| run: | | |
| ./wesnoth --version | |
| for opt in data userdata usercache | |
| do | |
| output=$(./wesnoth --nobanner --"$opt"-path) | |
| if [ "$output" = "" ]; then printf 'option --%s-path prints nothing to stdout!\n' "$opt" >&2; exit 1; fi | |
| printf '%s-path: %s\n' "$opt" "$output" | |
| done | |
| - name: WML validation | |
| # only run on release builds (takes ~10 times as long on debug); since there are multiple release builds | |
| # but running the following tests multiple times doesn't make much sense use cc==clang as the check | |
| if: matrix.cc == 'clang' && (success() || steps.build.outcome == 'success') | |
| run: ./utils/CI/schema_validation.sh | |
| - name: Run WML tests | |
| # only run on release builds (takes ~6 times as long on debug) | |
| if: matrix.cc == 'clang' && (success() || steps.build.outcome == 'success') | |
| run: ./run_wml_tests -v -v -g -c -t 20 -bt 1000 -a=--userdata-dir=ud | |
| - name: Upload userdata files from WML unit tests (logs, replays) | |
| if: matrix.cc == 'clang' && (success() || failure()) | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: WMLTest-userdata-Linux | |
| path: ud | |
| - name: Run play tests | |
| if: success() || steps.build.outcome == 'success' | |
| run: ./utils/CI/play_test_executor.sh | |
| - name: Run MP tests | |
| if: success() || steps.build.outcome == 'success' | |
| run: ./utils/CI/mp_test_executor.sh | |
| - name: Run unit tests | |
| if: matrix.cc == 'clang' && (success() || steps.build.outcome == 'success') | |
| run: ./run_boost_tests | |
| steam-runtime: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - { uses: actions/checkout@v6, with: { submodules: "recursive" } } | |
| - name: Steam Runtime | |
| run: | | |
| version=$(sed -n 's/#define VERSION "\(.*\)"/\1/p' src/wesconfig.h) | |
| cd utils/dockerbuilds && ./make_steam_build | |
| tar -cf "steambuild-$version.tar" steambuild | |
| - name: Upload | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: Steam-Linux | |
| path: utils/dockerbuilds/steambuild-*.tar | |
| mingw: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - { uses: actions/checkout@v6, with: { submodules: "recursive" } } | |
| - name: MinGW Crosscompile | |
| run: | | |
| version=$(sed -n 's/#define VERSION "\(.*\)"/\1/p' src/wesconfig.h) | |
| git archive --format=tar HEAD > "wesnoth-$version.tar" | |
| tar -rf "wesnoth-$version.tar" src/modules/ | |
| bzip2 "wesnoth-$version.tar" | |
| cd utils/dockerbuilds && ./make_mingw_build | |
| mv mingwbuild/wesnoth*-win64.exe "wesnoth-$version-win64.exe" | |
| - name: Upload Source | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: Source | |
| path: wesnoth-*.tar.bz2 | |
| archive: false | |
| - name: Upload Windows-Installer | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: Windows-Installer | |
| path: utils/dockerbuilds/wesnoth-*-win64.exe | |
| flatpak: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: wesnoth/wesnoth:flatpak-sdl3 | |
| options: --tty --cap-add=ALL --privileged # docker create options | |
| steps: | |
| - { uses: actions/checkout@v6, with: { submodules: "recursive" } } | |
| - name: Flatpak | |
| run: | | |
| # write to an ignored filename so the build is not marked as modified | |
| jq '.modules |= map(if .name == "wesnoth" then ."build-commands"[0]+=" appdata_filepath=org.wesnoth.Wesnoth.appdata.xml" | .sources[0]={type:"dir",path:"."} else . end)' packaging/flatpak/org.wesnoth.Wesnoth.json > wesnoth-manifest.json | |
| git config --global --add safe.directory "$PWD" | |
| branch=ci-$(git log -n 1 --format=%h) | |
| version=$(sed -n 's/#define VERSION "\(.*\)"/\1/p' src/wesconfig.h) | |
| date=$(TZ=UTC0 git log -1 --date=iso-local --format=%cd) | |
| cp packaging/org.wesnoth.Wesnoth.appdata.xml . | |
| # add release info so the flatpak shows the version | |
| utils/update_appdata "$version" org.wesnoth.Wesnoth.appdata.xml "$date" | |
| flatpak-builder --force-clean --disable-rofiles-fuse --jobs=2 wesnoth-app wesnoth-manifest.json | |
| flatpak build-export export-repo wesnoth-app "$branch" | |
| flatpak build-bundle --runtime-repo=https://flathub.org/repo/flathub.flatpakrepo export-repo wesnoth.flatpak org.wesnoth.Wesnoth "$branch" | |
| - name: Upload flatpak bundle | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: Flatpak-Bundle | |
| path: wesnoth.flatpak | |
| translations: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: wesnoth/wesnoth:2404-sdl3 | |
| env: | |
| LANGUAGE: en_US.UTF-8 | |
| LANG: en_US.UTF-8 | |
| LC_ALL: en_US.UTF-8 | |
| CLICOLOR_FORCE: 1 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: "recursive" | |
| - name: Translations | |
| run: | | |
| cmake -DENABLE_NLS=true -DENABLE_GAME=false -DENABLE_SERVER=false -DENABLE_CAMPAIGN_SERVER=false -DENABLE_TESTS=false -DENABLE_POT_UPDATE_TARGET=TRUE . | |
| make update-po4a-man; echo "Ran make update-po4a-man" | |
| make update-po4a-manual; echo "Ran make update-po4a-manual" | |
| make pot-update; echo "Ran make pot-update" | |
| make mo-update; echo "Ran make mo-update" | |
| make clean | |
| scons translations build=release --debug=time nls=true jobs=2; echo "Ran scons translations" | |
| scons pot-update; echo "Ran scons pot-update" | |
| scons update-po4a; echo "Ran scons update-po4a" | |
| scons manual | |
| macos-intel: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| cfg: [ Release ] | |
| runs-on: macos-14 | |
| env: | |
| CFG: ${{ matrix.cfg }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: "recursive" | |
| - name: Get dependencies | |
| run: | | |
| HOMEBREW_NO_AUTO_UPDATE=1 brew install autoconf autoconf-archive automake cmake libtool scons | |
| ./projectfiles/Xcode/macos/build_macos_deps | |
| - name: Build translations | |
| run: scons translations build=release --debug=time nls=true jobs=2 | |
| - name: Build wesnoth, wesnothd, campaignd and unit tests | |
| working-directory: projectfiles/Xcode | |
| run: | | |
| xcodebuild ARCHS=x86_64 -project "The Battle for Wesnoth.xcodeproj" -configuration "$CFG" -target "The Battle for Wesnoth" -target "unit_tests" -target wesnothd -target campaignd | |
| # xcodebuild or maybe clang do not appear to fail properly when input files cannot be found; double check executables were produced | |
| [ -x "build/$CFG/The Battle for Wesnoth.app" ] || { printf 'Failed to build wesnoth executable!\n' >&2; exit 1; } | |
| [ -x "build/$CFG/wesnothd" ] || { printf 'Failed to build wesnothd executable!\n' >&2; exit 1; } | |
| [ -x "build/$CFG/campaignd" ] || { printf 'Failed to build campaignd executable!\n' >&2; exit 1; } | |
| [ -x "build/$CFG/unit_tests" ] || { printf 'Failed to build unit test executable!\n' >&2; exit 1; } | |
| - name: Create disk image | |
| working-directory: projectfiles/Xcode | |
| continue-on-error: true # allow failures since this is not essential and it does fail spuriously (hdiutil: create failed - Resource busy) | |
| run: hdiutil create -volname "Wesnoth_$CFG" -fs 'HFS+' -srcfolder "build/$CFG" -ov -format UDBZ "Wesnoth_${CFG}.dmg" | |
| - name: Upload disk image | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: MacOS ${{ matrix.cfg }} disk image | |
| path: projectfiles/Xcode/Wesnoth_${{ matrix.cfg }}.dmg | |
| - name: Run WML tests | |
| if: matrix.cfg == 'Release' | |
| run: | | |
| "projectfiles/Xcode/build/$CFG/The Battle for Wesnoth.app/Contents/MacOS/The Battle for Wesnoth" --userdata-dir="$PWD/ud" -u test_return | |
| ./run_wml_tests -g -c -t 30 -bt 350 -p "projectfiles/Xcode/build/$CFG/The Battle for Wesnoth.app/Contents/MacOS/The Battle for Wesnoth" -a=--userdata-dir="$PWD/ud" | |
| - name: Upload userdata files from WML unit tests (logs, replays) | |
| if: matrix.cfg == 'Release' && (success() || failure()) | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: WMLTest-userdata-MacOS | |
| path: ud | |
| - name: Run unit tests | |
| run: ./run_boost_tests --path=projectfiles/Xcode/build/"$CFG" --executable=unit_tests | |
| windows: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| cfg: [Release] | |
| env: | |
| CFG: ${{ matrix.cfg }} | |
| VCPKG_FEATURE_FLAGS: dependencygraph | |
| permissions: | |
| contents: write # for dependency graph | |
| defaults: | |
| run: | |
| shell: cmd | |
| runs-on: windows-latest | |
| steps: | |
| - { uses: actions/checkout@v6, with: { submodules: "recursive" } } | |
| - name: Make version of the runner image (https://github.com/actions/runner-images/releases) accessible to expression | |
| run: echo IMAGE_VERSION=%ImageVersion%>> %GITHUB_ENV% | |
| - name: Cache object files | |
| id: windows-cache | |
| uses: actions/cache@v5 | |
| with: | |
| path: vcpkg_installed # vcpkg generates this dir next to vcpkg.json | |
| # the final key part needs to be changed if anything in the build process changes that is not already included here | |
| key: win-cache-master-${{ matrix.cfg }}-${{ env.IMAGE_VERSION }}-${{ hashFiles('vcpkg.json') }}-0001 | |
| - name: Add msbuild to PATH | |
| uses: microsoft/setup-msbuild@v3 | |
| - name: Run cmake | |
| run: cmake -DCMAKE_BUILD_TYPE=%CFG% -DENABLE_GAME=true -DENABLE_SERVER=true -DENABLE_CAMPAIGN_SERVER=true | |
| -DENABLE_TESTS=true -DENABLE_MYSQL=false -DENABLE_NLS=false | |
| -DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake -DVCPKG_INSTALL_OPTIONS=--debug | |
| -DVCPKG_TARGET_TRIPLET=x64-windows -DCMAKE_GENERATOR_PLATFORM=x64 -G "Visual Studio 18 2026" . | |
| - name: Build wesnoth, wesnothd, campaignd and unit tests | |
| run: MSBuild.exe wesnoth.slnx -p:Configuration=%CFG% | |
| - name: Run WML unit tests | |
| if: matrix.cfg == 'Release' | |
| run: python run_wml_tests -v -g -c -t 20 -p %CFG%/wesnoth.exe -a=--userdata-dir=ud | |
| - name: Upload userdata files from WML unit tests (logs, replays) | |
| if: matrix.cfg == 'Release' && (success() || failure()) | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: WMLTest-userdata-Windows | |
| path: ud | |
| # run after all other jobs have completed to check overall build status | |
| notification: | |
| runs-on: ubuntu-slim | |
| needs: [checks, copyright, ubuntu, steam-runtime, mingw, flatpak, translations, macos-intel, windows] | |
| if: failure() && github.event_name == 'push' | |
| steps: | |
| - name: Discord Notification | |
| uses: rjstone/discord-webhook-notify@v2 | |
| with: | |
| severity: error | |
| webhookUrl: ${{ secrets.DISCORD_CI_WEBHOOK }} | |
| description: |- | |
| pusher: ${{ github.actor }} | |
| commit: ${{ github.event.head_commit.message }} | |
| commit url: ${{ github.event.head_commit.url }} | |
| - name: Prepare message | |
| if: github.event_name == 'push' | |
| env: | |
| MSG: ${{ github.event.head_commit.message }} | |
| run: | | |
| printf COMMIT_SUBJECT=%s "${MSG}" | head -n 1 >> "$GITHUB_ENV" | |
| - name: IRC Notification | |
| uses: rectalogic/notify-irc@v1 | |
| with: | |
| channel: ${{ vars.IRC_CHANNEL }} | |
| server: ${{ vars.IRC_SERVER }} | |
| nickname: ${{ vars.IRC_NICK }} # is also used for sasl username | |
| sasl_password: ${{ secrets.IRC_SASL_PASSWORD }} | |
| message: "❌ ${{ github.workflow }} workflow run ${{ github.run_number }} failed on \x0306${{ github.ref_name }}\x0F: ${{ env.COMMIT_SUBJECT }} by \x0315${{ github.actor }}\x0F: \x0302${{ github.event.head_commit.url }}\x0F" |