splitting up builds

This commit is contained in:
phoenixbackrooms
2025-09-13 11:09:26 +03:00
committed by Phoenix
parent fe8c8230d1
commit 0b50dd47c1
5 changed files with 579 additions and 0 deletions

149
.github/workflows/build-flumi.yml vendored Normal file
View File

@@ -0,0 +1,149 @@
name: Build Flumi
on:
push:
paths:
- 'flumi/**'
- '.github/workflows/build-flumi.yml'
pull_request:
paths:
- 'flumi/**'
- '.github/workflows/build-flumi.yml'
workflow_dispatch:
inputs:
use_latest_gdextension:
description: 'Use latest GDExtension artifacts from main branch'
required: false
default: 'false'
type: boolean
jobs:
build-flumi:
name: Build Flumi
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
platform: linux
godot-version: "4.4.1"
export-preset: "Linux"
- os: windows-latest
platform: windows
godot-version: "4.4.1"
export-preset: "Windows Desktop"
steps:
- uses: actions/checkout@v4
- name: Download GDExtension artifacts (if available)
if: github.event.inputs.use_latest_gdextension == 'true'
uses: dawidd6/action-download-artifact@v6
with:
workflow: build-gdextension.yml
name: gdextension-${{ matrix.platform }}
path: gdextension-artifacts
if_no_artifact_found: warn
continue-on-error: true
- name: Cache Godot installation
uses: actions/cache@v4
with:
path: |
~/.local/share/godot
~/AppData/Roaming/Godot
key: ${{ runner.os }}-godot-${{ matrix.godot-version }}
- name: Setup Godot
uses: chickensoft-games/setup-godot@v2.3.0
with:
version: ${{ matrix.godot-version }}
include-templates: true
- name: Prepare GDExtension addon (if artifacts available)
if: hashFiles('gdextension-artifacts/*') != ''
shell: bash
run: |
mkdir -p flumi/addons/gurt-protocol/bin/${{ matrix.platform }}
# Copy GDExtension files
cp gdextension-artifacts/gurt_godot.gdextension flumi/addons/gurt-protocol/
cp gdextension-artifacts/plugin.cfg flumi/addons/gurt-protocol/
cp gdextension-artifacts/plugin.gd flumi/addons/gurt-protocol/
# Copy the built library
case "${{ matrix.platform }}" in
windows)
cp gdextension-artifacts/gurt_godot.dll flumi/addons/gurt-protocol/bin/${{ matrix.platform }}/
;;
linux)
cp gdextension-artifacts/libgurt_godot.so flumi/addons/gurt-protocol/bin/${{ matrix.platform }}/
;;
esac
- name: Cache Godot import files
uses: actions/cache@v4
with:
path: |
flumi/.godot/
key: ${{ runner.os }}-flumi-import-${{ hashFiles('flumi/**/*.tscn', 'flumi/**/*.tres', 'flumi/**/*.gd') }}
restore-keys: |
${{ runner.os }}-flumi-import-
- name: Import Godot project
run: |
cd flumi
godot --headless --import
- name: Verify export presets
shell: bash
run: |
cd flumi
echo "Available export presets:"
if [ -f export_presets.cfg ]; then
grep -E '^\[preset\.' export_presets.cfg || echo "No presets found in config"
else
echo "export_presets.cfg not found"
fi
- name: Export Flumi
shell: bash
run: |
cd flumi
mkdir -p ../flumi-builds/${{ matrix.platform }}
case "${{ matrix.platform }}" in
windows)
echo "Exporting for Windows..."
godot --headless --export-release "${{ matrix.export-preset }}" ../flumi-builds/${{ matrix.platform }}/Flumi.exe --verbose || {
echo "Export failed with exit code $?"
echo "Trying without --verbose flag..."
godot --headless --export-release "${{ matrix.export-preset }}" ../flumi-builds/${{ matrix.platform }}/Flumi.exe
}
;;
linux)
echo "Exporting for Linux..."
godot --headless --export-release "${{ matrix.export-preset }}" ../flumi-builds/${{ matrix.platform }}/Flumi --verbose || {
echo "Export failed with exit code $?"
echo "Trying without --verbose flag..."
godot --headless --export-release "${{ matrix.export-preset }}" ../flumi-builds/${{ matrix.platform }}/Flumi
}
;;
esac
# Verify the export was successful
if [ -f "../flumi-builds/${{ matrix.platform }}/Flumi${{ matrix.platform == 'windows' && '.exe' || '' }}" ]; then
echo "Export successful!"
ls -la ../flumi-builds/${{ matrix.platform }}/
else
echo "Export failed - no output file found"
exit 1
fi
- name: Upload Flumi artifacts
uses: actions/upload-artifact@v4
with:
name: flumi-${{ matrix.platform }}
path: flumi-builds/${{ matrix.platform }}
retention-days: 30

