- Remove all GitHub Actions workflows (21 files) - Remove GitHub problem matchers - Add Gitea build workflow (push/PR to main) - Add Gitea release workflow (version tags) - Use pixi for dependency management - Configure ccache for build acceleration - Use 16 build threads for debian-host runner - Update .gitignore to allow .gitea/ directory
71 lines
1.8 KiB
YAML
71 lines
1.8 KiB
YAML
# 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: debian-host
|
|
|
|
env:
|
|
CCACHE_DIR: /var/cache/ccache/kindred-create
|
|
CCACHE_COMPRESS: "true"
|
|
CCACHE_COMPRESSLEVEL: "5"
|
|
CCACHE_MAXSIZE: "2G"
|
|
CCACHE_NODIRECT: "true"
|
|
CCACHE_NOHASHDIR: "true"
|
|
CCACHE_NOINODECACHE: "true"
|
|
CCACHE_SLOPPINESS: "include_file_ctime,include_file_mtime,pch_defines,time_macros"
|
|
CCACHE_COMPILERCHECK: "%compiler% -dumpfullversion -dumpversion"
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: https://github.com/actions/checkout@v4
|
|
with:
|
|
submodules: recursive
|
|
fetch-depth: 0
|
|
|
|
- name: Install pixi if needed
|
|
shell: bash
|
|
run: |
|
|
if ! command -v pixi &> /dev/null; then
|
|
curl -fsSL https://pixi.sh/install.sh | bash
|
|
echo "$HOME/.pixi/bin" >> $GITHUB_PATH
|
|
export PATH="$HOME/.pixi/bin:$PATH"
|
|
fi
|
|
pixi --version
|
|
|
|
- name: Prepare ccache
|
|
shell: bash
|
|
run: |
|
|
sudo mkdir -p $CCACHE_DIR
|
|
sudo chown $(whoami):$(whoami) $CCACHE_DIR
|
|
pixi run ccache -z
|
|
pixi run ccache -p
|
|
|
|
- name: Configure (CMake)
|
|
run: pixi run configure-release
|
|
|
|
- name: Build
|
|
run: pixi run cmake --build build/release -j16
|
|
|
|
- name: Show ccache statistics
|
|
run: pixi run ccache -s
|
|
|
|
- name: Run C++ unit tests
|
|
run: pixi run test-release
|
|
|
|
- name: Install
|
|
run: pixi run install-release
|
|
|
|
- name: Run Python CLI tests
|
|
run: pixi run build/release/bin/FreeCADCmd -t 0 || true
|
|
|
|
- name: Run GUI tests (headless)
|
|
run: pixi run xvfb-run build/release/bin/FreeCAD -t 0 || true
|