Skip to content

Use luaL_loadbufferx directly #757

Use luaL_loadbufferx directly

Use luaL_loadbufferx directly #757

Workflow file for this run

name: Build EDOPro-core
on: [push, pull_request]
env:
BUILD_CONFIG: release
DEPENDENCIES_BASE_URL: https://github.com/edo9300/edopro-vcpkg-cache/releases/download/20220927
DEPLOY_DIR: ocgcore
DEPLOY_REPO: ${{ secrets.DEPLOY_REPO }}
DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
jobs:
Windows:
runs-on: windows-2019
env:
DEPLOY_BRANCH: travis-core-windows
TRAVIS_OS_NAME: windows
VCPKG_ROOT: /c/vcpkg2
VCPKG_DEFAULT_TRIPLET: x86-windows-static
steps:
- name: Set custom env vars
shell: bash
run: |
echo "VCPKG_CACHE_ZIP_URL=$DEPENDENCIES_BASE_URL/installed_x86-windows-static.zip" >> $GITHUB_ENV
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2
- uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Install lua
shell: bash
run: ./travis/install-lua.sh
- name: Install premake
shell: bash
run: ./travis/install-premake5.sh
- name: Build
shell: bash
run: ./travis/build-premake5.sh
- name: Predeploy
shell: bash
run: ./travis/predeploy.sh
- name: Deploy
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
shell: bash
run: ./travis/deploy.sh
- name: Log Failure
uses: sarisia/actions-status-discord@v1
if: failure()
with:
nodetail: true
description: |
[[${{ github.event.repository.name }}] ${{ github.job }} failed on ${{ github.ref }}](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}})
title: |
color: 0xff0000
webhook: ${{ secrets.DISCORD_WEBHOOK }}
avatar_url: https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png
username: Github
Linux-musl:
strategy:
fail-fast: false
matrix:
docker-image: [x86_64-linux-musl, aarch64-linux-musl]
include:
- docker-image: x86_64-linux-musl
deploy-branch: travis-core-linux-musl
- docker-image: aarch64-linux-musl
deploy-branch: travis-core-linux-musl-aarch64
runs-on: ubuntu-latest
env:
DEPLOY_BRANCH: ${{ matrix.deploy-branch }}
TRAVIS_OS_NAME: linux
CXX: musl-g++
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Setup alpine docker image
shell: bash
run: |
sudo docker build --build-arg target_arch=${{ matrix.docker-image }} . -t alpine-cmake -f ./travis/Dockerfile &&
sudo docker run -dt --rm --name alpine -v $PWD:/core -w="/core" alpine-cmake
- name: Install lua
shell: bash
run: |
sudo docker exec -t -w="/core" -e TRAVIS_OS_NAME=linux -e MAKE=make alpine ./travis/install-lua.sh
- name: Install premake
shell: bash
run: ./travis/install-premake5.sh
- name: Build
shell: bash
run: |
./premake5 gmake2
sudo docker exec -t -w="/core" alpine make -Cbuild ocgcoreshared -j2 config=release LDFLAGS="-static -Wl,-Bstatic" &&
sudo chown -R $USER bin
- name: Predeploy
shell: bash
run: ./travis/predeploy.sh
- name: Deploy
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
shell: bash
run: ./travis/deploy.sh
- name: Log Failure
uses: sarisia/actions-status-discord@v1
if: failure()
with:
nodetail: true
description: |
[[${{ github.event.repository.name }}] ${{ github.job }} failed on ${{ github.ref }}](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}})
title: |
color: 0xff0000
webhook: ${{ secrets.DISCORD_WEBHOOK }}
avatar_url: https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png
username: Github
Linux-musl-apicheck:
strategy:
fail-fast: false
matrix:
docker-image: [x86_64-linux-musl]
include:
- docker-image: x86_64-linux-musl
deploy-branch: travis-core-linux-musl-apicheck
runs-on: ubuntu-latest
env:
DEPLOY_BRANCH: ${{ matrix.deploy-branch }}
TRAVIS_OS_NAME: linux
CXX: musl-g++
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Setup alpine docker image
shell: bash
run: |
sudo docker build --build-arg target_arch=${{ matrix.docker-image }} . -t alpine-cmake -f ./travis/Dockerfile &&
sudo docker run -dt --rm --name alpine -v $PWD:/core -w="/core" alpine-cmake
- name: Install lua
shell: bash
run: |
sudo docker exec -t -w="/core" -e TRAVIS_OS_NAME=linux -e MAKE=make -e LUA_APICHECK=1 alpine ./travis/install-lua.sh
- name: Install premake
shell: bash
run: ./travis/install-premake5.sh
- name: Build
shell: bash
run: |
./premake5 gmake2
sudo docker exec -t -w="/core" alpine make -Cbuild ocgcoreshared -j2 config=release LDFLAGS="-static -Wl,-Bstatic" &&
sudo chown -R $USER bin
- name: Predeploy
shell: bash
run: ./travis/predeploy.sh
- name: Deploy
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
shell: bash
run: ./travis/deploy.sh
- name: Log Failure
uses: sarisia/actions-status-discord@v1
if: failure()
with:
nodetail: true
description: |
[[${{ github.event.repository.name }}] ${{ github.job }} failed on ${{ github.ref }}](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}})
title: |
color: 0xff0000
webhook: ${{ secrets.DISCORD_WEBHOOK }}
avatar_url: https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png
username: Github
Android:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ndk-version: [21.4.7075529, 16.1.4479499, 26.1.10909125]
include:
- ndk-version: 21.4.7075529
deploy-branch: travis-core-android
- docker-image: 16.1.4479499
deploy-branch: travis-core-android-ndk-16
- docker-image: 26.1.10909125
deploy-branch: travis-core-android-ndk-26
env:
DEPLOY_BRANCH: ${{ matrix.deploy-branch }}
NDK_VERSION: ${{ matrix.ndk-version }}
TRAVIS_OS_NAME: android
OS_NAME: linux
steps:
- name: Install old ncurses library for ndk 16
if: matrix.ndk-version == '16.1.4479499'
run: |
sudo add-apt-repository universe
sudo apt-get install libncurses5
- uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Install lua
shell: bash
run: |
cd ..
curl https://codeload.github.com/edo9300/edopro-android/tar.gz/master | tar -xz --strip=2 edopro-android-master/deps/lua
- name: Build
shell: bash
run: ./travis/build-android.sh
- name: Predeploy
shell: bash
run: ./travis/predeploy.sh
- name: Deploy
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
shell: bash
run: ./travis/deploy.sh
- name: Log Failure
uses: sarisia/actions-status-discord@v1
if: failure()
with:
nodetail: true
description: |
[[${{ github.event.repository.name }}] ${{ github.job }} failed on ${{ github.ref }}](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}})
title: |
color: 0xff0000
webhook: ${{ secrets.DISCORD_WEBHOOK }}
avatar_url: https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png
username: Github
Mac-os:
runs-on: macos-11
env:
DEPLOY_BRANCH: travis-core-osx
TRAVIS_OS_NAME: osx
DEVELOPER_DIR: /Applications/Xcode_11.7.app/Contents/Developer
MACOSX_DEPLOYMENT_TARGET: 10.11
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Replace not compatible Xcode Command Line Tools
shell: bash
run: |
sudo rm -rf /Library/Developer/CommandLineTools
xcode-select --install
- name: Install lua
shell: bash
run: ./travis/install-lua.sh
- name: Install premake
shell: bash
run: ./travis/install-premake5.sh
- name: Build
shell: bash
run: ./travis/build-premake5.sh
- name: Predeploy
shell: bash
run: ./travis/predeploy.sh
- name: Deploy
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
shell: bash
run: ./travis/deploy.sh
- uses: actions/upload-artifact@v4
with:
name: osx
path: ocgcore/libocgcore.dylib
- name: Log Failure
uses: sarisia/actions-status-discord@v1
if: failure()
with:
nodetail: true
description: |
[[${{ github.event.repository.name }}] ${{ github.job }} failed on ${{ github.ref }}](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}})
title: |
color: 0xff0000
webhook: ${{ secrets.DISCORD_WEBHOOK }}
avatar_url: https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png
username: Github
Mac-os-cctools:
runs-on: ubuntu-latest
env:
DEPLOY_BRANCH: travis-core-osx-cctools
TRAVIS_OS_NAME: linux
TARGET_OS: osx
CC: /opt/cctools/bin/x86_64-macosx-clang
CXX: /opt/cctools/bin/x86_64-macosx-clang++
RANLIB: /opt/cctools/bin/x86_64-apple-darwin11-ranlib
AR: /opt/cctools/bin/arm-apple-darwin11-ar rcu
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Download cctools
run: |
cd /opt
wget https://github.com/edo9300/cctools-build/releases/download/preview/cctools.tar.xz
tar xf cctools.tar.xz
cd cctools/bin
- name: Install lua
shell: bash
run: ./travis/install-lua.sh
- name: Install premake
shell: bash
run: ./travis/install-premake5.sh
- name: Build
shell: bash
run: ./travis/build-premake5.sh
- name: Predeploy
shell: bash
run: ./travis/predeploy.sh
- name: Deploy
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
shell: bash
run: ./travis/deploy.sh
- uses: actions/upload-artifact@v4
with:
name: osx-cctools
path: ocgcore/libocgcore.dylib
- name: Log Failure
uses: sarisia/actions-status-discord@v1
if: failure()
with:
nodetail: true
description: |
[[${{ github.event.repository.name }}] ${{ github.job }} failed on ${{ github.ref }}](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}})
title: |
color: 0xff0000
webhook: ${{ secrets.DISCORD_WEBHOOK }}
avatar_url: https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png
username: Github
Mac-os-aarch64:
runs-on: macos-latest
env:
DEPLOY_BRANCH: travis-core-osx-aarch64
TRAVIS_OS_NAME: osx
MACOSX_DEPLOYMENT_TARGET: 11.0
CXXFLAGS: -target arm64-apple-macos11
CFLAGS: -target arm64-apple-macos11
LDFLAGS: -target arm64-apple-macos11
SDKROOT: /Applications/Xcode_14.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Install lua
shell: bash
run: ./travis/install-lua.sh
- name: Install premake
shell: bash
run: ./travis/install-premake5.sh
- name: Build
shell: bash
run: ./travis/build-premake5.sh
- name: Predeploy
shell: bash
run: ./travis/predeploy.sh
- name: Deploy
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
shell: bash
run: ./travis/deploy.sh
- uses: actions/upload-artifact@v4
with:
name: osx-aarch64
path: ocgcore/libocgcore.dylib
- name: Log Failure
uses: sarisia/actions-status-discord@v1
if: failure()
with:
nodetail: true
description: |
[[${{ github.event.repository.name }}] ${{ github.job }} failed on ${{ github.ref }}](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}})
title: |
color: 0xff0000
webhook: ${{ secrets.DISCORD_WEBHOOK }}
avatar_url: https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png
username: Github
Mac-os-aarch64-cctools:
runs-on: ubuntu-latest
env:
DEPLOY_BRANCH: travis-core-osx-aarch64-cctools
TRAVIS_OS_NAME: linux
TARGET_OS: osx
CC: /opt/cctools/bin/arm64-macosx-clang
CXX: /opt/cctools/bin/arm64-macosx-clang++
RANLIB: /opt/cctools/bin/arm-apple-darwin11-ranlib
AR: /opt/cctools/bin/arm-apple-darwin11-ar rcu
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Download cctools
run: |
cd /opt
wget https://github.com/edo9300/cctools-build/releases/download/preview/cctools.tar.xz
tar xf cctools.tar.xz
cd cctools/bin
- name: Install lua
shell: bash
run: ./travis/install-lua.sh
- name: Install premake
shell: bash
run: ./travis/install-premake5.sh
- name: Build
shell: bash
run: ./travis/build-premake5.sh
- name: Predeploy
shell: bash
run: ./travis/predeploy.sh
- name: Deploy
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
shell: bash
run: ./travis/deploy.sh
- uses: actions/upload-artifact@v4
with:
name: osx-aarch64-cctools
path: ocgcore/libocgcore.dylib
- name: Log Failure
uses: sarisia/actions-status-discord@v1
if: failure()
with:
nodetail: true
description: |
[[${{ github.event.repository.name }}] ${{ github.job }} failed on ${{ github.ref }}](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}})
title: |
color: 0xff0000
webhook: ${{ secrets.DISCORD_WEBHOOK }}
avatar_url: https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png
username: Github
Mac-os-universal:
runs-on: macos-latest
env:
DEPLOY_BRANCH: travis-core-osx-universal
needs: [ Mac-os, Mac-os-aarch64 ]
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 1
submodules: true
- name: Download osx artifacts
uses: actions/download-artifact@v4
- name: Merge binaries
shell: bash
run: |
lipo -create -output libocgcore.dylib ./osx-aarch64/libocgcore.dylib ./osx/libocgcore.dylib
- name: Move merged binary
shell: bash
run: |
mkdir -p $DEPLOY_DIR && mv libocgcore.dylib $DEPLOY_DIR
- name: Deploy
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
shell: bash
run: ./travis/deploy.sh
- name: Delete artifacts
uses: geekyeggo/delete-artifact@v4
with:
name: |
osx-aarch64
osx
- name: Log Failure
uses: sarisia/actions-status-discord@v1
if: failure()
with:
nodetail: true
description: |
[[${{ github.event.repository.name }}] ${{ github.job }} failed on ${{ github.ref }}](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}})
title: |
color: 0xff0000
webhook: ${{ secrets.DISCORD_WEBHOOK }}
avatar_url: https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png
username: Github
Mac-os-universal-cctools:
runs-on: ubuntu-latest
env:
DEPLOY_BRANCH: travis-core-osx-universal-cctools
needs: [ Mac-os-cctools, Mac-os-aarch64-cctools ]
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 1
submodules: true
- name: Download lipo binary
run: |
wget https://github.com/edo9300/cctools-build/releases/download/preview/lipo
chmod +x lipo
- name: Download osx artifacts
uses: actions/download-artifact@v4
- name: Merge binaries
shell: bash
run: |
./lipo -create -output libocgcore.dylib ./osx-aarch64-cctools/libocgcore.dylib ./osx-cctools/libocgcore.dylib
- name: Move merged binary
shell: bash
run: |
mkdir -p $DEPLOY_DIR && mv libocgcore.dylib $DEPLOY_DIR
- name: Deploy
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
shell: bash
run: ./travis/deploy.sh
- name: Delete artifacts
uses: geekyeggo/delete-artifact@v4
with:
name: |
osx-aarch64-cctools
osx-cctools
- name: Log Failure
uses: sarisia/actions-status-discord@v1
if: failure()
with:
nodetail: true
description: |
[[${{ github.event.repository.name }}] ${{ github.job }} failed on ${{ github.ref }}](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}})
title: |
color: 0xff0000
webhook: ${{ secrets.DISCORD_WEBHOOK }}
avatar_url: https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png
username: Github
Notify-success:
runs-on: ubuntu-latest
env:
DEPLOY_BRANCH: travis-osx-universal
TRAVIS_OS_NAME: osx
needs: [ Windows, Linux-musl, Linux-musl-apicheck, Android, Mac-os-universal-cctools ]
steps:
- name: Log Success
uses: sarisia/actions-status-discord@v1
with:
nodetail: true
description: |
[[${{ github.event.repository.name }}] Build EDOPro-core success on ${{ github.ref }}](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}})
title: |
color: 0x0f9826
webhook: ${{ secrets.DISCORD_WEBHOOK }}
avatar_url: https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png
username: Github