fix(ci): add --force to tag fetch, fix ccache keys, disable Windows/macOS builds
Some checks failed
Build and Test / build (push) Failing after 16m39s
Release Build / publish-release (push) Has been cancelled
Release Build / build-linux (push) Has been cancelled

- build.yml: Add --force flag to tag fetch to prevent 'would clobber
  existing tag' error when 'latest' tag already exists locally
- build.yml: Use github.run_id instead of github.sha for ccache keys
  to ensure unique keys per workflow run while still benefiting from
  restore-key prefix matching

- release.yml: Add --force flag to tag fetch commands
- release.yml: Use github.run_id for ccache keys (same reason)
- release.yml: Comment out build-macos and build-windows jobs since
  no native runners are available for these platforms
- release.yml: Update publish-release to only depend on build-linux
- release.yml: Update release notes to indicate macOS/Windows builds
  are not yet available

The ccache key strategy now works correctly with immutable caches:
- Save with unique key: ccache-{workflow}-{branch}-{run_id}
- Restore with prefix fallback: tries same branch first, then main

The macOS and Windows jobs require platform-specific tooling:
- macOS: dmgbuild, pyobjc-framework-Quartz for DMG creation
- Windows: NSIS, Visual Studio toolchain for installer creation

These cannot be easily cross-compiled from Linux. The jobs are
preserved as comments so they can be re-enabled when native runners
become available or when cross-compilation tooling is set up.
This commit is contained in:
2026-02-05 13:34:55 -06:00
parent 405e04bd3e
commit 5319387030
2 changed files with 168 additions and 168 deletions

View File

@@ -37,7 +37,7 @@ jobs:
fetch-depth: 1
- name: Fetch tags (for git describe)
run: git fetch --no-recurse-submodules --depth=1 origin '+refs/tags/*:refs/tags/*'
run: git fetch --no-recurse-submodules --force --depth=1 origin '+refs/tags/*:refs/tags/*'
- name: Install pixi
run: |
@@ -51,7 +51,7 @@ jobs:
uses: https://github.com/actions/cache/restore@v4
with:
path: /tmp/ccache-kindred-create
key: ccache-build-${{ github.ref_name }}-${{ github.sha }}
key: ccache-build-${{ github.ref_name }}-${{ github.run_id }}
restore-keys: |
ccache-build-${{ github.ref_name }}-
ccache-build-main-
@@ -75,7 +75,7 @@ jobs:
uses: https://github.com/actions/cache/save@v4
with:
path: /tmp/ccache-kindred-create
key: ccache-build-${{ github.ref_name }}-${{ github.sha }}
key: ccache-build-${{ github.ref_name }}-${{ github.run_id }}
- name: Run C++ unit tests
continue-on-error: true

View File

