phase 1: copy Kindred-only files onto upstream/main (FreeCAD 1.2.0-dev)
Wholesale copy of all Kindred Create additions that don't conflict with upstream FreeCAD code: - kindred-icons/ (1444 Catppuccin Mocha SVG icon overrides) - src/Mod/Create/ (Kindred Create workbench) - src/Gui/ Kindred source files (FileOrigin, OriginManager, OriginSelectorWidget, CommandOrigin, BreadcrumbToolBar, EditingContext) - src/Gui/Icons/ (Kindred branding and silo icons) - src/Gui/PreferencePacks/KindredCreate/ - src/Gui/Stylesheets/ (KindredCreate.qss, images_dark-light/) - package/ (rattler-build recipe) - docs/ (architecture, guides, specifications) - .gitea/ (CI workflows, issue templates) - mods/silo, mods/ztools submodules - .gitmodules (Kindred submodule URLs) - resources/ (kindred-create.desktop, kindred-create.xml) - banner-logo-light.png, CONTRIBUTING.md
This commit is contained in:
146
.gitea/workflows/build.yml
Normal file
146
.gitea/workflows/build.yml
Normal file
@@ -0,0 +1,146 @@
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
name: Build and Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
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_COMPILERCHECK: "content"
|
||||
CCACHE_BASEDIR: ${{ github.workspace }}
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
NODE_EXTRA_CA_CERTS: /etc/ssl/certs/ca-certificates.crt
|
||||
|
||||
steps:
|
||||
- name: Trust Cloudflare origin CA
|
||||
run: |
|
||||
apt-get update -qq
|
||||
apt-get install -y --no-install-recommends ca-certificates
|
||||
update-ca-certificates
|
||||
|
||||
- name: Free disk space
|
||||
run: |
|
||||
echo "=== Disk usage before cleanup ==="
|
||||
df -h /
|
||||
rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache 2>/dev/null || true
|
||||
rm -rf /usr/local/share/boost /usr/share/swift 2>/dev/null || true
|
||||
apt-get autoremove -y 2>/dev/null || true
|
||||
apt-get clean 2>/dev/null || true
|
||||
echo "=== Disk usage after cleanup ==="
|
||||
df -h /
|
||||
|
||||
- name: Install system prerequisites
|
||||
run: |
|
||||
apt-get update -qq
|
||||
apt-get install -y --no-install-recommends \
|
||||
ca-certificates curl git xvfb xauth openssl sudo \
|
||||
libgl1-mesa-dev libglu1-mesa-dev libx11-dev libxkbcommon-dev \
|
||||
libxcb-xkb-dev libfontconfig1-dev
|
||||
|
||||
- name: Checkout repository
|
||||
uses: https://git.kindred-systems.com/actions/checkout.git@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Fetch latest tag (for git describe)
|
||||
run: |
|
||||
latest_tag=$(git ls-remote --tags --sort=-v:refname origin 'refs/tags/v*' | grep -v '\^{}' | head -n1 | awk '{print $2}')
|
||||
if [ -n "$latest_tag" ]; then
|
||||
git fetch --no-recurse-submodules --force --depth=1 origin "+${latest_tag}:${latest_tag}"
|
||||
fi
|
||||
|
||||
- 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: Run Kindred addon tests (pure logic, no build needed)
|
||||
timeout-minutes: 2
|
||||
run: python3 tests/run_kindred_tests.py
|
||||
|
||||
- name: Restore ccache
|
||||
id: ccache-restore
|
||||
uses: https://git.kindred-systems.com/actions/cache.git/restore@v4
|
||||
with:
|
||||
path: /tmp/ccache-kindred-create
|
||||
key: ccache-build-${{ github.ref_name }}-${{ github.run_id }}
|
||||
restore-keys: |
|
||||
ccache-build-${{ github.ref_name }}-
|
||||
ccache-build-main-
|
||||
|
||||
- name: Prepare ccache
|
||||
run: |
|
||||
mkdir -p $CCACHE_DIR
|
||||
pixi run ccache -z
|
||||
pixi run ccache -p
|
||||
|
||||
- name: Configure (CMake)
|
||||
run: pixi run cmake --preset conda-linux-release
|
||||
|
||||
- name: Build
|
||||
run: pixi run cmake --build build/release -j$(nproc)
|
||||
|
||||
- name: Show ccache statistics
|
||||
run: pixi run ccache -s
|
||||
|
||||
- name: Save ccache
|
||||
if: always()
|
||||
uses: https://git.kindred-systems.com/actions/cache.git/save@v4
|
||||
with:
|
||||
path: /tmp/ccache-kindred-create
|
||||
key: ccache-build-${{ github.ref_name }}-${{ github.run_id }}
|
||||
|
||||
- name: Run C++ unit tests
|
||||
continue-on-error: true
|
||||
timeout-minutes: 15
|
||||
run: |
|
||||
export CTEST_DISCOVERY_TIMEOUT=60
|
||||
pixi run xvfb-run -a ctest --test-dir build/release \
|
||||
--output-on-failure \
|
||||
--timeout 120 \
|
||||
--exclude-regex "Assembly_tests" \
|
||||
2>&1 || true
|
||||
|
||||
- name: Install
|
||||
run: pixi run cmake --install build/release --prefix build/release/install
|
||||
|
||||
- name: Run Python CLI tests
|
||||
timeout-minutes: 10
|
||||
run: pixi run timeout 300 build/release/bin/FreeCADCmd -t 0 || true
|
||||
|
||||
- name: Run GUI tests (headless)
|
||||
timeout-minutes: 10
|
||||
run: pixi run timeout 300 xvfb-run -a build/release/bin/FreeCAD -t 0 || true
|
||||
|
||||
- name: Package build artifacts
|
||||
run: |
|
||||
ARTIFACT_NAME="kindred-create-$(git describe --tags --always)-linux-x86_64"
|
||||
cd build/release
|
||||
cp -a install "${ARTIFACT_NAME}"
|
||||
tar -cJf "${ARTIFACT_NAME}.tar.xz" "${ARTIFACT_NAME}"
|
||||
sha256sum "${ARTIFACT_NAME}.tar.xz" > "${ARTIFACT_NAME}.tar.xz.sha256"
|
||||
echo "ARTIFACT_NAME=${ARTIFACT_NAME}" >> $GITHUB_ENV
|
||||
|
||||
- name: Upload build artifact
|
||||
uses: https://git.kindred-systems.com/actions/upload-artifact.git@v3
|
||||
with:
|
||||
name: ${{ env.ARTIFACT_NAME }}
|
||||
path: |
|
||||
build/release/*.tar.xz
|
||||
build/release/*.sha256
|
||||
retention-days: 14
|
||||
Reference in New Issue
Block a user