Some checks failed
Build and Test / build (push) Successful in 1h11m46s
Release Build / build-linux (push) Failing after 2m32s
Release Build / build-macos (arm64, macos-14) (push) Has been cancelled
Release Build / build-macos (x86_64, macos-13) (push) Has been cancelled
Release Build / build-windows (push) Has been cancelled
Release Build / publish-release (push) Has been cancelled
fetch-depth: 0 downloads the entire FreeCAD history (45k+ commits), causing 13+ minute checkout times. Switch to fetch-depth: 1 with a separate lightweight tag fetch for git describe.
337 lines
11 KiB
YAML
337 lines
11 KiB
YAML
# SPDX-License-Identifier: LGPL-2.1-or-later
|
|
name: Release Build
|
|
|
|
on:
|
|
push:
|
|
tags: ["v*"]
|
|
workflow_dispatch:
|
|
inputs:
|
|
tag:
|
|
description: "Release tag (e.g., v0.1.0)"
|
|
required: true
|
|
type: string
|
|
|
|
jobs:
|
|
# ---------------------------------------------------------------------------
|
|
# Linux: AppImage + .deb
|
|
# ---------------------------------------------------------------------------
|
|
build-linux:
|
|
runs-on: ubuntu-latest
|
|
|
|
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"
|
|
DEBIAN_FRONTEND: noninteractive
|
|
|
|
steps:
|
|
- name: Install system prerequisites
|
|
run: |
|
|
apt-get update -qq
|
|
apt-get install -y --no-install-recommends \
|
|
ca-certificates curl git file fuse3 xvfb xauth openssl sudo dpkg-dev \
|
|
libgl1-mesa-dev libglu1-mesa-dev libx11-dev libxkbcommon-dev \
|
|
libxcb-xkb-dev libfontconfig1-dev
|
|
|
|
- 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-linux-${{ github.sha }}
|
|
restore-keys: |
|
|
ccache-release-linux-
|
|
ccache-build-main-
|
|
|
|
- name: Prepare ccache
|
|
run: |
|
|
mkdir -p $CCACHE_DIR
|
|
pixi run ccache -z
|
|
|
|
- name: Build release package (AppImage)
|
|
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-linux-${{ github.sha }}
|
|
|
|
- name: Build .deb package
|
|
run: |
|
|
./package/debian/build-deb.sh \
|
|
package/rattler-build/linux/AppDir/usr \
|
|
package/rattler-build/linux \
|
|
"${BUILD_TAG}"
|
|
|
|
- name: List built artifacts
|
|
run: |
|
|
echo "=== Linux release artifacts ==="
|
|
ls -lah package/rattler-build/linux/*.AppImage* 2>/dev/null || true
|
|
ls -lah package/rattler-build/linux/*.deb* 2>/dev/null || true
|
|
ls -lah package/rattler-build/linux/*-SHA256.txt 2>/dev/null || true
|
|
|
|
- name: Upload Linux artifacts
|
|
uses: https://github.com/actions/upload-artifact@v3
|
|
with:
|
|
name: release-linux
|
|
path: |
|
|
package/rattler-build/linux/*.AppImage
|
|
package/rattler-build/linux/*.deb
|
|
package/rattler-build/linux/*-SHA256.txt
|
|
package/rattler-build/linux/*.sha256
|
|
if-no-files-found: error
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# macOS: DMG (Intel + Apple Silicon)
|
|
# ---------------------------------------------------------------------------
|
|
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
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Windows: .exe installer + .7z archive
|
|
# ---------------------------------------------------------------------------
|
|
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
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Create Gitea release from all platform artifacts
|
|
# ---------------------------------------------------------------------------
|
|
publish-release:
|
|
needs: [build-linux, build-macos, build-windows]
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
BUILD_TAG: ${{ github.ref_name || inputs.tag }}
|
|
|
|
steps:
|
|
- name: Download all artifacts
|
|
uses: https://github.com/actions/download-artifact@v3
|
|
with:
|
|
path: artifacts
|
|
|
|
- name: List all release artifacts
|
|
run: |
|
|
echo "=== All release artifacts ==="
|
|
find artifacts -type f | sort
|
|
|
|
- name: Collect release files
|
|
run: |
|
|
mkdir -p release
|
|
find artifacts -type f \( \
|
|
-name "*.AppImage" -o \
|
|
-name "*.deb" -o \
|
|
-name "*.dmg" -o \
|
|
-name "*.7z" -o \
|
|
-name "*.exe" -o \
|
|
-name "*SHA256*" -o \
|
|
-name "*.sha256" \
|
|
\) -exec cp {} release/ \;
|
|
echo "=== Release files ==="
|
|
ls -lah release/
|
|
|
|
- name: Create release
|
|
uses: https://gitea.com/actions/release-action@main
|
|
with:
|
|
files: release/*
|
|
title: "Kindred Create ${{ env.BUILD_TAG }}"
|
|
body: |
|
|
## Kindred Create ${{ env.BUILD_TAG }}
|
|
|
|
### Downloads
|
|
|
|
| Platform | File |
|
|
|----------|------|
|
|
| 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` |
|
|
|
|
SHA256 checksums are provided alongside each artifact.
|
|
prerelease: ${{ contains(github.ref_name, 'rc') || contains(github.ref_name, 'beta') || contains(github.ref_name, 'alpha') }}
|
|
api_key: ${{ secrets.RELEASE_TOKEN }}
|