Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ on:
package:
type: boolean
default: false
# Branch, tag or SHA to build; empty builds the ref that triggered the run.
ref:
type: string
default: ""

permissions:
contents: read
Expand All @@ -36,6 +40,8 @@ jobs:
- name: Free disk space
run: sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL
- uses: actions/checkout@v5
with:
ref: ${{ inputs.ref }}
# hashFiles and the runner context only exist inside steps.
- name: Cache keys
run: |
Expand Down
72 changes: 64 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# A version tag (v1.2.3, or v1.2.3-rc1 for a pre-release) builds every download from source, runs the
# Easiest: Actions > Release > Run workflow on main. It raises the version in CMakeLists.txt by the chosen
# step (default: the last number, 0.2.5.5 -> 0.2.5.6), commits that to main, tags it, then builds and drafts
# the release below. Pushing a version tag by hand still works. A version tag (v1.2.3, or v1.2.3-rc1 for a pre-release) builds every download from source, runs the
# tests on those builds, and attaches them to a draft GitHub Release; the release text is reviewed before it is published.
# Only DeliciousMeatPop/Venture-UnknownSourceEdition builds releases.
name: Release
Expand All @@ -9,6 +11,11 @@ on:
# Run on a tag ("Use workflow from" > Tags) to rebuild that release's downloads.
workflow_dispatch:
inputs:
bump:
description: "Version step when run on main (ignored on a tag). build: 0.2.5.5 to 0.2.5.6, patch: 0.2.6.0, minor: 0.3.0.0, major: 1.0.0.0"
type: choice
options: [build, patch, minor, major]
default: build
skip_upstream_check:
description: "Skip the check for newer upstream Venture changes"
type: boolean
Expand Down Expand Up @@ -88,35 +95,84 @@ jobs:
steps:
- run: 'echo "Approved - building without upstream newer changes."'

windows:
# Manual run on main only: raise the version, commit it and tag it. Tags pushed with the workflow's own
# token do not start another run, so this run builds that tag itself (the ref input below).
# If main is protected, allow GitHub Actions to push to it, or this job fails before anything is built.
bump:
needs: [upstream-check, upstream-confirm]
if: ${{ !cancelled() && github.repository == 'DeliciousMeatPop/Venture-UnknownSourceEdition' && needs.upstream-check.result == 'success' && (needs.upstream-confirm.result == 'success' || needs.upstream-confirm.result == 'skipped') }}
if: ${{ !cancelled() && github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main' && github.repository == 'DeliciousMeatPop/Venture-UnknownSourceEdition' && needs.upstream-check.result == 'success' && (needs.upstream-confirm.result == 'success' || needs.upstream-confirm.result == 'skipped') }}
runs-on: ubuntu-24.04
permissions:
contents: write
outputs:
tag: ${{ steps.next.outputs.tag }}
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Next version
id: next
env:
BUMP: ${{ inputs.bump }}
run: |
cur=$(sed -n 's/^project(Venture VERSION \([0-9.]*\).*/\1/p' CMakeLists.txt | head -1)
IFS=. read -r a b c d <<< "$cur"
a=${a:-0}; b=${b:-0}; c=${c:-0}; d=${d:-0}
case "$BUMP" in
major) a=$((a+1)); b=0; c=0; d=0 ;;
minor) b=$((b+1)); c=0; d=0 ;;
patch) c=$((c+1)); d=0 ;;
*) d=$((d+1)) ;;
esac
next="$a.$b.$c.$d"
if git rev-parse -q --verify "refs/tags/v$next" >/dev/null; then
echo "Tag v$next already exists"; exit 1
fi
sed -i "s/^project(Venture VERSION [0-9.]*/project(Venture VERSION $next/" CMakeLists.txt
grep -q "VERSION $next " CMakeLists.txt || { echo "Version edit failed"; exit 1; }
echo "tag=v$next" >> "$GITHUB_OUTPUT"
echo "Version $cur -> $next ($BUMP)" | tee -a "$GITHUB_STEP_SUMMARY"
- name: Commit and tag
env:
TAG: ${{ steps.next.outputs.tag }}
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git commit -am "Release ${TAG#v}"
git tag "$TAG"
git push origin HEAD:main "refs/tags/$TAG"
windows:
needs: [upstream-check, upstream-confirm, bump]
if: ${{ !cancelled() && github.repository == 'DeliciousMeatPop/Venture-UnknownSourceEdition' && needs.upstream-check.result == 'success' && (needs.upstream-confirm.result == 'success' || needs.upstream-confirm.result == 'skipped') && (needs.bump.result == 'success' || needs.bump.result == 'skipped') }}
uses: ./.github/workflows/windows.yml
with:
test: true
package: true
ref: ${{ needs.bump.outputs.tag }}
linux:
needs: [upstream-check, upstream-confirm]
if: ${{ !cancelled() && github.repository == 'DeliciousMeatPop/Venture-UnknownSourceEdition' && needs.upstream-check.result == 'success' && (needs.upstream-confirm.result == 'success' || needs.upstream-confirm.result == 'skipped') }}
needs: [upstream-check, upstream-confirm, bump]
if: ${{ !cancelled() && github.repository == 'DeliciousMeatPop/Venture-UnknownSourceEdition' && needs.upstream-check.result == 'success' && (needs.upstream-confirm.result == 'success' || needs.upstream-confirm.result == 'skipped') && (needs.bump.result == 'success' || needs.bump.result == 'skipped') }}
uses: ./.github/workflows/linux.yml
with:
test: true
package: true
ref: ${{ needs.bump.outputs.tag }}

