Add Haiku ecode nightly (not tested!).

This commit is contained in:
Martín Lucas Golini
2026-02-08 16:56:26 -03:00
parent 95c1392de6
commit 7851181230
2 changed files with 74 additions and 3 deletions

View File

@@ -425,6 +425,41 @@ jobs:
files: |
projects/freebsd/ecode/ecode-freebsd-${{ env.INSTALL_REF }}-x86_64.tar.gz
build_haiku_x86_64:
name: Haiku x86_64 Nightly
needs: release
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
with: { fetch-depth: 0, submodules: 'recursive' }
- name: Set Environment Variables
run: |
echo "INSTALL_REF=${{ needs.release.outputs.version }}" >> "$GITHUB_ENV"
echo "RARCH=$(uname -m)" >> "$GITHUB_ENV"
- uses: vmactions/haiku-vm@v1
env:
INSTALL_REF: ${{ needs.release.outputs.version }}
with:
envs: 'INSTALL_REF'
usesh: true
mem: 8192
disable-cache: true
prepare: |
pkgman install -y libsdl2 libsdl2-devel git gcc
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
bash projects/scripts/patch_commit_number.sh
sh projects/haiku/ecode/build.app.sh --version ${{ env.INSTALL_REF }}
- name: Upload Files
uses: softprops/action-gh-release@v2.2.2
with:
tag_name: ${{ needs.release.outputs.version }}
draft: false
prerelease: true
files: |
projects/haiku/ecode/ecode-haiku-${{ env.INSTALL_REF }}-x86_64.tar.gz
build_windows_msvc:
name: Windows x86_64 MSVC Nightly
needs: release

View File

@@ -3,23 +3,59 @@ CANONPATH=$(readlink -f "$0")
DIRPATH="$(dirname "$CANONPATH")"
cd "$DIRPATH" || exit
cd ../../../ || exit
VERSION=
ARCH="$(uname -m)"
while [ $# -gt 0 ]; do
case "$1" in
--version)
if [ -n "$2" ]; then
VERSION="$2"
shift
else
echo "Error: --version requires an argument." >&2
exit 1
fi
;;
--)
shift
break
;;
-*)
echo "Unknown option: $1" >&2
exit 1
;;
*)
break
;;
esac
shift
done
premake5 gmake
cd make/haiku || exit
make -j"$(nproc)" config=release_x86_64 ecode
make -j"$(nproc)" config=release_"$ARCH" ecode
cd "$DIRPATH" || exit
bash ../../scripts/copy_ecode_assets.sh ../../bin ecode.app || exit
mkdir -p ecode.app/lib
cp ../../../bin/assets/icon/ecode.png ecode.app/ecode.png
cp ../../../libs/haiku/x86_64/libeepp.so ecode.app/lib/
cp ../../../libs/haiku/"$ARCH"/libeepp.so ecode.app/lib/
cp ../../../bin/ecode ecode.app/
cp -L /boot/system/lib/libSDL2-2.0.so.0 ecode.app/lib/
strip ecode.app/lib/libSDL2-2.0.so.0
if [ -n "$VERSION" ];
then
ECODE_VERSION="$VERSION"
else
VERSIONPATH=../../../src/tools/ecode/version.hpp
ECODE_MAJOR_VERSION=$(grep "define ECODE_MAJOR_VERSION" $VERSIONPATH | awk '{print $3}')
ECODE_MINOR_VERSION=$(grep "define ECODE_MINOR_VERSION" $VERSIONPATH | awk '{print $3}')
ECODE_PATCH_LEVEL=$(grep "define ECODE_PATCH_LEVEL" $VERSIONPATH | awk '{print $3}')
ECODE_NAME=ecode-haiku-"$ECODE_MAJOR_VERSION"."$ECODE_MINOR_VERSION"."$ECODE_PATCH_LEVEL"-"$(uname -m)"
ECODE_VERSION="$ECODE_MAJOR_VERSION"."$ECODE_MINOR_VERSION"."$ECODE_PATCH_LEVEL"
fi
ECODE_NAME=ecode-haiku-"$ECODE_VERSION"-"$ARCH"
mv ecode.app ecode
tar -czf "$ECODE_NAME".tar.gz ecode