MBHaxe/.circleci/config.yml
2022-12-17 01:27:35 +05:30

46 lines
1.8 KiB
YAML

# Use the latest 2.1 version of CircleCI pipeline process engine.
# See: https://circleci.com/docs/2.0/configuration-reference
version: 2.1
# Define a job to be invoked later in a workflow.
# See: https://circleci.com/docs/2.0/configuration-reference/#jobs
jobs:
build:
macos:
xcode: 14.1.0 # Specify the Xcode version to use
steps:
- checkout
- run: |
set -eux
download_url="https://github.com/HaxeFoundation/haxe/releases/download/4.2.5/haxe-4.2.5-osx.tar.gz"
echo "Downloading [$download_url]..."
mkdir /tmp/haxe
curl -fsSL --retry 3 --retry-delay 5 "$download_url" -o /tmp/haxe.tar.gz
tar xzvf /tmp/haxe.tar.gz -C /tmp/haxe --strip-components=1
export PATH=/tmp/haxe/:"$PATH"
export HAXE_STD_PATH=/tmp/haxe/std
/tmp/haxe/haxe --version
brew install cmake
brew install libpthread-stubs
brew install neko
haxelib setup ~/haxelib
haxelib list
haxelib install hashlink
haxelib install hlsdl
haxelib git heaps https://github.com/RandomityGuy/heaps
git clone https://github.com/RandomityGuy/hashlink
curl -LJO https://github.com/RandomityGuy/hashlink/releases/download/latest/hashlink-69bf6d7-darwin.tar.gz
tar -xvzf hashlink-69bf6d7-darwin.tar.gz
cp -rf hashlink/libs/sdl/* ~/haxelib/hlsdl/1,10,0
haxe compile-c.hxml
cp -r hashlink-69bf6d7-darwin/* native
gcc -O0 -o marblegame native/marblegame.c -lhl -Ihashlink-69bf6d7-darwin/include -Inative -Lnative fmt.hdll mysql.hdll sdl.hdll openal.hdll ssl.hdll ui.hdll uv.hdll
# Invoke jobs via workflows
# See: https://circleci.com/docs/2.0/configuration-reference/#workflows
workflows:
say-hello-workflow:
jobs:
- build