@@ -46,7 +46,7 @@ jobs:
fetch-depth: 1
- name: Fetch tags
run: git fetch --tags --no-recurse-submodules origin
run: git fetch --tags --force --no-recurse-submodules origin
- name: Install pixi
run: |
@@ -60,7 +60,7 @@ jobs:
uses: https://github.com/actions/cache/restore@v4
with:
path: /tmp/ccache-kindred-create
key: ccache-release-linux-${{ github.sha }}
key: ccache-release-linux-${{ github.run_id }}
restore-keys: |
ccache-release-linux-
ccache-build-main-
@@ -84,7 +84,7 @@ jobs:
uses: https://github.com/actions/cache/save@v4
with:
path: /tmp/ccache-kindred-create
key: ccache-release-linux-${{ github.sha }}
key: ccache-release-linux-${{ github.run_id }}
- name: Build .deb package
run: |
@@ -113,174 +113,176 @@ jobs:
# ---------------------------------------------------------------------------
# macOS: DMG (Intel + Apple Silicon)
# TODO: Re-enable when macOS runners are available or cross-compilation is set up
# ---------------------------------------------------------------------------
build-macos:
strategy:
fail-fast: false
matrix:
include:
- runner: macos-13
arch: x86_64
- runner: macos-14
arch: arm64
runs-on: ${{ matrix.runner }}
env:
CCACHE_DIR: /tmp/ccache-kindred-create
CCACHE_COMPRESS: "true"
CCACHE_COMPRESSLEVEL: "6"
CCACHE_MAXSIZE: "4G"
CCACHE_SLOPPINESS: "include_file_ctime,include_file_mtime,pch_defines,time_macros"
CCACHE_BASEDIR: ${{ github.workspace }}
BUILD_TAG: ${{ github.ref_name || inputs.tag }}
CFLAGS: "-O3"
CXXFLAGS: "-O3"
steps:
- name: Checkout repository
uses: https://github.com/actions/checkout@v4
with:
submodules: recursive
fetch-depth: 1
- name: Fetch tags
run: git fetch --tags --no-recurse-submodules origin
- name: Install pixi
run: |
curl -fsSL https://pixi.sh/install.sh | bash
echo "$HOME/.pixi/bin" >> $GITHUB_PATH
export PATH="$HOME/.pixi/bin:$PATH"
pixi --version
- name: Restore ccache
id: ccache-restore
uses: https://github.com/actions/cache/restore@v4
with:
path: /tmp/ccache-kindred-create
key: ccache-release-macos-${{ matrix.arch }}-${{ github.sha }}
restore-keys: |
ccache-release-macos-${{ matrix.arch }}-
- name: Prepare ccache
run: |
mkdir -p $CCACHE_DIR
pixi run ccache -z
- name: Build release package (DMG)
working-directory: package/rattler-build
run: |
pixi install
pixi run -e package create_bundle
- name: Show ccache statistics
run: pixi run ccache -s
- name: Save ccache
if: always()
uses: https://github.com/actions/cache/save@v4
with:
path: /tmp/ccache-kindred-create
key: ccache-release-macos-${{ matrix.arch }}-${{ github.sha }}
- name: List built artifacts
run: |
echo "=== macOS ${{ matrix.arch }} release artifacts ==="
ls -lah package/rattler-build/osx/*.dmg* 2>/dev/null || true
- name: Upload macOS artifacts
uses: https://github.com/actions/upload-artifact@v3
with:
name: release-macos-${{ matrix.arch }}
path: |
package/rattler-build/osx/*.dmg
package/rattler-build/osx/*-SHA256.txt
if-no-files-found: error
# build-macos:
# strategy:
# fail-fast: false
# matrix:
# include:
# - runner: macos-13
# arch: x86_64
# - runner: macos-14
# arch: arm64
#
# runs-on: ${{ matrix.runner }}
#
# env:
# CCACHE_DIR: /tmp/ccache-kindred-create
# CCACHE_COMPRESS: "true"
# CCACHE_COMPRESSLEVEL: "6"
# CCACHE_MAXSIZE: "4G"
# CCACHE_SLOPPINESS: "include_file_ctime,include_file_mtime,pch_defines,time_macros"
# CCACHE_BASEDIR: ${{ github.workspace }}
# BUILD_TAG: ${{ github.ref_name || inputs.tag }}
# CFLAGS: "-O3"
# CXXFLAGS: "-O3"
#
# steps:
# - name: Checkout repository
# uses: https://github.com/actions/checkout@v4
# with:
# submodules: recursive
# fetch-depth: 1
#
# - name: Fetch tags
# run: git fetch --tags --force --no-recurse-submodules origin
#
# - name: Install pixi
# run: |
# curl -fsSL https://pixi.sh/install.sh | bash
# echo "$HOME/.pixi/bin" >> $GITHUB_PATH
# export PATH="$HOME/.pixi/bin:$PATH"
# pixi --version
#
# - name: Restore ccache
# id: ccache-restore
# uses: https://github.com/actions/cache/restore@v4
# with:
# path: /tmp/ccache-kindred-create
# key: ccache-release-macos-${{ matrix.arch }}-${{ github.sha }}
# restore-keys: |
# ccache-release-macos-${{ matrix.arch }}-
#
# - name: Prepare ccache
# run: |
# mkdir -p $CCACHE_DIR
# pixi run ccache -z
#
# - name: Build release package (DMG)
# working-directory: package/rattler-build
# run: |
# pixi install
# pixi run -e package create_bundle
#
# - name: Show ccache statistics
# run: pixi run ccache -s
#
# - name: Save ccache
# if: always()
# uses: https://github.com/actions/cache/save@v4
# with:
# path: /tmp/ccache-kindred-create
# key: ccache-release-macos-${{ matrix.arch }}-${{ github.sha }}
#
# - name: List built artifacts
# run: |
# echo "=== macOS ${{ matrix.arch }} release artifacts ==="
# ls -lah package/rattler-build/osx/*.dmg* 2>/dev/null || true
#
# - name: Upload macOS artifacts
# uses: https://github.com/actions/upload-artifact@v3
# with:
# name: release-macos-${{ matrix.arch }}
# path: |
# package/rattler-build/osx/*.dmg
# package/rattler-build/osx/*-SHA256.txt
# if-no-files-found: error
# ---------------------------------------------------------------------------
# Windows: .exe installer + .7z archive
# TODO: Re-enable when Windows runners are available or cross-compilation is set up
# ---------------------------------------------------------------------------
build-windows:
runs-on: windows-latest
env:
CCACHE_DIR: C:\ccache-kindred-create
CCACHE_COMPRESS: "true"
CCACHE_COMPRESSLEVEL: "6"
CCACHE_MAXSIZE: "4G"
CCACHE_SLOPPINESS: "include_file_ctime,include_file_mtime,pch_defines,time_macros"
CCACHE_BASEDIR: ${{ github.workspace }}
BUILD_TAG: ${{ github.ref_name || inputs.tag }}
CFLAGS: "/O2"
CXXFLAGS: "/O2"
MAKE_INSTALLER: "true"
steps:
- name: Checkout repository
uses: https://github.com/actions/checkout@v4
with:
submodules: recursive
fetch-depth: 1
- name: Fetch tags
shell: bash
run: git fetch --tags --no-recurse-submodules origin
- name: Install pixi
shell: bash
run: |
curl -fsSL https://pixi.sh/install.sh | bash
echo "$HOME/.pixi/bin" >> $GITHUB_PATH
export PATH="$HOME/.pixi/bin:$PATH"
pixi --version
- name: Restore ccache
id: ccache-restore
uses: https://github.com/actions/cache/restore@v4
with:
path: C:\ccache-kindred-create
key: ccache-release-windows-${{ github.sha }}
restore-keys: |
ccache-release-windows-
- name: Build release package
shell: bash
working-directory: package/rattler-build
run: |
pixi install
pixi run -e package create_bundle
- name: Save ccache
if: always()
uses: https://github.com/actions/cache/save@v4
with:
path: C:\ccache-kindred-create
key: ccache-release-windows-${{ github.sha }}
- name: List built artifacts
shell: bash
run: |
echo "=== Windows release artifacts ==="
ls -lah package/rattler-build/windows/*.7z* 2>/dev/null || true
ls -lah package/rattler-build/windows/*.exe 2>/dev/null || true
ls -lah package/rattler-build/windows/*-SHA256.txt 2>/dev/null || true
- name: Upload Windows artifacts
uses: https://github.com/actions/upload-artifact@v3
with:
name: release-windows
path: |
package/rattler-build/windows/*.7z
package/rattler-build/windows/*.exe
package/rattler-build/windows/*-SHA256.txt
if-no-files-found: error
# build-windows:
# runs-on: windows-latest
#
# env:
# CCACHE_DIR: C:\ccache-kindred-create
# CCACHE_COMPRESS: "true"
# CCACHE_COMPRESSLEVEL: "6"
# CCACHE_MAXSIZE: "4G"
# CCACHE_SLOPPINESS: "include_file_ctime,include_file_mtime,pch_defines,time_macros"
# CCACHE_BASEDIR: ${{ github.workspace }}
# BUILD_TAG: ${{ github.ref_name || inputs.tag }}
# CFLAGS: "/O2"
# CXXFLAGS: "/O2"
# MAKE_INSTALLER: "true"
#
# steps:
# - name: Checkout repository
# uses: https://github.com/actions/checkout@v4
# with:
# submodules: recursive
# fetch-depth: 1
#
# - name: Fetch tags
# shell: bash
# run: git fetch --tags --force --no-recurse-submodules origin
#
# - name: Install pixi
# shell: bash
# run: |
# curl -fsSL https://pixi.sh/install.sh | bash
# echo "$HOME/.pixi/bin" >> $GITHUB_PATH
# export PATH="$HOME/.pixi/bin:$PATH"
# pixi --version
#
# - name: Restore ccache
# id: ccache-restore
# uses: https://github.com/actions/cache/restore@v4
# with:
# path: C:\ccache-kindred-create
# key: ccache-release-windows-${{ github.sha }}
# restore-keys: |
# ccache-release-windows-
#
# - name: Build release package
# shell: bash
# working-directory: package/rattler-build
# run: |
# pixi install
# pixi run -e package create_bundle
#
# - name: Save ccache
# if: always()
# uses: https://github.com/actions/cache/save@v4
# with:
# path: C:\ccache-kindred-create
# key: ccache-release-windows-${{ github.sha }}
#
# - name: List built artifacts
# shell: bash
# run: |
# echo "=== Windows release artifacts ==="
# ls -lah package/rattler-build/windows/*.7z* 2>/dev/null || true
# ls -lah package/rattler-build/windows/*.exe 2>/dev/null || true
# ls -lah package/rattler-build/windows/*-SHA256.txt 2>/dev/null || true
#
# - name: Upload Windows artifacts
# uses: https://github.com/actions/upload-artifact@v3
# with:
# name: release-windows
# path: |
# package/rattler-build/windows/*.7z
# package/rattler-build/windows/*.exe
# package/rattler-build/windows/*-SHA256.txt
# if-no-files-found: error
# ---------------------------------------------------------------------------
# Create Gitea release from all platform artifacts
# ---------------------------------------------------------------------------
publish-release:
needs: [build-linux, build-macos, build-windows]
needs: [build-linux] # TODO: Add build-macos, build-windows when runners are available
runs-on: ubuntu-latest
env:
@@ -326,10 +328,8 @@ jobs:
|----------|------|
| Linux (AppImage) | `KindredCreate-*-Linux-x86_64.AppImage` |
| Linux (Debian/Ubuntu) | `kindred-create_*.deb` |
| macOS (Intel) | `KindredCreate-*-macOS-x86_64.dmg` |
| macOS (Apple Silicon) | `KindredCreate-*-macOS-arm64.dmg` |
| Windows (Installer) | `KindredCreate-*-Windows-x86_64-installer.exe` |
| Windows (Portable) | `KindredCreate-*-Windows-x86_64.7z` |
*macOS and Windows builds are not yet available.*
SHA256 checksums are provided alongside each artifact.
prerelease: ${{ contains(github.ref_name, 'rc') || contains(github.ref_name, 'beta') || contains(github.ref_name, 'alpha') }}