mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-08 11:03:25 -08:00
[CI] Pin used GH Actions (#7716)
* 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>
This commit is contained in:
parent
1ca67ebb0f
commit
aa0c8dc7cb
13 changed files with 107 additions and 73 deletions
13
.github/dependabot.yml
vendored
13
.github/dependabot.yml
vendored
|
|
@ -15,8 +15,11 @@ updates:
|
|||
# Check for updates once a month
|
||||
schedule:
|
||||
interval: "monthly"
|
||||
# A new version is not considered for a version update until x days after its release (default = 3)
|
||||
cooldown:
|
||||
default-days: 3
|
||||
# Limit the amout of open PR's (default = 5, disabled = 0, security updates are not impacted)
|
||||
open-pull-requests-limit: 2
|
||||
open-pull-requests-limit: 3
|
||||
|
||||
# # Enable version updates for Docker
|
||||
# Not yet possible to bump from one LTS version to the next and skip others, see:
|
||||
|
|
@ -27,6 +30,9 @@ updates:
|
|||
# # Check for updates once a week
|
||||
# schedule:
|
||||
# interval: "weekly"
|
||||
# # A new version is not considered for a version update until x days after its release (default = 3)
|
||||
# cooldown:
|
||||
# default-days: 3
|
||||
# # Limit the amout of open PR's (default = 5, disabled = 0, security updates are not impacted)
|
||||
# open-pull-requests-limit: 1
|
||||
|
||||
|
|
@ -37,5 +43,8 @@ updates:
|
|||
# Check for updates to GitHub Actions once a week
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
# A new version is not considered for a version update until x days after its release (default = 3)
|
||||
cooldown:
|
||||
default-days: 3
|
||||
# Limit the amout of open PR's (default = 5, disabled = 0, security updates are not impacted)
|
||||
open-pull-requests-limit: 2
|
||||
open-pull-requests-limit: 5
|
||||
|
|
|
|||
6
.github/workflows/codeql.yml
vendored
6
.github/workflows/codeql.yml
vendored
|
|
@ -40,10 +40,10 @@ jobs:
|
|||
|
||||
steps:
|
||||
- name: "Checkout repository"
|
||||
uses: actions/checkout@v7
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
|
||||
- name: "Initialize CodeQL"
|
||||
uses: github/codeql-action/init@v4
|
||||
uses: github/codeql-action/init@33d7b85da1a04171e211befe2c739303b9a4c066 # v4.39.3
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
build-mode: ${{ matrix.build-mode }}
|
||||
|
|
@ -92,6 +92,6 @@ jobs:
|
|||
run: cmake --build build
|
||||
|
||||
- name: "Perform CodeQL Analysis"
|
||||
uses: github/codeql-action/analyze@v4
|
||||
uses: github/codeql-action/analyze@33d7b85da1a04171e211befe2c739303b9a4c066 # v4.39.3
|
||||
with:
|
||||
category: "/language:${{ matrix.language }}"
|
||||
|
|
|
|||
42
.github/workflows/desktop-build.yml
vendored
42
.github/workflows/desktop-build.yml
vendored
|
|
@ -91,7 +91,7 @@ jobs:
|
|||
|
||||
- name: "Checkout"
|
||||
if: steps.configure.outputs.tag != null
|
||||
uses: actions/checkout@v7
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
fetch-depth: 0 # fetch all history for all branches and tags
|
||||
|
||||
|
|
@ -150,7 +150,7 @@ jobs:
|
|||
runs-on: ubuntu-slim
|
||||
steps:
|
||||
- name: "Checkout"
|
||||
uses: actions/checkout@v7
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
|
||||
# vcpkg-tool reads versions/baseline.json out of the commit named by
|
||||
# `builtin-baseline`, through the `vcpkg` submodule's git history. A submodule
|
||||
|
|
@ -337,12 +337,12 @@ jobs:
|
|||
# Shared with build-linux-nightly so the two leg sets run the same steps.
|
||||
steps: &linux-steps
|
||||
- name: "Checkout"
|
||||
uses: actions/checkout@v7
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
|
||||
- name: "Restore compiler cache (ccache)"
|
||||
id: restore_ccache
|
||||
if: env.PERSIST_CCACHE == 'true'
|
||||
uses: actions/cache/restore@v6
|
||||
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
||||
with:
|
||||
key: ccache-${{ matrix.distro }}${{ matrix.version }}${{ matrix.variant }}
|
||||
path: ${{ env.CACHE }}/.ccache
|
||||
|
|
@ -389,7 +389,7 @@ jobs:
|
|||
|
||||
- name: "Upload coverage artifact"
|
||||
if: matrix.coverage == 'yes'
|
||||
uses: actions/upload-artifact@v7
|
||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
||||
with:
|
||||
name: coverage-report
|
||||
path: coverage/
|
||||
|
|
@ -507,7 +507,7 @@ jobs:
|
|||
|
||||
- name: "Save updated compiler cache (ccache)"
|
||||
if: github.ref == 'refs/heads/master' && env.PERSIST_CCACHE == 'true'
|
||||
uses: actions/cache/save@v6
|
||||
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
||||
with:
|
||||
key: ${{ steps.restore_ccache.outputs.cache-primary-key }}
|
||||
path: ${{ env.CACHE }}/.ccache
|
||||
|
|
@ -515,7 +515,7 @@ jobs:
|
|||
- name: "Upload artifact"
|
||||
id: upload_artifact
|
||||
if: matrix.package != 'skip'
|
||||
uses: actions/upload-artifact@v7
|
||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
||||
with:
|
||||
archive: false
|
||||
if-no-files-found: error
|
||||
|
|
@ -535,7 +535,7 @@ jobs:
|
|||
- name: "Attest binary provenance"
|
||||
id: attestation
|
||||
if: steps.upload_release.outcome == 'success'
|
||||
uses: actions/attest@v4
|
||||
uses: actions/attest@1e69f48acb82d1966a394da916b4c1698aa569d6 # v4.2.2
|
||||
with:
|
||||
show-summary: false
|
||||
subject-path: ${{ steps.build.outputs.path }}
|
||||
|
|
@ -749,13 +749,13 @@ jobs:
|
|||
# Shared with build-vcpkg-nightly so the two leg sets run the same steps.
|
||||
steps: &vcpkg-steps
|
||||
- name: "Checkout"
|
||||
uses: actions/checkout@v7
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: "[Windows] Add msbuild to PATH"
|
||||
if: matrix.os == 'Windows'
|
||||
uses: microsoft/setup-msbuild@v3
|
||||
uses: microsoft/setup-msbuild@30375c66a4eea26614e0d39710365f22f8b0af57 # v3.0.0
|
||||
with:
|
||||
msbuild-architecture: x64
|
||||
|
||||
|
|
@ -771,7 +771,7 @@ jobs:
|
|||
- name: "Restore compiler cache (ccache)"
|
||||
if: matrix.use_ccache == 1 && env.PERSIST_CCACHE == 'true'
|
||||
id: restore_ccache
|
||||
uses: actions/cache/restore@v6
|
||||
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
||||
with:
|
||||
key: ccache-${{ matrix.os }}${{ matrix.target }}
|
||||
path: ${{ env.CCACHE_DIR }}
|
||||
|
|
@ -800,7 +800,7 @@ jobs:
|
|||
- name: "[macOS] Restore thin Qt ${{ steps.resolve_qt_version.outputs.version }}"
|
||||
if: matrix.os == 'macOS'
|
||||
id: restore_qt
|
||||
uses: actions/cache/restore@v6
|
||||
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
||||
with:
|
||||
key: Qt-${{ steps.resolve_qt_version.outputs.version }}-macOS-${{ matrix.soc }}-${{ matrix.qt_modules }}-${{ env.QT_ARCHIVES }}-thin
|
||||
path: ${{ github.workspace }}/Qt
|
||||
|
|
@ -809,7 +809,7 @@ jobs:
|
|||
# Qt build using vcpkg either just fails or takes too long to build
|
||||
- name: "[macOS] Install fat Qt ${{ matrix.qt_version }}"
|
||||
if: matrix.os == 'macOS' && steps.restore_qt.outputs.cache-hit != 'true'
|
||||
uses: jurplel/install-qt-action@v4
|
||||
uses: jurplel/install-qt-action@b344308e4483fc892e0d27b3cd1b173ebdd95f06 # v4.5.0
|
||||
with:
|
||||
archives: ${{ env.QT_ARCHIVES }}
|
||||
cache: false
|
||||
|
|
@ -824,14 +824,14 @@ jobs:
|
|||
|
||||
- name: "[macOS] Cache thin Qt libraries"
|
||||
if: matrix.os == 'macOS' && steps.restore_qt.outputs.cache-hit != 'true' && github.ref == 'refs/heads/master'
|
||||
uses: actions/cache/save@v6
|
||||
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
||||
with:
|
||||
key: ${{ steps.restore_qt.outputs.cache-primary-key }}
|
||||
path: ${{ github.workspace }}/Qt
|
||||
|
||||
- name: "[Windows] Install Qt ${{ matrix.qt_version }}"
|
||||
if: matrix.os == 'Windows'
|
||||
uses: jurplel/install-qt-action@v4
|
||||
uses: jurplel/install-qt-action@b344308e4483fc892e0d27b3cd1b173ebdd95f06 # v4.5.0
|
||||
with:
|
||||
# Qt 6.11.0 only works with aqtinstall directly from git until aqtinstall 3.4 is released
|
||||
aqtsource: git+https://github.com/miurahr/aqtinstall.git
|
||||
|
|
@ -855,7 +855,7 @@ jobs:
|
|||
|
||||
- name: "Setup vcpkg cache"
|
||||
id: vcpkg-cache
|
||||
uses: TAServers/vcpkg-cache@v3
|
||||
uses: TAServers/vcpkg-cache@4f07be616a4604dd29f3c6885975cf2c04abee71 # v3.4.2
|
||||
with:
|
||||
# Every entry is keyed by vcpkg ABI hash, and one hash set exists per platform,
|
||||
# target and toolchain. The action restores every entry it finds under the
|
||||
|
|
@ -1115,7 +1115,7 @@ jobs:
|
|||
- name: "Upload new vcpkg entries"
|
||||
# An empty count means the step above did not run at all, on master and on forks
|
||||
if: steps.vcpkg_new.outputs.count != '' && steps.vcpkg_new.outputs.count != '0'
|
||||
uses: actions/upload-artifact@v7
|
||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
||||
with:
|
||||
if-no-files-found: error # a count above zero with nothing staged is a bug
|
||||
name: vcpkg-new-${{ steps.vcpkg_new.outputs.slug }}
|
||||
|
|
@ -1138,7 +1138,7 @@ jobs:
|
|||
|
||||
- name: "Cache updated compiler cache (ccache)"
|
||||
if: matrix.use_ccache == 1 && env.PERSIST_CCACHE == 'true' && github.ref == 'refs/heads/master'
|
||||
uses: actions/cache/save@v6
|
||||
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
||||
with:
|
||||
key: ${{ steps.restore_ccache.outputs.cache-primary-key }}
|
||||
path: ${{ env.CCACHE_DIR }}
|
||||
|
|
@ -1193,7 +1193,7 @@ jobs:
|
|||
- name: "Upload artifact"
|
||||
if: matrix.make_package
|
||||
id: upload_artifact
|
||||
uses: actions/upload-artifact@v7
|
||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
||||
with:
|
||||
archive: false
|
||||
if-no-files-found: error
|
||||
|
|
@ -1225,7 +1225,7 @@ jobs:
|
|||
# debug identifier, and the PE is what carries the unwind information.
|
||||
- name: "[Windows] Upload debug symbols (exe + pdb)"
|
||||
if: matrix.os == 'Windows' && needs.configure.outputs.tag != null
|
||||
uses: actions/upload-artifact@v7
|
||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
||||
with:
|
||||
if-no-files-found: error
|
||||
name: ${{ steps.build.outputs.name }}-Symbols
|
||||
|
|
@ -1240,7 +1240,7 @@ jobs:
|
|||
- name: "Attest binary provenance"
|
||||
if: steps.upload_release.outcome == 'success'
|
||||
id: attestation
|
||||
uses: actions/attest@v4
|
||||
uses: actions/attest@1e69f48acb82d1966a394da916b4c1698aa569d6 # v4.2.2
|
||||
with:
|
||||
show-summary: false
|
||||
subject-path: ${{ steps.build.outputs.path }}
|
||||
|
|
|
|||
7
.github/workflows/desktop-lint.yml
vendored
7
.github/workflows/desktop-lint.yml
vendored
|
|
@ -1,7 +1,7 @@
|
|||
name: Code Style (C++)
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
contents: read # needed to checkout repo
|
||||
|
||||
on:
|
||||
# Push trigger not needed for linting, we do not allow direct pushes to master
|
||||
|
|
@ -21,11 +21,12 @@ on:
|
|||
|
||||
jobs:
|
||||
format:
|
||||
runs-on: ubuntu-slim
|
||||
name: "Check formatting"
|
||||
runs-on: ubuntu-slim # https://github.com/actions/runner-images/blob/main/images/ubuntu-slim/ubuntu-slim-Readme.md
|
||||
|
||||
steps:
|
||||
- name: "Checkout"
|
||||
uses: actions/checkout@v7
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
fetch-depth: 20 # should be enough to find merge base
|
||||
|
||||
|
|
|
|||
22
.github/workflows/docker-release.yml
vendored
22
.github/workflows/docker-release.yml
vendored
|
|
@ -56,7 +56,7 @@ jobs:
|
|||
include:
|
||||
- label: x86
|
||||
platform: linux/amd64
|
||||
runner: ubuntu-latest # https://github.com/actions/runner-images
|
||||
runner: ubuntu-latest # https://github.com/actions/runner-images#available-images
|
||||
|
||||
- label: arm
|
||||
platform: linux/arm64
|
||||
|
|
@ -67,17 +67,17 @@ jobs:
|
|||
|
||||
steps:
|
||||
- name: "Checkout"
|
||||
uses: actions/checkout@v7
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
ref: ${{ case(github.event_name == 'workflow_dispatch', format('refs/tags/{0}', inputs.tag), '') }}
|
||||
|
||||
- name: "Set up Docker buildx"
|
||||
uses: docker/setup-buildx-action@v4
|
||||
uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1
|
||||
|
||||
- name: "Login to GitHub Container Registry (GHCR)"
|
||||
if: (github.event_name == 'release' && github.event.release.prerelease == false) || github.event_name == 'workflow_dispatch'
|
||||
id: login
|
||||
uses: docker/login-action@v4
|
||||
uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # v4.7.0
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
|
|
@ -92,7 +92,7 @@ jobs:
|
|||
# cache held. The final runtime stage is the part that still pays off.
|
||||
- name: "Build image"
|
||||
if: steps.login.outcome != 'success'
|
||||
uses: docker/build-push-action@v7
|
||||
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
|
||||
with:
|
||||
cache-from: type=gha,scope=${{ env.CACHE_SCOPE }}
|
||||
cache-to: ${{ case(github.ref == 'refs/heads/master', format('type=gha,mode=min,scope={0}', env.CACHE_SCOPE), '') }}
|
||||
|
|
@ -104,7 +104,7 @@ jobs:
|
|||
- name: "Build image and push by digest"
|
||||
if: steps.login.outcome == 'success'
|
||||
id: build
|
||||
uses: docker/build-push-action@v7
|
||||
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
|
||||
with:
|
||||
cache-from: type=gha,scope=${{ env.CACHE_SCOPE }}
|
||||
cache-to: type=gha,mode=min,scope=${{ env.CACHE_SCOPE }}
|
||||
|
|
@ -115,7 +115,7 @@ jobs:
|
|||
org.opencontainers.image.url=${{ env.OCI_URL }}
|
||||
outputs: type=image,name=${{ env.GHCR_IMAGE }},name-canonical=true,push=true,push-by-digest=true
|
||||
platforms: ${{ matrix.platform }}
|
||||
provenance: mode=max # Do not pass secrets as build arguments with this option
|
||||
provenance: mode=max # do not pass secrets as build arguments with this option
|
||||
sbom: true
|
||||
|
||||
- name: "Export digest"
|
||||
|
|
@ -128,7 +128,7 @@ jobs:
|
|||
|
||||
- name: "Upload digest"
|
||||
if: steps.login.outcome == 'success'
|
||||
uses: actions/upload-artifact@v7
|
||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
||||
with:
|
||||
if-no-files-found: error
|
||||
name: digest-${{ matrix.label }}
|
||||
|
|
@ -145,14 +145,14 @@ jobs:
|
|||
|
||||
steps:
|
||||
- name: "Download digests"
|
||||
uses: actions/download-artifact@v8
|
||||
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
|
||||
with:
|
||||
path: ${{ runner.temp }}/digests
|
||||
pattern: digest-*
|
||||
merge-multiple: true
|
||||
|
||||
- name: "Login to GitHub Container Registry (GHCR)"
|
||||
uses: docker/login-action@v4
|
||||
uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # v4.7.0
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
|
|
@ -160,7 +160,7 @@ jobs:
|
|||
|
||||
- name: "Docker metadata"
|
||||
id: metadata
|
||||
uses: docker/metadata-action@v6
|
||||
uses: docker/metadata-action@dc802804100637a589fabce1cb79ff13a1411302 # v6.2.0
|
||||
with:
|
||||
images: ${{ env.GHCR_IMAGE }}
|
||||
flavor: |
|
||||
|
|
|
|||
14
.github/workflows/documentation-build.yml
vendored
14
.github/workflows/documentation-build.yml
vendored
|
|
@ -1,4 +1,4 @@
|
|||
name: Generate Docs
|
||||
name: Build Documentation
|
||||
|
||||
permissions:
|
||||
contents: read # write permission to the destination repo come from 'deploy_key'
|
||||
|
|
@ -24,12 +24,12 @@ env:
|
|||
|
||||
jobs:
|
||||
docs:
|
||||
name: Doxygen
|
||||
runs-on: ubuntu-latest
|
||||
name: "Doxygen"
|
||||
runs-on: ubuntu-latest # https://github.com/actions/runner-images#available-images
|
||||
|
||||
steps:
|
||||
- name: "Checkout"
|
||||
uses: actions/checkout@v7
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
|
|
@ -40,9 +40,9 @@ jobs:
|
|||
dot -V
|
||||
|
||||
- name: "Install Doxygen"
|
||||
uses: ssciwr/doxygen-install@v2
|
||||
uses: ssciwr/doxygen-install@fa3e94d34131d3990b6b8ba939ab982964aa3758 # v2.0.3
|
||||
with:
|
||||
version: "1.18.0"
|
||||
version: "1.18.0" # https://www.doxygen.nl/manual/changelog.html
|
||||
|
||||
- name: "Update Doxygen Configuration"
|
||||
shell: bash
|
||||
|
|
@ -65,7 +65,7 @@ jobs:
|
|||
|
||||
- name: "Deploy to cockatrice.github.io/docs"
|
||||
if: github.event_name == 'release' || github.event_name == 'workflow_dispatch'
|
||||
uses: peaceiris/actions-gh-pages@v4
|
||||
uses: peaceiris/actions-gh-pages@84c30a85c19949d7eee79c4ff27748b70285e453 # v4.1.0
|
||||
with:
|
||||
deploy_key: ${{ secrets.DOCS_DEPLOY_KEY }}
|
||||
destination_dir: docs # docs will be available at https://cockatrice.github.io/docs/
|
||||
|
|
|
|||
11
.github/workflows/translations-pull.yml
vendored
11
.github/workflows/translations-pull.yml
vendored
|
|
@ -16,20 +16,19 @@ on:
|
|||
|
||||
jobs:
|
||||
translations:
|
||||
name: "Pull languages"
|
||||
# Do not run the scheduled workflow on forks
|
||||
if: github.event_name != 'schedule' || github.repository_owner == 'Cockatrice'
|
||||
|
||||
name: Pull languages
|
||||
runs-on: ubuntu-slim
|
||||
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@v7
|
||||
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@v2
|
||||
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
|
||||
|
|
@ -39,7 +38,7 @@ jobs:
|
|||
- name: "Create pull request"
|
||||
if: github.event_name != 'pull_request'
|
||||
id: create_pr
|
||||
uses: peter-evans/create-pull-request@v8
|
||||
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
|
||||
with:
|
||||
add-paths: |
|
||||
cockatrice/translations/*.ts
|
||||
|
|
|
|||
19
.github/workflows/translations-push.yml
vendored
19
.github/workflows/translations-push.yml
vendored
|
|
@ -16,15 +16,14 @@ on:
|
|||
|
||||
jobs:
|
||||
translations:
|
||||
name: "Push strings"
|
||||
# Do not run the scheduled workflow on forks
|
||||
if: github.event_name != 'schedule' || github.repository_owner == 'Cockatrice'
|
||||
|
||||
name: Push strings
|
||||
runs-on: ubuntu-slim
|
||||
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@v7
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
|
||||
- name: "Install lupdate"
|
||||
shell: bash
|
||||
|
|
@ -37,20 +36,22 @@ jobs:
|
|||
FILE: cockatrice/cockatrice_en@source.ts
|
||||
id: cockatrice
|
||||
shell: bash
|
||||
run: >
|
||||
DIRS="cockatrice/src $(find . -maxdepth 1 -type d -name 'libcockatrice_*')"
|
||||
run: |
|
||||
export DIRS="cockatrice/src $(find . -maxdepth 1 -type d -name 'libcockatrice_*')"
|
||||
.ci/update_translation_source_strings.sh
|
||||
|
||||
- name: "Update Oracle translation source"
|
||||
id: oracle
|
||||
shell: bash
|
||||
env:
|
||||
DIRS: 'oracle/src'
|
||||
FILE: 'oracle/oracle_en@source.ts'
|
||||
DIRS: oracle/src
|
||||
FILE: oracle/oracle_en@source.ts
|
||||
run: .ci/update_translation_source_strings.sh
|
||||
|
||||
- name: "Render template"
|
||||
id: template
|
||||
# Not pinnable to a SHA: the action downloads its release binary by ref name,
|
||||
# so a commit ref matches no release tag.
|
||||
uses: chuhlomin/render-template/binary@v1
|
||||
with:
|
||||
template: .ci/update_translation_source_strings_template.md
|
||||
|
|
@ -62,7 +63,7 @@ jobs:
|
|||
- name: "Create pull request"
|
||||
if: github.event_name != 'pull_request'
|
||||
id: create_pr
|
||||
uses: peter-evans/create-pull-request@v8
|
||||
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
|
||||
with:
|
||||
add-paths: |
|
||||
cockatrice/cockatrice_en@source.ts
|
||||
|
|
|
|||
27
.github/workflows/vcpkg-cache-import.yml
vendored
27
.github/workflows/vcpkg-cache-import.yml
vendored
|
|
@ -23,8 +23,10 @@ permissions:
|
|||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: ["Build Desktop"]
|
||||
types: [completed]
|
||||
workflows:
|
||||
- 'Build Desktop'
|
||||
types:
|
||||
- completed
|
||||
|
||||
# Every import writes the same scopes, so let them queue instead of racing each other
|
||||
concurrency:
|
||||
|
|
@ -33,12 +35,12 @@ concurrency:
|
|||
|
||||
jobs:
|
||||
list:
|
||||
name: List new vcpkg entries
|
||||
name: "List new vcpkg entries"
|
||||
# Only a successful push to the default branch has archives worth importing.
|
||||
# Only code that landed on master may populate the scope master runs restore.
|
||||
# Bot actors are excluded on top: their runs must never promote binaries into
|
||||
# the shared scope even if they somehow target the default branch.
|
||||
if: >-
|
||||
if: |
|
||||
github.event.workflow_run.conclusion == 'success' &&
|
||||
(github.event.workflow_run.event == 'push' || github.event.workflow_run.event == 'schedule') &&
|
||||
github.event.workflow_run.head_branch == 'master' &&
|
||||
|
|
@ -46,6 +48,7 @@ jobs:
|
|||
!endsWith(github.event.workflow_run.actor.login, '[bot]') &&
|
||||
!endsWith(github.event.workflow_run.triggering_actor.login, '[bot]')
|
||||
runs-on: ubuntu-slim # https://github.com/actions/runner-images/blob/main/images/ubuntu-slim/ubuntu-slim-Readme.md
|
||||
|
||||
# workflow_run is a low-trust trigger, so cache access is read-only by default even
|
||||
# though this run resolves to the default branch. Assert below that this took effect,
|
||||
# because a save under read-only access only warns and would import nothing silently.
|
||||
|
|
@ -55,7 +58,7 @@ jobs:
|
|||
|
||||
steps:
|
||||
- name: "Download new vcpkg entries"
|
||||
uses: actions/download-artifact@v8
|
||||
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
|
||||
with:
|
||||
pattern: vcpkg-new-*
|
||||
path: incoming
|
||||
|
|
@ -66,7 +69,7 @@ jobs:
|
|||
shell: bash
|
||||
run: |
|
||||
if [[ $ACTIONS_CACHE_MODE != *write* ]]; then
|
||||
echo "::error::expected a write-capable cache, got '$ACTIONS_CACHE_MODE'"
|
||||
echo "::error::Expected a write-capable cache, got '$ACTIONS_CACHE_MODE'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
|
@ -88,14 +91,16 @@ jobs:
|
|||
# Compact, because a multi line value cannot be written to GITHUB_OUTPUT
|
||||
entries="$(jq -cs '.' <<<"$entries")"
|
||||
echo "entries=$entries" >>"$GITHUB_OUTPUT"
|
||||
echo "::notice::importing $(jq length <<<"$entries") vcpkg entries"
|
||||
echo "::notice::Importing $(jq length <<<"$entries") vcpkg entries"
|
||||
|
||||
save:
|
||||
name: "Save ${{ matrix.entry.key }}"
|
||||
needs: list
|
||||
if: needs.list.outputs.entries
|
||||
runs-on: ubuntu-slim
|
||||
needs: list
|
||||
runs-on: ubuntu-slim # https://github.com/actions/runner-images/blob/main/images/ubuntu-slim/ubuntu-slim-Readme.md
|
||||
|
||||
cache-mode: write
|
||||
|
||||
strategy:
|
||||
# One job per archive, they run in parallel and each only uploads a single file
|
||||
fail-fast: false
|
||||
|
|
@ -105,7 +110,7 @@ jobs:
|
|||
|
||||
steps:
|
||||
- name: "Download new vcpkg entries"
|
||||
uses: actions/download-artifact@v8
|
||||
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
|
||||
with:
|
||||
pattern: ${{ matrix.entry.artifact }}
|
||||
path: incoming
|
||||
|
|
@ -113,7 +118,7 @@ jobs:
|
|||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: "Save vcpkg entry"
|
||||
uses: actions/cache/save@v6
|
||||
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
||||
with:
|
||||
# The payload is a Windows or macOS archive while the upload runs on Linux, and
|
||||
# without this the entry would be stamped as a Linux cache that neither of them
|
||||
|
|
|
|||
|
|
@ -300,6 +300,7 @@ cockatrice_add_test(
|
|||
NAME
|
||||
server_card_counter_test
|
||||
SOURCES
|
||||
${VERSION_STRING_CPP}
|
||||
server_card_counter_test.cpp
|
||||
LIBS
|
||||
libcockatrice_network
|
||||
|
|
@ -310,6 +311,7 @@ cockatrice_add_test(
|
|||
NAME
|
||||
server_dump_zone_test
|
||||
SOURCES
|
||||
${VERSION_STRING_CPP}
|
||||
server_dump_zone_test.cpp
|
||||
LIBS
|
||||
libcockatrice_rng
|
||||
|
|
@ -321,6 +323,7 @@ cockatrice_add_test(
|
|||
NAME
|
||||
server_counter_test
|
||||
SOURCES
|
||||
${VERSION_STRING_CPP}
|
||||
server_counter_test.cpp
|
||||
LIBS
|
||||
libcockatrice_network
|
||||
|
|
@ -332,6 +335,7 @@ cockatrice_add_test(
|
|||
server_developer_role_test
|
||||
NO_SANITIZE
|
||||
SOURCES
|
||||
${VERSION_STRING_CPP}
|
||||
server_developer_role_test.cpp
|
||||
LIBS
|
||||
libcockatrice_network
|
||||
|
|
@ -344,6 +348,7 @@ cockatrice_add_test(
|
|||
server_moderator_role_test
|
||||
NO_SANITIZE
|
||||
SOURCES
|
||||
${VERSION_STRING_CPP}
|
||||
server_moderator_role_test.cpp
|
||||
LIBS
|
||||
libcockatrice_network
|
||||
|
|
@ -390,6 +395,7 @@ cockatrice_add_test(
|
|||
NAME
|
||||
local_client_lifetime_test
|
||||
SOURCES
|
||||
${VERSION_STRING_CPP}
|
||||
local_client_lifetime_test.cpp
|
||||
LIBS
|
||||
libcockatrice_network
|
||||
|
|
@ -411,6 +417,7 @@ cockatrice_add_test(
|
|||
NAME
|
||||
latency_tracker_test
|
||||
SOURCES
|
||||
${VERSION_STRING_CPP}
|
||||
latency_tracker_test.cpp
|
||||
LIBS
|
||||
libcockatrice_network
|
||||
|
|
|
|||
|
|
@ -13,6 +13,10 @@
|
|||
#include <QMetaObject>
|
||||
#include <QString>
|
||||
#include <gtest/gtest.h>
|
||||
#include <libcockatrice/rng/rng_abstract.h>
|
||||
|
||||
// Referenced by other translation units in the server_remote library.
|
||||
RNG_Abstract *rng = nullptr;
|
||||
|
||||
namespace
|
||||
{
|
||||
|
|
|
|||
|
|
@ -7,8 +7,12 @@
|
|||
#include <climits>
|
||||
#include <gtest/gtest.h>
|
||||
#include <libcockatrice/network/server/remote/game/dump_zone_range.h>
|
||||
#include <libcockatrice/rng/rng_abstract.h>
|
||||
#include <vector>
|
||||
|
||||
// Referenced by other translation units in the server_remote library.
|
||||
RNG_Abstract *rng = nullptr;
|
||||
|
||||
namespace
|
||||
{
|
||||
/// Indices a dump request resolves to, as the handler would walk them.
|
||||
|
|
|
|||
|
|
@ -9,12 +9,16 @@
|
|||
#include <QStringLiteral>
|
||||
#include <QTemporaryDir>
|
||||
#include <gtest/gtest.h>
|
||||
#include <libcockatrice/rng/rng_abstract.h>
|
||||
#include <string>
|
||||
|
||||
// Owned by main.cpp in the real application; pixel_map_generator.cpp references
|
||||
// it, so the test binary needs a definition even though it never renders.
|
||||
ThemeManager *themeManager = nullptr;
|
||||
|
||||
// Referenced by other translation units in the server_remote library.
|
||||
RNG_Abstract *rng = nullptr;
|
||||
|
||||
namespace
|
||||
{
|
||||
const QString LEGACY = QStringLiteral("Default");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue