Skip to content

Update library.cpp

Update library.cpp #32

Workflow file for this run

name: Build Lua Dynamic Library
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: macos-latest # Use a macOS environment to build the .dylib
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install Lua and LuaRocks
run: |
echo "Installing Lua and LuaRocks..."
brew install lua cmake luarocks
luarocks install luafilesystem # Install LuaFileSystem
- name: Build Dynamic Library
id: build
run: |
echo "Building the dynamic library..."
mkdir -p build
cmake -S . -B build -DCMAKE_OSX_ARCHITECTURES="arm64" # Specify source and build directories
cmake --build build --config Release # Build without changing directories
# Set the built library path as an output variable
echo "OUTPUT_LIB_PATH=build/libmylibrary.dylib" >> $GITHUB_ENV
- name: Export the built library
run: |
echo "Exporting the built library..."
mkdir -p output
cp /Users/runner/work/Aedaniss7s-script-executor-roblox/Aedaniss7s-script-executor-roblox/lib/libmylibrary.dylib output/ # Use the environment variable for the output path
- name: Check Build Output
run: |
echo "Checking the build output..."
if [ -f output/libmylibrary.dylib ]; then
echo "libmylibrary.dylib exists."
else
echo "libmylibrary.dylib does not exist."
exit 1 # Exit with error if the library does not exist
fi
- name: Upload library
uses: actions/upload-artifact@v3
with:
name: mylibrary
path: output/libmylibrary.dylib