Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
b6fd676
Try to fix #676 after #616. Does not fully work yet.
Jun 14, 2026
591ab9a
store gitversion in /usr/local/bin
Jun 14, 2026
c676e2a
differentiate OoliteProject vs other builders
Jun 16, 2026
464fb7a
allow variables to be expanded
Jun 16, 2026
e59a0ff
allow variables to be expanded
Jun 16, 2026
b26c7e0
allow variables to be expanded
Jun 16, 2026
8158512
allow variables to be expanded
Jun 16, 2026
d8688a7
allow variables to be expanded
Jun 16, 2026
5db6449
allow variables to be expanded
Jun 16, 2026
30aa74b
allow variables to be expanded
Jun 16, 2026
cc383fd
allow variables to be expanded
Jun 17, 2026
3ff757f
use meson build option
Jun 17, 2026
a136002
use meson build option
Jun 17, 2026
ce69cb9
use meson build option
Jun 17, 2026
868470f
use meson build option
Jun 17, 2026
424c2ed
use meson build option
Jun 18, 2026
a8b5d6c
use meson build option
Jun 18, 2026
056fc3f
Make function for github download and use it
mcarans Jun 20, 2026
92727c0
Build folder probably not created yet
mcarans Jun 20, 2026
fcc9fcd
Add function to get git remote and update mkmanifest.sh to a function
mcarans Jun 20, 2026
4738e6f
Fix manifest generation
mcarans Jun 20, 2026
b24dc31
Fix cleaning in Makefile
mcarans Jun 20, 2026
a00b88c
Hopefully this will do it
mcarans Jun 20, 2026
a2e4f30
Missed usages of common
mcarans Jun 20, 2026
f1f4a96
Correct way is pass github_repository as meson option
mcarans Jun 20, 2026
dd7a6c2
try to fix NSIS version
mcarans Jun 20, 2026
7186714
Merge branch 'master' into localSemver
mcarans Jun 21, 2026
4821f9f
AppImage fix
mcarans Jun 21, 2026
39876c8
Install jq
mcarans Jun 22, 2026
cb70b14
Install gitversion after jq
mcarans Jun 22, 2026
46e9e46
Install gitversion on Windows
mcarans Jun 22, 2026
ba98a1e
Install gitversion if not installed when creating flatpak (in host no…
mcarans Jun 22, 2026
1e42f45
Install gitversion if not installed when creating flatpak (in host no…
mcarans Jun 22, 2026
fe5e446
Install gitversion if not installed when creating flatpak (in host no…
mcarans Jun 22, 2026
defd510
Install gitversion if not installed when creating flatpak (in host no…
mcarans Jun 22, 2026
dd95039
Install gitversion if not installed when creating flatpak (in host no…
mcarans Jun 22, 2026
bf8e691
Install gitversion if not installed when creating flatpak (in host no…
mcarans Jun 22, 2026
7a8c7c0
install unzip for Windows
mcarans Jun 22, 2026
0ed4f6a
Pass GITHUB_REPOSITORY to flatpak
mcarans Jun 22, 2026
e350f63
Fix unzip install Windows
mcarans Jun 22, 2026
20ff7b3
Wrong make
mcarans Jun 22, 2026
0a5b27f
Add make alias
mcarans Jun 22, 2026
77dd072
Revert make changes
mcarans Jun 22, 2026
d0302d8
Run gitversion not /usr/loca/bin/gitversion (it should be found)
mcarans Jun 22, 2026
fd684f5
Try building without oolite subfolder
mcarans Jun 22, 2026
da337a5
Try installing patchelf
mcarans Jun 22, 2026
90cf2a3
There are 8 files not 7
mcarans Jun 22, 2026
24ea41c
There are 8 files not 7
mcarans Jun 22, 2026
9e71425
Extract one version
mcarans Jun 22, 2026
3edcee2
See if this helps flatpak
mcarans Jun 22, 2026
86d4f8b
Output untracked files
mcarans Jun 22, 2026
ebf6ba9
Maybe it's a git line ending issue
mcarans Jun 22, 2026
26b2dc5
Maybe it's a git line ending issue
mcarans Jun 22, 2026
ad9db56
Remove untracked file check
mcarans Jun 23, 2026
2f5a562
Check for gitversion
mcarans Jun 23, 2026
366ae8f
Fix flatpak build
mcarans Jun 23, 2026
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
145 changes: 45 additions & 100 deletions .github/workflows/build-all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,57 +9,7 @@ concurrency:
cancel-in-progress: true

jobs:
common:
runs-on: ubuntu-latest
outputs:
SEMVER: ${{ steps.version_generator.outputs.SEMVER }}
PROJECTNAME: ${{ steps.version_generator.outputs.PROJECTNAME }}
GitVersion_Major: ${{ steps.version_generator.outputs.GitVersion_Major }}
GitVersion_Minor: ${{ steps.version_generator.outputs.GitVersion_Minor }}
GitVersion_Patch: ${{ steps.version_generator.outputs.GitVersion_Patch }}
GitVersion_VersionSourceDistance: ${{ steps.version_generator.outputs.GitVersion_VersionSourceDistance }}
steps:
- name: Checkout project
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v4
with:
versionSpec: '6'

- name: Check for Fork
run: |
if [ "${{ github.repository }}" == "OoliteProject/oolite" ]; then
echo "PROJECTNAME=oolite" >> $GITHUB_ENV
else
echo "PROJECTNAME=OoliteFork" >> $GITHUB_ENV
fi

- name: Determine Oolite Version
id: version_step
uses: gittools/actions/gitversion/execute@v4
with:
overrideConfig: |
semantic-version-format=Loose
next-version=1.93.1

- name: Print and register result
id: version_generator
run: |
echo "SEMVER=$GitVersion_SemVer" >> "$GITHUB_OUTPUT"
echo "GitVersion_Major=$GitVersion_Major" >> "$GITHUB_OUTPUT"
echo "GitVersion_Minor=$GitVersion_Minor" >> "$GITHUB_OUTPUT"
echo "GitVersion_Patch=$GitVersion_Patch" >> "$GITHUB_OUTPUT"
echo "GitVersion_VersionSourceDistance=$GitVersion_VersionSourceDistance" >> "$GITHUB_OUTPUT"
echo "PROJECTNAME=$PROJECTNAME" >> "$GITHUB_OUTPUT"
printenv | sort
echo "head.repo.full_name = -${{github.event.pull_request.head.repo.full_name}}-"
echo "base.repo.full_name = -${{github.event.pull_request.base.repo.full_name}}-"

build-linux:
needs: [common]
runs-on: ubuntu-latest
container:
image: archlinux:latest
Expand Down Expand Up @@ -88,61 +38,56 @@ jobs:
- name: Checkout Oolite
uses: actions/checkout@v6
with:
path: oolite
fetch-depth: 0
- name: Install packages
run: |
oolite/ShellScripts/Linux/install_packages_root.sh
ShellScripts/Linux/install_packages_root.sh
- name: Build GNUstep
run: |
oolite/ShellScripts/Linux/build_gnustep.sh system
ShellScripts/Linux/build_gnustep.sh system
- name: Install Mozilla static library
run: |
oolite/ShellScripts/Linux/install_mozilla_js.sh system
ShellScripts/Linux/install_mozilla_js.sh system
echo "/usr/local/lib" | tee -a /etc/ld.so.conf
ldconfig
- name: Build Oolite
env:
SEMVER: ${{ needs.common.outputs.SEMVER }}
PROJECTNAME: ${{ needs.common.outputs.PROJECTNAME }}
run: |
oolite/ShellScripts/common/build_oolite.sh ${{matrix.flavour}}
ShellScripts/common/build_oolite.sh ${{matrix.flavour}}
- name: Archive installer
uses: actions/upload-artifact@v6
with:
name: oolite-linux-${{matrix.flavour}}
path: |
oolite/build/oolite*.AppImage
build/oolite*.AppImage
retention-days: 5

build-flatpak:
needs: [common]
runs-on: ubuntu-latest
container:
image: ghcr.io/flathub-infra/flatpak-github-actions:freedesktop-25.08
options: --privileged
steps:
- name: Pre-setup ownership
run: |
# This must run before the checkout action if the action tries to do git commands
mkdir -p "$GITHUB_WORKSPACE"
git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Checkout Oolite
uses: actions/checkout@v6
with:
path: oolite
fetch-depth: 0
- name: Build flatpak
env:
SEMVER: ${{ needs.common.outputs.SEMVER }}
PROJECTNAME: ${{ needs.common.outputs.PROJECTNAME }}
run: |
oolite/installers/flatpak/create_flatpak.sh
installers/flatpak/create_flatpak.sh
- name: Archive installer
uses: actions/upload-artifact@v6
with:
name: oolite-flatpak
path: |
oolite/build/space.oolite.Oolite*.flatpak
build/space.oolite.Oolite*.flatpak
retention-days: 5

build-windows:
needs: [common]
runs-on: windows-latest
strategy:
matrix:
Expand All @@ -153,6 +98,10 @@ jobs:
# run: |
# Get-ChildItem Env: | Sort Name

- name: Configure Git Line Endings
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Set up MSYS2
uses: msys2/setup-msys2@v2
with:
Expand All @@ -161,44 +110,29 @@ jobs:
- name: Checkout Oolite
uses: actions/checkout@v6
with:
path: oolite
fetch-depth: 0
- name: Download latest release assets
uses: robinraju/release-downloader@v1
with:
repository: OoliteProject/oolite_windeps_build
latest: true
fileName: "*"
out-file-path: oolite/build/packages
- name: Install packages
shell: msys2 {0}
env:
msystem: UCRT64
run: |
oolite/ShellScripts/Windows/install_deps.sh clang
ShellScripts/Windows/install_deps.sh clang
- name: Build Oolite
shell: msys2 {0}
env:
msystem: UCRT64
VER_MAJ: ${{ needs.common.outputs.GitVersion_Major }}
VER_MIN: ${{ needs.common.outputs.GitVersion_Minor }}
VER_REV: ${{ needs.common.outputs.GitVersion_Patch }}
VER_GITREV: ${{ needs.common.outputs.GitVersion_VersionSourceDistance }}
SEMVER: ${{ needs.common.outputs.SEMVER }}
VER_NSIS: ${{ needs.common.outputs.GitVersion_Major }}.${{ needs.common.outputs.GitVersion_Minor }}.${{ needs.common.outputs.GitVersion_Patch }}.${{ needs.common.outputs.GitVersion_VersionSourceDistance }}
PROJECTNAME: ${{ needs.common.outputs.PROJECTNAME }}
run: |
oolite/ShellScripts/common/build_oolite.sh ${{matrix.flavour}}
ShellScripts/common/build_oolite.sh ${{matrix.flavour}}
- name: Archive installer
uses: actions/upload-artifact@v6
with:
name: oolite-windows-${{matrix.flavour}}
path: |
oolite/build/OoliteInstall*.exe
build/OoliteInstall*.exe
retention-days: 5

release:
needs: [build-linux, build-flatpak, build-windows, common]
needs: [build-linux, build-flatpak, build-windows]
runs-on: ubuntu-22.04
# Only run for internal requests (so not for PRs from forks)
if: github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name
Expand All @@ -212,23 +146,34 @@ jobs:
uses: actions/download-artifact@v7
with:
path: artifacts
- name: Checkout Oolite
uses: actions/checkout@v6
with:
path: oolite
fetch-depth: 0
- name: Calculate version number and set OOLITE_VERSION
id: version
env:
SEMVER: ${{ needs.common.outputs.SEMVER }}
PROJECTNAME: ${{ needs.common.outputs.PROJECTNAME }}
run: |
set -x
cd oolite
# Build version string,
# taking into account that we may have just two digits
source ShellScripts/common/get_version.sh
cat build/OOLITE_VERSION.txt >> "$GITHUB_OUTPUT"
set -x
# 1. Check that there are exactly 8 files recursively in the artifacts directory
FILE_COUNT=$(find artifacts -type f | wc -l)
echo "Total files found: $FILE_COUNT"
if [[ "$FILE_COUNT" -ne 8 ]]; then
echo "❌ Expected exactly 8 files, but found $FILE_COUNT." >&2
exit 1
fi
# 2. Get the path of the first available AppImage
APPIMAGE_PATH=$(find artifacts -type f -name "*.AppImage" | head -n 1)
if [[ -z "$APPIMAGE_PATH" ]]; then
echo "❌ No AppImages found in the downloaded artifacts!" >&2
exit 1
fi
echo "Found AppImage: $APPIMAGE_PATH"
# 3. Run with packageinfo and extract the string inside quotes
chmod +x "$APPIMAGE_PATH"
VERSION_STR=$("$APPIMAGE_PATH" packageinfo | awk -F'"' '/^[[:space:]]*version =/ {print $2; exit}')
if [[ -z "$VERSION_STR" ]]; then
echo "❌ Failed to extract version string from packageinfo output!" >&2
exit 1
fi
echo "Extracted Version: $VERSION_STR"
# 4. Output the extracted version for subsequent steps
echo "OOLITE_VERSION=$VERSION_STR" >> "$GITHUB_OUTPUT"
- name: Remove old prereleases
if: github.ref == 'refs/heads/master' || endsWith(github.ref, 'maintenance')
uses: s00d/delete-older-releases@0.2.1
Expand Down
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ SHELL := /bin/bash
.SHELLFLAGS := -eu -o pipefail -c

NATIVE_FILE ?= clang.ini
BUILDER ?= unknown

# Modern, self-documenting help target.
# It parses the '##' comments next to targets automatically.
Expand All @@ -15,7 +16,7 @@ help: ## Show this help message

# Macro for Meson workflow
define meson_build
meson setup build/meson_$(2) $(1) --native-file $(NATIVE_FILE) --reconfigure 2>/dev/null || meson setup build/meson_$(2) $(1) --native-file $(NATIVE_FILE)
meson setup build/meson_$(2) $(1) -Dgithub_repository=${GITHUB_REPOSITORY} --native-file $(NATIVE_FILE) --reconfigure 2>/dev/null || meson setup build/meson_$(2) $(1) -Dgithub_repository=${GITHUB_REPOSITORY} --native-file $(NATIVE_FILE)
meson compile -C build/meson_$(2)
endef

Expand Down Expand Up @@ -55,7 +56,7 @@ test: release-snapshot ## Run test suite

.PHONY: clean
clean: ## Remove all generated build artifacts
$(RM) -rf build/meson_*
rm -rf build/meson_*

.PHONY: all
all: release release-deployment release-snapshot debug ## Build all standard development targets
Expand Down Expand Up @@ -93,4 +94,4 @@ pkg-win-deployment: release-deployment ## Package a Windows NSIS deployment inst

.PHONY: pkg-win-snapshot
pkg-win-snapshot: release-snapshot ## Package a Windows NSIS snapshot installer
installers/win32/create_nsis.sh meson_snapshot/oolite.app "dev"
installers/win32/create_nsis.sh meson_snapshot/oolite.app "dev"
2 changes: 1 addition & 1 deletion ShellScripts/Linux/install_freedesktop_fn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ install_freedesktop() {
local app_metainfo="$appshr/metainfo/space.oolite.Oolite.$4.xml"
install -D ../../installers/FreeDesktop/space.oolite.Oolite.metainfo.xml.template "$app_metainfo" || { echo "$err_msg metainfo template" >&2; return 1; }

sed -i "s/@VER@/${VERSION}/g" "$app_metainfo"
sed -i "s/@VER@/${VER_FULL}/g" "$app_metainfo"
sed -i "s/@DATE@/${APP_DATE}/g" "$app_metainfo"

echo ===========================================
Expand Down
10 changes: 6 additions & 4 deletions ShellScripts/Linux/install_package_fn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ install_package() {

"cmake") pkg_name="cmake" ;;

"jq") pkg_name="jq" ;;

"meson")
case "$CURRENT_DISTRO" in
debian) pkg_name="meson ninja-build" ;;
Expand Down Expand Up @@ -121,7 +123,7 @@ install_package() {
arch) pkg_name="glu" ;;
esac ;;

"sdl3")
"sdl3")
case "$CURRENT_DISTRO" in
debian) pkg_name="libsdl3-dev" ;;
redhat) pkg_name="SDL3-devel" ;;
Expand All @@ -137,9 +139,9 @@ install_package() {

"appimage")
case "$CURRENT_DISTRO" in
debian) pkg_name="file fuse3" ;;
redhat) pkg_name="file fuse3 desktop-file-utils which zsync" ;;
arch) pkg_name="file fuse3 desktop-file-utils zsync" ;;
debian) pkg_name="file fuse3 patchelf" ;;
redhat) pkg_name="file fuse3 desktop-file-utils patchelf which zsync" ;;
arch) pkg_name="file fuse3 desktop-file-utils patchelf zsync" ;;
esac ;;

"flatpak") pkg_name="flatpak flatpak-builder" ;;
Expand Down
16 changes: 15 additions & 1 deletion ShellScripts/Linux/install_packages_root.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash

# This script must be run as root (for example with sudo).
set -e


run_script() {
Expand All @@ -10,10 +11,11 @@ run_script() {
return 1
fi


local script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &> /dev/null && pwd)
pushd "$script_dir"

source ../common/download_github_fn.sh

source ./install_package_fn.sh

if ! install_package base-devel; then
Expand All @@ -25,6 +27,9 @@ run_script() {
if ! install_package cmake; then
return 1
fi
if ! install_package jq; then
return 1
fi
if ! install_package meson; then
return 1
fi
Expand Down Expand Up @@ -93,6 +98,15 @@ run_script() {
return 1
fi

# install gitversion
local outputdir="../../build"
mkdir -p "$outputdir"
download_latest_release gitversion_tgz "GitTools" "GitVersion" "linux-x64" "$outputdir"
tar xfz ${gitversion_tgz} --directory "$outputdir"
chmod +x "$outputdir/gitversion"
mv "$outputdir/gitversion" /usr/local/bin/gitversion
rm -f ${gitversion_tgz}

popd
}

Expand Down
Loading
Loading