-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (51 loc) · 2.07 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
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 dependencies
run: |
echo "Installing dependencies..."
# Install Homebrew packages
brew install lua cmake luarocks openssl sqlite3 pkg-config # Install Lua, CMake, LuaRocks, OpenSSL, SQLite, and pkg-config
brew install libzip json-c # Install libzip and JSON-C libraries for ZIP and JSON handling
# brew install aes # Install AES encryption library, if available
# Install LuaRocks libraries
luarocks install luafilesystem # Install LuaFileSystem
# Add any other LuaRocks packages you need here
# luarocks install <other-package-name>
- 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