simplified build workflow

This commit is contained in:
Phred 2026-06-14 00:18:16 -05:00
parent f28ede7ae3
commit 4877990020
No known key found for this signature in database

View file

@ -36,7 +36,7 @@ on:
# Cancel earlier, unfinished runs of this workflow on the same branch (unless on release) # Cancel earlier, unfinished runs of this workflow on the same branch (unless on release)
concurrency: concurrency:
group: "${{ github.workflow }} @ ${{ github.ref_name }}" group: ${{ github.workflow }} @ ${{ github.ref_name }}
cancel-in-progress: ${{ github.ref_type != 'tag' }} cancel-in-progress: ${{ github.ref_type != 'tag' }}
jobs: jobs:
@ -47,22 +47,24 @@ 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_reuqest',
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 +94,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 +107,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 +205,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
@ -267,7 +269,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
@ -284,7 +286,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
@ -300,7 +302,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
@ -316,7 +318,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
@ -330,7 +332,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