78
.github/workflows/build-gdextension.yml vendored Normal file
View File

@@ -0,0 +1,78 @@
name: Build GDExtension
on:
push:
paths:
- 'protocol/gdextension/**'
- 'protocol/library/**'
- '.github/workflows/build-gdextension.yml'
pull_request:
paths:
- 'protocol/gdextension/**'
- 'protocol/library/**'
- '.github/workflows/build-gdextension.yml'
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
build-gdextension:
name: Build GDExtension
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
platform: linux
lib_name: libgurt_godot.so
- os: windows-latest
target: x86_64-pc-windows-msvc
platform: windows
lib_name: gurt_godot.dll
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Cache cargo dependencies
uses: actions/cache@v4
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
protocol/target/
key: ${{ runner.os }}-gdextension-${{ hashFiles('protocol/gdextension/Cargo.lock', 'protocol/library/Cargo.toml') }}
restore-keys: |
${{ runner.os }}-gdextension-
${{ runner.os }}-cargo-
- name: Build GDExtension
run: |
cd protocol/gdextension
cargo build --release --target ${{ matrix.target }}
- name: Prepare artifacts
shell: bash
run: |
mkdir -p artifacts/${{ matrix.platform }}
cp protocol/gdextension/target/${{ matrix.target }}/release/${{ matrix.lib_name }} artifacts/${{ matrix.platform }}/
# Also copy the extension configuration files
cp protocol/gdextension/gurt_godot.gdextension artifacts/${{ matrix.platform }}/
cp protocol/gdextension/plugin.cfg artifacts/${{ matrix.platform }}/
cp protocol/gdextension/plugin.gd artifacts/${{ matrix.platform }}/
- name: Upload GDExtension artifacts
uses: actions/upload-artifact@v4
with:
name: gdextension-${{ matrix.platform }}
path: artifacts/${{ matrix.platform }}
retention-days: 30

108
.github/workflows/build-gurtca.yml vendored Normal file
View File

