mirror of
https://github.com/RandomityGuy/MBHaxe.git
synced 2026-04-27 05:01:38 +00:00
Add CI for linux
This commit is contained in:
parent
f26c7b91e1
commit
1655ee2e2a
1 changed files with 114 additions and 5 deletions
|
|
@ -452,6 +452,108 @@ jobs:
|
||||||
# - store_artifacts:
|
# - store_artifacts:
|
||||||
# path: ~/project/MBHaxe-Platinum-Win.zip
|
# path: ~/project/MBHaxe-Platinum-Win.zip
|
||||||
|
|
||||||
|
build-linux:
|
||||||
|
machine: # executor type
|
||||||
|
image: ubuntu-2204:current
|
||||||
|
environment:
|
||||||
|
#HOMEBREW_NO_AUTO_UPDATE: 1
|
||||||
|
#NPROC: 4
|
||||||
|
COMMIT_TAG: pipeline.git.tag
|
||||||
|
steps:
|
||||||
|
#- add_ssh_keys:
|
||||||
|
# fingerprints:
|
||||||
|
# - "82:42:56:a0:57:43:95:4e:00:c0:8c:c1:7f:70:74:47"
|
||||||
|
- checkout:
|
||||||
|
path: ~/MBHaxe
|
||||||
|
- run:
|
||||||
|
name: Install apt dependencies
|
||||||
|
command: |
|
||||||
|
sudo apt install cmake
|
||||||
|
sudo apt-get install libpng-dev libturbojpeg-dev libvorbis-dev libopenal-dev libsdl2-dev libmbedtls-dev libuv1-dev libsqlite3-dev
|
||||||
|
|
||||||
|
- run:
|
||||||
|
name: Install Haxe
|
||||||
|
command: |
|
||||||
|
set -eux
|
||||||
|
download_url="https://github.com/HaxeFoundation/haxe/releases/download/4.3.6/haxe-4.3.6-linux64.tar.gz"
|
||||||
|
echo "Downloading [$download_url]..."
|
||||||
|
mkdir ~/haxe
|
||||||
|
curl -fsSL --retry 3 --retry-delay 5 "$download_url" -o ~/haxe.tar.gz
|
||||||
|
tar xzvf ~/haxe.tar.gz -C ~/haxe --strip-components=1
|
||||||
|
export PATH=~/haxe/:"$PATH"
|
||||||
|
export HAXE_STD_PATH=~/haxe/std
|
||||||
|
haxelib setup ~/haxelib
|
||||||
|
haxelib list
|
||||||
|
|
||||||
|
- run:
|
||||||
|
name: Install hashlink
|
||||||
|
command: |
|
||||||
|
mkdir -p ~/deps
|
||||||
|
cd ~/deps
|
||||||
|
git clone --depth=1 https://github.com/RandomityGuy/hashlink
|
||||||
|
git clone --depth=1 https://github.com/RandomityGuy/hxDatachannel
|
||||||
|
cd hashlink/libs
|
||||||
|
ln -s ~/deps/hxDatachannel/cpp datachannel
|
||||||
|
echo -e "\nadd_subdirectory(datachannel)" >> CMakeLists.txt
|
||||||
|
cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_FIND_FRAMEWORK=LAST -DWITH_SQLITE=OFF -DBUILD_TESTING=OFF -DHASHLINK_INCLUDE_DIR="~/deps/hashlink/src" -DHASHLINK_LIBRARY_DIR="/usr/local/lib/"
|
||||||
|
cmake --build build --config Release -j$NPROC
|
||||||
|
sudo cmake --install build
|
||||||
|
|
||||||
|
- run:
|
||||||
|
name: Install haxe dependencies
|
||||||
|
command: |
|
||||||
|
export PATH=~/haxe/:"$PATH"
|
||||||
|
export HAXE_STD_PATH=~/haxe/std
|
||||||
|
haxelib dev hashlink ~/deps/hashlink/other/haxelib
|
||||||
|
haxelib git heaps https://github.com/RandomityGuy/heaps
|
||||||
|
haxelib dev hlopenal ~/deps/hashlink/libs/openal
|
||||||
|
haxelib dev hlsdl ~/deps/hashlink/libs/sdl
|
||||||
|
haxelib dev datachannel ~/deps/hxDatachannel
|
||||||
|
haxelib install colyseus-websocket
|
||||||
|
|
||||||
|
- save_cache:
|
||||||
|
key: mbhaxe-deps-v1
|
||||||
|
paths:
|
||||||
|
- /usr/local/lib/datachannel.hdll
|
||||||
|
- /usr/local/lib/fmt.hdll
|
||||||
|
- /usr/local/lib/openal.hdll
|
||||||
|
- /usr/local/lib/sdl.hdll
|
||||||
|
- /usr/local/lib/ssl.hdll
|
||||||
|
- /usr/local/lib/ui.hdll
|
||||||
|
- /usr/local/lib/uv.hdll
|
||||||
|
|
||||||
|
- run:
|
||||||
|
name: Compile MBHaxe
|
||||||
|
command: |
|
||||||
|
export PATH=~/haxe/:"$PATH"
|
||||||
|
export HAXE_STD_PATH=~/haxe/std
|
||||||
|
cd ~/MBHaxe
|
||||||
|
haxe compile.hxml
|
||||||
|
./compile-linux.sh
|
||||||
|
|
||||||
|
- run:
|
||||||
|
name: Package Bundle
|
||||||
|
command: |
|
||||||
|
mkdir -p ~/MBHaxe-Ultra-Linux
|
||||||
|
cd ~/MBHaxe-Ultra-Linux
|
||||||
|
cp ~/MBHaxe/marblegame* .
|
||||||
|
cp ~/MBHaxe/linux-dist/* .
|
||||||
|
cp -r ~/MBHaxe/data data
|
||||||
|
cp /usr/local/lib/{{fmt,openal,sdl,ssl,ui,uv}.hdll,libhl.so.1.13.0} .
|
||||||
|
cp /usr/local/bin/hl .
|
||||||
|
ln -s libhl.so.1.13.0 libhl.so.1
|
||||||
|
ln -s libhl.so.1 libhl.so
|
||||||
|
cd ..
|
||||||
|
tar -czvf MBHaxe-Ultra-Linux.tar.gz MBHaxe-Ultra-Linux
|
||||||
|
|
||||||
|
#- run:
|
||||||
|
# name: Upload to Artifact Storage
|
||||||
|
# command: |
|
||||||
|
# scp -o StrictHostKeyChecking=no -i $KEYPATH -P $PORT ~/MBHaxe/macos-dist/MBHaxe-Ultra-Mac.dmg $REMOTEDIR/MBHaxe-Ultra-Mac.dmg
|
||||||
|
|
||||||
|
- store_artifacts:
|
||||||
|
path: ~/MBHaxe-Ultra-Linux.tar.gz
|
||||||
|
|
||||||
|
|
||||||
# Invoke jobs via workflows
|
# Invoke jobs via workflows
|
||||||
# See: https://circleci.com/docs/2.0/configuration-reference/#workflows
|
# See: https://circleci.com/docs/2.0/configuration-reference/#workflows
|
||||||
|
|
@ -469,3 +571,10 @@ workflows:
|
||||||
filters:
|
filters:
|
||||||
tags:
|
tags:
|
||||||
only: /^\d+.\d+.\d+$/
|
only: /^\d+.\d+.\d+$/
|
||||||
|
|
||||||
|
build-linux:
|
||||||
|
jobs:
|
||||||
|
- build-linux:
|
||||||
|
filters:
|
||||||
|
tags:
|
||||||
|
only: /^\d+.\d+.\d+$/
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue