mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-08 11:03:25 -08:00
* pin used actions plus some reordering and harmonization across files * [CI] Link the version string and RNG stub into the test targets The distribution libgtest.a now used by the Linux images makes the linker pull more translation units out of libcockatrice_network than the fetched googletest did. Those units reference VERSION_STRING and the global rng, which several test targets never defined, so the instrumented Ubuntu 26.04 legs failed at link: undefined reference to `VERSION_STRING' undefined reference to `rng' Add the generated version string source wherever a test links the network umbrella, and define the rng stub in the tests that pull the server game classes without declaring it. This matches what the neighbouring server tests already do. A full Debug build and ctest suite in the ci-ubuntu2604 image (system libgtest.a) is green: 841 tests pass. Fixes the nightly failures introduced by #6894. --------- Co-authored-by: Lukas Brübach <44814898+BruebachL@users.noreply.github.com>
74 lines
3 KiB
YAML
74 lines
3 KiB
YAML
name: Update Translations
|
|
|
|
permissions:
|
|
contents: write
|
|
pull-requests: write
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- '.tx/**'
|
|
- '.github/workflows/translations-pull.yml'
|
|
schedule:
|
|
# Runs in the middle of each month starting a quarter (UTC) = two weeks after new strings are built
|
|
- cron: '0 0 15 1,4,7,10 *'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
translations:
|
|
name: "Pull languages"
|
|
# Do not run the scheduled workflow on forks
|
|
if: github.event_name != 'schedule' || github.repository_owner == 'Cockatrice'
|
|
runs-on: ubuntu-slim # https://github.com/actions/runner-images/blob/main/images/ubuntu-slim/ubuntu-slim-Readme.md
|
|
|
|
steps:
|
|
- name: "Checkout repo"
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
|
|
- name: "Pull translated strings from Transifex"
|
|
# Do not run this step for PR's from forks, they don't have access to the secret
|
|
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false
|
|
uses: transifex/cli-action@584fd205cbe598773b5a81ce711fa44842678189 # v2
|
|
with:
|
|
# Used config file: https://github.com/Cockatrice/Cockatrice/blob/master/.tx/config
|
|
# Docs: https://github.com/transifex/cli#pulling-files-from-transifex
|
|
args: pull --force --all
|
|
token: ${{ secrets.TX_TOKEN }}
|
|
|
|
- name: "Create pull request"
|
|
if: github.event_name != 'pull_request'
|
|
id: create_pr
|
|
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
|
|
with:
|
|
add-paths: |
|
|
cockatrice/translations/*.ts
|
|
oracle/translations/*.ts
|
|
author: github-actions <github-actions@github.com> # owner of the commit
|
|
body: |
|
|
Pulled all translated strings from [Transifex][1].
|
|
|
|
---
|
|
*This PR is automatically generated and updated by the workflow at `.github/workflows/translations-pull.yml`. Review [action runs][2].*<br>
|
|
*After merging, all new languages and translations are available in the next build.*
|
|
|
|
[1]: https://explore.transifex.com/cockatrice/cockatrice/
|
|
[2]: https://github.com/Cockatrice/Cockatrice/actions/workflows/translations-pull.yml?query=branch%3Amaster
|
|
branch: ci-update_translations
|
|
commit-message: Update translation files
|
|
delete-branch: true
|
|
draft: false
|
|
labels: |
|
|
CI
|
|
Translation
|
|
title: 'Update translations'
|
|
|
|
- name: "PR Status"
|
|
if: github.event_name != 'pull_request'
|
|
shell: bash
|
|
env:
|
|
PR_NUMBER: ${{ steps.create_pr.outputs.pull-request-number }}
|
|
PR_URL: ${{ steps.create_pr.outputs.pull-request-url }}
|
|
STATUS: ${{ case(steps.create_pr.outputs.pull-request-operation == 'none', 'unchanged', steps.create_pr.outputs.pull-request-operation) }}
|
|
run: |
|
|
echo "PR #$PR_NUMBER $STATUS!" >> "$GITHUB_STEP_SUMMARY"
|
|
echo "URL: $PR_URL" >> "$GITHUB_STEP_SUMMARY"
|