@@ -0,0 +1,108 @@
name: Build GurtCA
on:
push:
paths:
- 'protocol/gurtca/**'
- 'protocol/library/**'
- '.github/workflows/build-gurtca.yml'
pull_request:
paths:
- 'protocol/gurtca/**'
- 'protocol/library/**'
- '.github/workflows/build-gurtca.yml'
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
build-gurtca:
name: Build GurtCA
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
platform: linux
ext: ""
- os: windows-latest
target: x86_64-pc-windows-msvc
platform: windows
ext: ".exe"
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Cache cargo dependencies
uses: actions/cache@v4
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
protocol/target/
key: ${{ runner.os }}-gurtca-${{ hashFiles('protocol/gurtca/Cargo.lock', 'protocol/library/Cargo.toml') }}
restore-keys: |
${{ runner.os }}-gurtca-
${{ runner.os }}-cargo-
- name: Install OpenSSL (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y pkg-config libssl-dev
- name: Cache vcpkg (Windows)
if: matrix.os == 'windows-latest'
uses: actions/cache@v4
with:
path: C:\vcpkg
key: ${{ runner.os }}-vcpkg-openssl
restore-keys: |
${{ runner.os }}-vcpkg-
- name: Install OpenSSL (Windows)
if: matrix.os == 'windows-latest'
run: |
if (!(Test-Path "C:\vcpkg")) {
git clone https://github.com/Microsoft/vcpkg.git C:\vcpkg
cd C:\vcpkg
.\bootstrap-vcpkg.bat
.\vcpkg.exe integrate install
}
cd C:\vcpkg
.\vcpkg.exe install openssl:x64-windows-static-md
shell: pwsh
- name: Set OpenSSL environment variables (Windows)
if: matrix.os == 'windows-latest'
shell: pwsh
run: |
echo "VCPKG_ROOT=C:\vcpkg" >> $env:GITHUB_ENV
echo "OPENSSL_DIR=C:\vcpkg\installed\x64-windows-static-md" >> $env:GITHUB_ENV
- name: Build GurtCA
run: |
cd protocol/gurtca
cargo build --release --target ${{ matrix.target }}
- name: Prepare artifacts
shell: bash
run: |
mkdir -p artifacts/${{ matrix.platform }}
cp protocol/gurtca/target/${{ matrix.target }}/release/gurtca${{ matrix.ext }} artifacts/${{ matrix.platform }}/
- name: Upload GurtCA artifacts
uses: actions/upload-artifact@v4
with:
name: gurtca-${{ matrix.platform }}
path: artifacts/${{ matrix.platform }}
retention-days: 30

73
.github/workflows/build-gurty.yml vendored Normal file
View File

@@ -0,0 +1,73 @@
name: Build Gurty
on:
push:
paths:
- 'protocol/cli/**'
- 'protocol/library/**'
- '.github/workflows/build-gurty.yml'
pull_request:
paths:
- 'protocol/cli/**'
- 'protocol/library/**'
- '.github/workflows/build-gurty.yml'
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
build-gurty:
name: Build Gurty
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
platform: linux
ext: ""
- os: windows-latest
target: x86_64-pc-windows-msvc
platform: windows
ext: ".exe"
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Cache cargo dependencies
uses: actions/cache@v4
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
protocol/target/
key: ${{ runner.os }}-gurty-${{ hashFiles('protocol/cli/Cargo.lock', 'protocol/library/Cargo.toml') }}
restore-keys: |
${{ runner.os }}-gurty-
${{ runner.os }}-cargo-
- name: Build Gurty
run: |
cd protocol/cli
cargo build --release --target ${{ matrix.target }}
- name: Prepare artifacts
shell: bash
run: |
mkdir -p artifacts/${{ matrix.platform }}
cp protocol/cli/target/${{ matrix.target }}/release/gurty${{ matrix.ext }} artifacts/${{ matrix.platform }}/
- name: Upload Gurty artifacts
uses: actions/upload-artifact@v4
with:
name: gurty-${{ matrix.platform }}
path: artifacts/${{ matrix.platform }}
retention-days: 30

171
.github/workflows/package-release.yml vendored Normal file
View File

@@ -0,0 +1,171 @@
name: Package Release
on:
push:
tags:
- 'v*'
workflow_dispatch:
inputs:
tag:
description: 'Release tag'
required: true
default: 'v0.1.0'
download_artifacts:
description: 'Download latest artifacts from main branch'
required: false
default: 'true'
type: boolean
jobs:
package-release:
name: Package Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download GurtCA artifacts
if: github.event.inputs.download_artifacts == 'true' || github.event_name == 'push'
uses: dawidd6/action-download-artifact@v6
with:
workflow: build-gurtca.yml
name_is_regexp: true
name: gurtca-.*
path: artifacts/
if_no_artifact_found: warn
continue-on-error: true
- name: Download Gurty artifacts
if: github.event.inputs.download_artifacts == 'true' || github.event_name == 'push'
uses: dawidd6/action-download-artifact@v6
with:
workflow: build-gurty.yml
name_is_regexp: true
name: gurty-.*
path: artifacts/
if_no_artifact_found: warn
continue-on-error: true
- name: Download GDExtension artifacts
if: github.event.inputs.download_artifacts == 'true' || github.event_name == 'push'
uses: dawidd6/action-download-artifact@v6
with:
workflow: build-gdextension.yml
name_is_regexp: true
name: gdextension-.*
path: artifacts/
if_no_artifact_found: warn
continue-on-error: true
- name: Download Flumi artifacts
if: github.event.inputs.download_artifacts == 'true' || github.event_name == 'push'
uses: dawidd6/action-download-artifact@v6
with:
workflow: build-flumi.yml
name_is_regexp: true
name: flumi-.*
path: artifacts/
if_no_artifact_found: warn
continue-on-error: true
- name: List downloaded artifacts
run: |
echo "Downloaded artifacts:"
find artifacts/ -type f -name "*" | sort
- name: Prepare release assets
run: |
mkdir -p release-assets
# Package Rust binaries (GurtCA + Gurty)
for platform in linux windows; do
mkdir -p "temp-tools-$platform"
# Copy GurtCA if available
if [ -d "artifacts/gurtca-$platform" ]; then
cp artifacts/gurtca-$platform/* "temp-tools-$platform/"
fi
# Copy Gurty if available
if [ -d "artifacts/gurty-$platform" ]; then
cp artifacts/gurty-$platform/* "temp-tools-$platform/"
fi
# Package if we have any files
if [ "$(ls -A temp-tools-$platform)" ]; then
cd "temp-tools-$platform"
if [ "$platform" = "windows" ]; then
zip -r "../release-assets/gurted-tools-$platform.zip" .
else
tar -czf "../release-assets/gurted-tools-$platform.tar.gz" .
fi
cd ..
fi
rm -rf "temp-tools-$platform"
done
# Package Flumi builds
for platform in linux windows; do
if [ -d "artifacts/flumi-$platform" ]; then
cd "artifacts/flumi-$platform"
if [ "$platform" = "windows" ]; then
zip -r "../../release-assets/flumi-$platform.zip" .
else
tar -czf "../../release-assets/flumi-$platform.tar.gz" .
fi
cd ../..
fi
done
# Package GDExtension separately for developers
for platform in linux windows; do
if [ -d "artifacts/gdextension-$platform" ]; then
cd "artifacts/gdextension-$platform"
if [ "$platform" = "windows" ]; then
zip -r "../../release-assets/gdextension-$platform.zip" .
else
tar -czf "../../release-assets/gdextension-$platform.tar.gz" .
fi
cd ../..
fi
done
- name: Get release tag
id: get_tag
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
echo "tag=${{ github.event.inputs.tag }}" >> $GITHUB_OUTPUT
else
echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
fi
- name: Create Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.get_tag.outputs.tag }}
name: Gurted ${{ steps.get_tag.outputs.tag }}
body: |
## Gurted Release ${{ steps.get_tag.outputs.tag }}
This release includes:
- **GurtCA**: Certificate Authority for TLS certificates
- **Gurty**: CLI tool for managing GURT protocol servers
- **Flumi**: The official wayfinder (browser) for the GURT ecosystem
- **GDExtension**: Godot extension for GURT protocol integration
### Downloads
- `gurted-tools-*.zip/tar.gz`: Contains GurtCA and Gurty binaries
- `flumi-*.zip/tar.gz`: Contains the Flumi wayfinder application
- `gdextension-*.zip/tar.gz`: Contains the GDExtension library for developers
### Platform Support
- Linux (x86_64)
- Windows (x86_64)
For documentation and usage instructions, visit [docs.gurted.com](https://docs.gurted.com)
files: release-assets/*
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}