Skip to content

Commit b3394dd

Browse files
committed
Refactor CI/CD workflows and versioning
Simplifies and consolidates GitHub Actions workflows for CI and release automation, removing continuous-building.yml and updating documentation to reflect new release procedures. Versioning is now tag-driven with improved SemVer metadata, and CMake version logic is refactored into VibeyVersion.cmake. Adds platform-specific build/package steps, updates VSCode settings for CMake, and revises changelog and build instructions for clarity.
1 parent 50be6d6 commit b3394dd

236 files changed

Lines changed: 145596 additions & 633 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 50 additions & 166 deletions
Original file line numberDiff line numberDiff line change
@@ -1,213 +1,97 @@
1-
name: CI/CD Pipeline
1+
name: CI
22

33
on:
4+
pull_request:
45
push:
56
branches: [main, develop]
6-
tags: ['v*']
7-
pull_request:
8-
branches: [main]
97

108
env:
119
BUILD_TYPE: Release
10+
EMBREE_VERSION: 4.4.0
11+
TBB_VERSION: 2021.11.0
1212

1313
jobs:
14-
# ==========================================================================
15-
# Version Extraction
16-
# ==========================================================================
17-
version:
18-
name: Extract Version
19-
runs-on: ubuntu-latest
20-
outputs:
21-
version: ${{ steps.version.outputs.version }}
22-
version_full: ${{ steps.version.outputs.version_full }}
23-
steps:
24-
- uses: actions/checkout@v4
25-
with:
26-
fetch-depth: 0
27-
28-
- name: Get version from VERSION file
29-
id: version
30-
run: |
31-
VERSION=$(cat VERSION | tr -d '\n\r')
32-
echo "version=$VERSION" >> $GITHUB_OUTPUT
33-
34-
if [[ "${{ github.ref }}" == refs/tags/v* ]]; then
35-
TAG_VERSION="${GITHUB_REF#refs/tags/v}"
36-
echo "version_full=$TAG_VERSION" >> $GITHUB_OUTPUT
37-
elif [[ "${{ github.ref }}" == refs/heads/* ]]; then
38-
BRANCH="${GITHUB_REF#refs/heads/}"
39-
SHORT_SHA="${GITHUB_SHA::7}"
40-
echo "version_full=$VERSION-$BRANCH-$SHORT_SHA" >> $GITHUB_OUTPUT
41-
else
42-
echo "version_full=$VERSION-dev" >> $GITHUB_OUTPUT
43-
fi
44-
45-
# ==========================================================================
46-
# Build Jobs
47-
# ==========================================================================
4814
build:
4915
name: Build (${{ matrix.os }})
50-
needs: version
5116
runs-on: ${{ matrix.os }}
5217
strategy:
5318
fail-fast: false
5419
matrix:
55-
include:
56-
- os: ubuntu-22.04
57-
artifact_name: vibeymaptools-linux
58-
archive_ext: .tar.gz
59-
- os: windows-2022
60-
artifact_name: vibeymaptools-windows
61-
archive_ext: .zip
62-
- os: macos-14
63-
artifact_name: vibeymaptools-macos
64-
archive_ext: .tar.gz
20+
os: [ubuntu-22.04, macos-14, windows-2022]
6521

6622
steps:
6723
- uses: actions/checkout@v4
6824
with:
6925
submodules: recursive
7026
fetch-depth: 0
7127

72-
# ---- Linux Setup ----
73-
- name: 'Linux: Install dependencies'
28+
- name: Linux dependencies
7429
if: startsWith(matrix.os, 'ubuntu-')
7530
run: |
7631
sudo apt update
77-
sudo apt install -y qt6-base-dev libgl1-mesa-dev libtbb-dev libembree-dev
32+
sudo apt install -y qt6-base-dev libgl1-mesa-dev
7833
79-
# ---- macOS Setup ----
80-
- name: 'macOS: Install Qt6'
34+
- name: Linux Embree and TBB
35+
if: startsWith(matrix.os, 'ubuntu-')
36+
run: |
37+
mkdir -p deps/embree
38+
curl -L "https://github.com/RenderKit/embree/releases/download/v${{ env.EMBREE_VERSION }}/embree-${{ env.EMBREE_VERSION }}.x86_64.linux.tar.gz" -o deps/embree.tgz
39+
tar xf deps/embree.tgz -C deps/embree
40+
curl -L "https://github.com/uxlfoundation/oneTBB/releases/download/v${{ env.TBB_VERSION }}/oneapi-tbb-${{ env.TBB_VERSION }}-lin.tgz" -o deps/tbb.tgz
41+
tar xf deps/tbb.tgz -C deps
42+
echo "CMAKE_PREFIX_PATH=${PWD}/deps/embree;${PWD}/deps/oneapi-tbb-${{ env.TBB_VERSION }}" >> $GITHUB_ENV
43+
44+
- name: macOS Qt
8145
if: startsWith(matrix.os, 'macos-')
8246
uses: jurplel/install-qt-action@v4
8347
with:
84-
version: 6.4.3
48+
version: 6.7.0
8549

86-
- name: 'macOS: Install dependencies'
50+
- name: macOS dependencies
8751
if: startsWith(matrix.os, 'macos-')
8852
run: |
89-
brew install tbb embree
53+
brew update
54+
brew install embree tbb
55+
PREFIXES="$(brew --prefix embree);$(brew --prefix tbb)"
56+
if [ -n "${Qt6_DIR}" ]; then
57+
PREFIXES="${PREFIXES};${Qt6_DIR}"
58+
fi
59+
echo "CMAKE_PREFIX_PATH=${PREFIXES}" >> $GITHUB_ENV
9060
91-
# ---- Windows Setup ----
92-
- name: 'Windows: Setup MSVC'
61+
- name: Windows MSVC
9362
if: startsWith(matrix.os, 'windows-')
9463
uses: ilammy/msvc-dev-cmd@v1
9564

96-
- name: 'Windows: Install Qt6'
65+
- name: Windows Qt
9766
if: startsWith(matrix.os, 'windows-')
9867
uses: jurplel/install-qt-action@v4
9968
with:
10069
version: 6.7.0
10170

102-
# ---- Build ----
103-
- name: Configure CMake
71+
- name: Windows Embree and TBB
72+
if: startsWith(matrix.os, 'windows-')
73+
shell: pwsh
10474
run: |
105-
cmake -B build -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }}
75+
$ErrorActionPreference = "Stop"
76+
$deps = Join-Path $env:GITHUB_WORKSPACE "deps"
77+
New-Item -ItemType Directory -Force -Path $deps | Out-Null
78+
$embreeZip = Join-Path $deps "embree.zip"
79+
Invoke-WebRequest "https://github.com/RenderKit/embree/releases/download/v${{ env.EMBREE_VERSION }}/embree-${{ env.EMBREE_VERSION }}.x64.windows.zip" -OutFile $embreeZip
80+
$embreeRoot = Join-Path $deps "embree"
81+
New-Item -ItemType Directory -Force -Path $embreeRoot | Out-Null
82+
Expand-Archive -Path $embreeZip -DestinationPath $embreeRoot -Force
83+
$tbbZip = Join-Path $deps "tbb.zip"
84+
Invoke-WebRequest "https://github.com/uxlfoundation/oneTBB/releases/download/v${{ env.TBB_VERSION }}/oneapi-tbb-${{ env.TBB_VERSION }}-win.zip" -OutFile $tbbZip
85+
Expand-Archive -Path $tbbZip -DestinationPath $deps -Force
86+
$prefixes = @($embreeRoot, (Join-Path $deps "oneapi-tbb-${{ env.TBB_VERSION }}"))
87+
if ($env:Qt6_DIR) { $prefixes += $env:Qt6_DIR }
88+
"CMAKE_PREFIX_PATH=$($prefixes -join ';')" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding ascii
89+
90+
- name: Configure CMake
91+
run: cmake -B build -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DCMAKE_PREFIX_PATH="${{ env.CMAKE_PREFIX_PATH }}"
10692

10793
- name: Build
10894
run: cmake --build build --config ${{ env.BUILD_TYPE }} --parallel
10995

110-
- name: Run Tests
96+
- name: Test
11197
run: ctest --test-dir build --output-on-failure --build-config ${{ env.BUILD_TYPE }}
112-
113-
- name: Package
114-
run: cmake --build build --target package --config ${{ env.BUILD_TYPE }}
115-
116-
# ---- Upload Artifacts ----
117-
- name: Upload Artifact
118-
uses: actions/upload-artifact@v4
119-
with:
120-
name: ${{ matrix.artifact_name }}-${{ needs.version.outputs.version_full }}
121-
path: build/VibeyMapTools-*${{ matrix.archive_ext }}
122-
if-no-files-found: warn
123-
124-
# ==========================================================================
125-
# Release Job
126-
# ==========================================================================
127-
release:
128-
name: Create Release
129-
needs: [version, build]
130-
if: startsWith(github.ref, 'refs/tags/v')
131-
runs-on: ubuntu-latest
132-
permissions:
133-
contents: write
134-
135-
steps:
136-
- uses: actions/checkout@v4
137-
138-
- name: Download all artifacts
139-
uses: actions/download-artifact@v4
140-
with:
141-
path: artifacts
142-
143-
- name: Generate Release Notes
144-
id: notes
145-
run: |
146-
VERSION="${{ needs.version.outputs.version }}"
147-
cat << 'EOF' > release_notes.md
148-
# VibeyMapTools ${{ needs.version.outputs.version }}
149-
150-
## Downloads
151-
152-
| Platform | Download |
153-
|----------|----------|
154-
| Windows | `vibeymaptools-windows-${{ needs.version.outputs.version_full }}.zip` |
155-
| Linux | `vibeymaptools-linux-${{ needs.version.outputs.version_full }}.tar.gz` |
156-
| macOS | `vibeymaptools-macos-${{ needs.version.outputs.version_full }}.tar.gz` |
157-
158-
## What's New
159-
160-
See [CHANGELOG.md](https://github.com/${{ github.repository }}/blob/main/CHANGELOG.md) for details.
161-
162-
## Features
163-
164-
- GPU-accelerated raytracing (OptiX)
165-
- Intel OIDN denoising
166-
- Stochastic light sampling
167-
- Incremental lighting
168-
- HDR lightmap support
169-
EOF
170-
171-
- name: Create GitHub Release
172-
uses: softprops/action-gh-release@v2
173-
with:
174-
name: VibeyMapTools ${{ needs.version.outputs.version }}
175-
body_path: release_notes.md
176-
draft: true
177-
prerelease: ${{ contains(github.ref, '-alpha') || contains(github.ref, '-beta') || contains(github.ref, '-rc') }}
178-
files: |
179-
artifacts/**/*
180-
181-
# ==========================================================================
182-
# Nightly Build
183-
# ==========================================================================
184-
nightly:
185-
name: Nightly Build
186-
if: github.event_name == 'schedule' || (github.event_name == 'push' && github.ref == 'refs/heads/main')
187-
needs: [version, build]
188-
runs-on: ubuntu-latest
189-
permissions:
190-
contents: write
191-
192-
steps:
193-
- uses: actions/checkout@v4
194-
195-
- name: Download all artifacts
196-
uses: actions/download-artifact@v4
197-
with:
198-
path: artifacts
199-
200-
- name: Update Nightly Release
201-
uses: andelf/nightly-release@main
202-
env:
203-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
204-
with:
205-
tag_name: nightly
206-
name: 'Nightly Build'
207-
prerelease: true
208-
body: |
209-
Automated nightly build from main branch.
210-
Version: ${{ needs.version.outputs.version_full }}
211-
Commit: ${{ github.sha }}
212-
files: |
213-
artifacts/**/*

.github/workflows/continuous-building.yml

Lines changed: 0 additions & 132 deletions
This file was deleted.

0 commit comments

Comments
 (0)