publish:
needs: [windows, linux]
needs: [bump, windows, linux]
# Stated explicitly: the optional upstream-confirm job above is skipped when upstream has nothing newer,
# and a skipped job anywhere in the chain would otherwise skip this one too.
if: ${{ !cancelled() && needs.windows.result == 'success' && needs.linux.result == 'success' }}
runs-on: ubuntu-24.04
permissions:
contents: write
env:
TAG: ${{ github.ref_name }}
TAG: ${{ needs.bump.outputs.tag || github.ref_name }}
GH_TOKEN: ${{ github.token }}
steps:
- name: Tag only
run: '[[ "$GITHUB_REF" == refs/tags/v* ]] || { echo "Run this on a v* tag"; exit 1; }'
run: '[[ "$TAG" == v* ]] || { echo "Run this on main (it makes the tag) or on a v* tag"; exit 1; }'
- uses: actions/download-artifact@v4
with:
path: assets
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ on:
package:
type: boolean
default: false
# Branch, tag or SHA to build; empty builds the ref that triggered the run.
ref:
type: string
default: ""

permissions:
contents: read
Expand All @@ -31,6 +35,8 @@ jobs:
- name: Long paths
run: git config --global core.longpaths true
- uses: actions/checkout@v5
with:
ref: ${{ inputs.ref }}
# hashFiles only exists inside steps.
- name: Cache keys
shell: bash
Expand Down
23 changes: 23 additions & 0 deletions tools/venture-debug.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
@echo off
rem Launches venture.exe from this folder with GPU breadcrumb diagnostics on.
rem Put this file next to venture.exe, double-click it, and reproduce the crash.
cd /d "%~dp0"

if not exist "venture.exe" (
echo venture.exe not found in %~dp0
echo Put this file in the same folder as venture.exe.
pause
exit /b 1
)

set VENTURE_VULKAN_BREADCRUMBS=1
set VENTURE_VULKAN_BREADCRUMB_DIR=%~dp0breadcrumbs
if not exist "%VENTURE_VULKAN_BREADCRUMB_DIR%" mkdir "%VENTURE_VULKAN_BREADCRUMB_DIR%"

echo Starting Venture with breadcrumbs enabled...
echo Dumps will go to: %VENTURE_VULKAN_BREADCRUMB_DIR%
venture.exe %*

echo.
echo Venture exited. Send the log plus the "breadcrumbs" folder next to this file.
pause
Loading