mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-21 22:33:54 -07:00
CI: Simplified build workflow (#6995)
Some checks are pending
Build Desktop / Configure (push) Waiting to run
Build Desktop / Debian 13 (push) Blocked by required conditions
Build Desktop / Debian 12 (push) Blocked by required conditions
Build Desktop / Fedora 44 (push) Blocked by required conditions
Build Desktop / Fedora 43 (push) Blocked by required conditions
Build Desktop / Servatrice_Debian 12 (push) Blocked by required conditions
Build Desktop / Ubuntu 26.04 (push) Blocked by required conditions
Build Desktop / Ubuntu 24.04 (push) Blocked by required conditions
Build Desktop / Arch (push) Blocked by required conditions
Build Desktop / macOS 14 (push) Blocked by required conditions
Build Desktop / macOS 15 (push) Blocked by required conditions
Build Desktop / macOS 13 Intel (push) Blocked by required conditions
Build Desktop / macOS 15 Debug (push) Blocked by required conditions
Build Desktop / Windows 10 (push) Blocked by required conditions
Build Docker Image / amd64 & arm64 (push) Waiting to run
Some checks are pending
Build Desktop / Configure (push) Waiting to run
Build Desktop / Debian 13 (push) Blocked by required conditions
Build Desktop / Debian 12 (push) Blocked by required conditions
Build Desktop / Fedora 44 (push) Blocked by required conditions
Build Desktop / Fedora 43 (push) Blocked by required conditions
Build Desktop / Servatrice_Debian 12 (push) Blocked by required conditions
Build Desktop / Ubuntu 26.04 (push) Blocked by required conditions
Build Desktop / Ubuntu 24.04 (push) Blocked by required conditions
Build Desktop / Arch (push) Blocked by required conditions
Build Desktop / macOS 14 (push) Blocked by required conditions
Build Desktop / macOS 15 (push) Blocked by required conditions
Build Desktop / macOS 13 Intel (push) Blocked by required conditions
Build Desktop / macOS 15 Debug (push) Blocked by required conditions
Build Desktop / Windows 10 (push) Blocked by required conditions
Build Docker Image / amd64 & arm64 (push) Waiting to run
* simplified build workflow * cleaned up translation workflows * fixed typo * updated format based on code review Co-authored-by: tooomm <tooomm@users.noreply.github.com> * restored quotes around `group` string --------- Co-authored-by: tooomm <tooomm@users.noreply.github.com>
This commit is contained in:
parent
2a3c4a2455
commit
e99a55ccab
3 changed files with 38 additions and 46 deletions
47
.github/workflows/desktop-build.yml
vendored
47
.github/workflows/desktop-build.yml
vendored
|
|
@ -47,22 +47,17 @@ jobs:
|
||||||
tag: ${{ steps.configure.outputs.tag }}
|
tag: ${{ steps.configure.outputs.tag }}
|
||||||
sha: ${{ steps.configure.outputs.sha }}
|
sha: ${{ steps.configure.outputs.sha }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: "Configure"
|
- name: "Configure"
|
||||||
|
env:
|
||||||
|
RESOLVED_SHA: ${{ case(github.event_name == 'pull_request', github.event.pull_request.head.sha, github.sha) }}
|
||||||
id: configure
|
id: configure
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
tag_regex='^refs/tags/'
|
if [[ "$GITHUB_REF_TYPE" == 'tag' ]]; then # release
|
||||||
if [[ $GITHUB_EVENT_NAME == pull-request ]]; then # pull request
|
echo "tag=$GITHUB_REF_NAME" >> "$GITHUB_OUTPUT"
|
||||||
sha="${{github.event.pull_request.head.sha}}"
|
|
||||||
elif [[ $GITHUB_REF =~ $tag_regex ]]; then # release
|
|
||||||
sha="$GITHUB_SHA"
|
|
||||||
tag="${GITHUB_REF/refs\/tags\//}"
|
|
||||||
echo "tag=$tag" >>"$GITHUB_OUTPUT"
|
|
||||||
else # push to branch
|
|
||||||
sha="$GITHUB_SHA"
|
|
||||||
fi
|
fi
|
||||||
echo "sha=$sha" >>"$GITHUB_OUTPUT"
|
echo "sha=$RESOLVED_SHA" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
- name: "Checkout"
|
- name: "Checkout"
|
||||||
if: steps.configure.outputs.tag != null
|
if: steps.configure.outputs.tag != null
|
||||||
|
|
@ -92,7 +87,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
args=()
|
args=()
|
||||||
[[ $prerelease == yes ]] && args+=(--prerelease)
|
[[ $prerelease == yes ]] && args+=(--prerelease)
|
||||||
|
|
||||||
gh release create "$tag_name" --verify-tag --draft "${args[@]}" \
|
gh release create "$tag_name" --verify-tag --draft "${args[@]}" \
|
||||||
--target "$target" \
|
--target "$target" \
|
||||||
--title "$release_name" \
|
--title "$release_name" \
|
||||||
|
|
@ -105,48 +100,48 @@ jobs:
|
||||||
# The files in ".ci/$distro$version" correspond to the values given here
|
# The files in ".ci/$distro$version" correspond to the values given here
|
||||||
include:
|
include:
|
||||||
- distro: Arch
|
- distro: Arch
|
||||||
|
|
||||||
allow-failure: yes
|
allow-failure: yes
|
||||||
package: skip # We are packaged in Arch already
|
package: skip # We are packaged in Arch already
|
||||||
|
|
||||||
- distro: Servatrice_Debian
|
- distro: Servatrice_Debian
|
||||||
version: 12
|
version: 12
|
||||||
|
|
||||||
package: DEB
|
package: DEB
|
||||||
server_only: yes
|
server_only: yes
|
||||||
test: skip
|
test: skip
|
||||||
|
|
||||||
- distro: Debian
|
- distro: Debian
|
||||||
version: 12
|
version: 12
|
||||||
|
|
||||||
package: DEB
|
package: DEB
|
||||||
test: skip # Running tests on all distros is superfluous
|
test: skip # Running tests on all distros is superfluous
|
||||||
|
|
||||||
- distro: Debian
|
- distro: Debian
|
||||||
version: 13
|
version: 13
|
||||||
|
|
||||||
package: DEB
|
package: DEB
|
||||||
|
|
||||||
- distro: Fedora
|
- distro: Fedora
|
||||||
version: 43
|
version: 43
|
||||||
|
|
||||||
package: RPM
|
package: RPM
|
||||||
test: skip # Running tests on all distros is superfluous
|
test: skip # Running tests on all distros is superfluous
|
||||||
|
|
||||||
- distro: Fedora
|
- distro: Fedora
|
||||||
version: 44
|
version: 44
|
||||||
|
|
||||||
package: RPM
|
package: RPM
|
||||||
|
|
||||||
- distro: Ubuntu
|
- distro: Ubuntu
|
||||||
version: 24.04
|
version: 24.04
|
||||||
|
|
||||||
package: DEB
|
package: DEB
|
||||||
test: skip # Running tests on all distros is superfluous
|
test: skip # Running tests on all distros is superfluous
|
||||||
|
|
||||||
- distro: Ubuntu
|
- distro: Ubuntu
|
||||||
version: 26.04
|
version: 26.04
|
||||||
|
|
||||||
package: DEB
|
package: DEB
|
||||||
|
|
||||||
name: ${{ matrix.distro }} ${{ matrix.version }}
|
name: ${{ matrix.distro }} ${{ matrix.version }}
|
||||||
|
|
@ -203,7 +198,7 @@ jobs:
|
||||||
args+=(--ccache "$CCACHE_SIZE")
|
args+=(--ccache "$CCACHE_SIZE")
|
||||||
args+=(--cmake-generator "$CMAKE_GENERATOR")
|
args+=(--cmake-generator "$CMAKE_GENERATOR")
|
||||||
args+=(--suffix "$SUFFIX")
|
args+=(--suffix "$SUFFIX")
|
||||||
|
|
||||||
RUN --server --release --package "$package" "${args[@]}"
|
RUN --server --release --package "$package" "${args[@]}"
|
||||||
|
|
||||||
# Delete used cache to emulate a ccache update. See https://github.com/actions/cache/issues/342
|
# Delete used cache to emulate a ccache update. See https://github.com/actions/cache/issues/342
|
||||||
|
|
@ -269,7 +264,7 @@ jobs:
|
||||||
- os: macOS
|
- os: macOS
|
||||||
target: 13
|
target: 13
|
||||||
runner: macos-15-intel
|
runner: macos-15-intel
|
||||||
|
|
||||||
ccache_eviction_age: 7d
|
ccache_eviction_age: 7d
|
||||||
cmake_generator: Ninja
|
cmake_generator: Ninja
|
||||||
make_package: 1
|
make_package: 1
|
||||||
|
|
@ -286,7 +281,7 @@ jobs:
|
||||||
- os: macOS
|
- os: macOS
|
||||||
target: 14
|
target: 14
|
||||||
runner: macos-14
|
runner: macos-14
|
||||||
|
|
||||||
ccache_eviction_age: 7d
|
ccache_eviction_age: 7d
|
||||||
cmake_generator: Ninja
|
cmake_generator: Ninja
|
||||||
make_package: 1
|
make_package: 1
|
||||||
|
|
@ -302,7 +297,7 @@ jobs:
|
||||||
- os: macOS
|
- os: macOS
|
||||||
target: 15
|
target: 15
|
||||||
runner: macos-15
|
runner: macos-15
|
||||||
|
|
||||||
ccache_eviction_age: 7d
|
ccache_eviction_age: 7d
|
||||||
cmake_generator: Ninja
|
cmake_generator: Ninja
|
||||||
make_package: 1
|
make_package: 1
|
||||||
|
|
@ -318,7 +313,7 @@ jobs:
|
||||||
- os: macOS
|
- os: macOS
|
||||||
target: 15
|
target: 15
|
||||||
runner: macos-15
|
runner: macos-15
|
||||||
|
|
||||||
ccache_eviction_age: 7d
|
ccache_eviction_age: 7d
|
||||||
cmake_generator: Ninja
|
cmake_generator: Ninja
|
||||||
qt_version: 6.11.0
|
qt_version: 6.11.0
|
||||||
|
|
@ -332,7 +327,7 @@ jobs:
|
||||||
- os: Windows
|
- os: Windows
|
||||||
target: 10
|
target: 10
|
||||||
runner: windows-2025
|
runner: windows-2025
|
||||||
|
|
||||||
cmake_generator: "Visual Studio 18 2026"
|
cmake_generator: "Visual Studio 18 2026"
|
||||||
cmake_generator_platform: x64
|
cmake_generator_platform: x64
|
||||||
make_package: 1
|
make_package: 1
|
||||||
|
|
|
||||||
16
.github/workflows/translations-pull.yml
vendored
16
.github/workflows/translations-pull.yml
vendored
|
|
@ -41,11 +41,11 @@ jobs:
|
||||||
author: github-actions <github-actions@github.com> # owner of the commit
|
author: github-actions <github-actions@github.com> # owner of the commit
|
||||||
body: |
|
body: |
|
||||||
Pulled all translated strings from [Transifex][1].
|
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>
|
*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.*
|
*After merging, all new languages and translations are available in the next build.*
|
||||||
|
|
||||||
[1]: https://explore.transifex.com/cockatrice/cockatrice/
|
[1]: https://explore.transifex.com/cockatrice/cockatrice/
|
||||||
[2]: https://github.com/Cockatrice/Cockatrice/actions/workflows/translations-pull.yml?query=branch%3Amaster
|
[2]: https://github.com/Cockatrice/Cockatrice/actions/workflows/translations-pull.yml?query=branch%3Amaster
|
||||||
branch: ci-update_translations
|
branch: ci-update_translations
|
||||||
|
|
@ -61,11 +61,9 @@ jobs:
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
STATUS: ${{ steps.create_pr.outputs.pull-request-operation }}
|
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: |
|
run: |
|
||||||
if [[ "$STATUS" == "none" ]]; then
|
echo "PR #$PR_NUMBER $STATUS!" >> "$GITHUB_STEP_SUMMARY"
|
||||||
echo "PR #${{ steps.create_pr.outputs.pull-request-number }} unchanged!" >> $GITHUB_STEP_SUMMARY
|
echo "URL: $PR_URL" >> "$GITHUB_STEP_SUMMARY"
|
||||||
else
|
|
||||||
echo "PR #${{ steps.create_pr.outputs.pull-request-number }} $STATUS!" >> $GITHUB_STEP_SUMMARY
|
|
||||||
fi
|
|
||||||
echo "URL: ${{ steps.create_pr.outputs.pull-request-url }}" >> $GITHUB_STEP_SUMMARY
|
|
||||||
|
|
|
||||||
21
.github/workflows/translations-push.yml
vendored
21
.github/workflows/translations-push.yml
vendored
|
|
@ -29,12 +29,13 @@ jobs:
|
||||||
sudo apt-get install -y --no-install-recommends qttools5-dev-tools
|
sudo apt-get install -y --no-install-recommends qttools5-dev-tools
|
||||||
|
|
||||||
- name: "Update Cockatrice translation source"
|
- name: "Update Cockatrice translation source"
|
||||||
|
env:
|
||||||
|
FILE: cockatrice/cockatrice_en@source.ts
|
||||||
id: cockatrice
|
id: cockatrice
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: >
|
||||||
FILE="cockatrice/cockatrice_en@source.ts"
|
DIRS="cockatrice/src $(find . -maxdepth 1 -type d -name 'libcockatrice_*')"
|
||||||
export DIRS="cockatrice/src $(find . -maxdepth 1 -type d -name 'libcockatrice_*')"
|
.ci/update_translation_source_strings.sh
|
||||||
FILE="$FILE" DIRS="$DIRS" .ci/update_translation_source_strings.sh
|
|
||||||
|
|
||||||
- name: "Update Oracle translation source"
|
- name: "Update Oracle translation source"
|
||||||
id: oracle
|
id: oracle
|
||||||
|
|
@ -77,11 +78,9 @@ jobs:
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
STATUS: ${{ steps.create_pr.outputs.pull-request-operation }}
|
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: |
|
run: |
|
||||||
if [[ "$STATUS" == "none" ]]; then
|
echo "PR #$PR_NUMBER $STATUS!" >> "$GITHUB_STEP_SUMMARY"
|
||||||
echo "PR #${{ steps.create_pr.outputs.pull-request-number }} unchanged!" >> $GITHUB_STEP_SUMMARY
|
echo "URL: $PR_URL" >> "$GITHUB_STEP_SUMMARY"
|
||||||
else
|
|
||||||
echo "PR #${{ steps.create_pr.outputs.pull-request-number }} $STATUS!" >> $GITHUB_STEP_SUMMARY
|
|
||||||
fi
|
|
||||||
echo "URL: ${{ steps.create_pr.outputs.pull-request-url }}" >> $GITHUB_STEP_SUMMARY
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue