mirror of
https://github.com/yeicor-3d/yet-another-cad-viewer.git
synced 2025-12-19 14:14:13 +01:00
87 lines
2.2 KiB
YAML
87 lines
2.2 KiB
YAML
on:
|
|
push:
|
|
pull_request:
|
|
workflow_call:
|
|
inputs:
|
|
ref:
|
|
type: "string"
|
|
required: true
|
|
description: "The ref (branch or tag) to build"
|
|
|
|
jobs:
|
|
|
|
build-frontend:
|
|
name: "Build frontend"
|
|
runs-on: "ubuntu-latest"
|
|
steps:
|
|
- uses: "actions/checkout@v6"
|
|
with:
|
|
ref: "${{ inputs.ref }}"
|
|
- uses: "actions/setup-node@v6"
|
|
with:
|
|
cache: "yarn"
|
|
- run: "yarn install"
|
|
- run: "yarn build"
|
|
- uses: "actions/upload-artifact@v6"
|
|
with:
|
|
name: "frontend"
|
|
path: "dist"
|
|
retention-days: 5
|
|
|
|
build-backend:
|
|
name: "Build backend"
|
|
runs-on: "ubuntu-latest"
|
|
steps:
|
|
- uses: "actions/checkout@v6"
|
|
with:
|
|
ref: "${{ inputs.ref }}"
|
|
- run: "pipx install poetry"
|
|
- uses: "actions/setup-python@v6"
|
|
with:
|
|
python-version: "3.13"
|
|
cache: "poetry"
|
|
- run: "poetry lock"
|
|
- run: "poetry install"
|
|
- run: "poetry build" # Skips building frontend (not using task)
|
|
|
|
build-logo:
|
|
name: "Build logo"
|
|
runs-on: "ubuntu-latest"
|
|
steps:
|
|
- uses: "actions/checkout@v6"
|
|
with:
|
|
ref: "${{ inputs.ref }}"
|
|
- run: "pipx install poetry"
|
|
- uses: "actions/setup-python@v6"
|
|
with:
|
|
python-version: "3.13"
|
|
cache: "poetry"
|
|
- run: "poetry lock"
|
|
- run: "poetry install"
|
|
- run: "poetry run python yacv_server/logo.py"
|
|
- uses: "actions/upload-artifact@v6"
|
|
with:
|
|
name: "logo"
|
|
path: "assets/logo_build"
|
|
retention-days: 5
|
|
|
|
build-example:
|
|
name: "Build example"
|
|
runs-on: "ubuntu-latest"
|
|
steps:
|
|
- uses: "actions/checkout@v6"
|
|
with:
|
|
ref: "${{ inputs.ref }}"
|
|
- run: "pipx install poetry"
|
|
- uses: "actions/setup-python@v6"
|
|
with:
|
|
python-version: "3.13"
|
|
cache: "poetry"
|
|
- run: "poetry lock"
|
|
- run: "poetry install"
|
|
- run: "YACV_DISABLE_SERVER=true poetry run python example/object.py"
|
|
- uses: "actions/upload-artifact@v6"
|
|
with:
|
|
name: "example"
|
|
path: "export"
|
|
retention-days: 5 |