Skip to content

v11

v11 #67

Workflow file for this run

name: build Circuit Artist artifacts
on: [ push ]
jobs:
build-artifacts:
strategy:
matrix:
kinds:
- machine: macos-14
# language=sh
build: |
set -euo pipefail
# Clean any previous LuaJIT build
make -C LuaJIT clean || true
mkdir build
cd build
cmake -G 'Unix Makefiles' -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 ..
# Build LuaJIT with deployment target set
MACOSX_DEPLOYMENT_TARGET=11.0 make -C ../LuaJIT
cmake --build .
cd ..
mkdir -p dist/bin
cp build/ca dist/bin/
# Copy only the actual dylib files, not symlinks
find build -name "*.dylib" -type f -exec cp {} dist/bin/ \;
# Copy LuaJIT library with expected name
cp LuaJIT/src/libluajit.so dist/bin/libluajit-5.1.2.dylib
# Fix the install name in the LuaJIT library itself
install_name_tool -id @executable_path/libluajit-5.1.2.dylib dist/bin/libluajit-5.1.2.dylib
# Fix the hardcoded library path in the executable
install_name_tool -change /usr/local/lib/libluajit-5.1.2.dylib @executable_path/libluajit-5.1.2.dylib dist/bin/ca
cp -r luasrc dist/
cp -r assets dist/
echo "Contents of dist/bin:"
ls -la dist/bin/
echo "Checking library paths in executable:"
otool -L dist/bin/ca
echo "Checking library install name:"
otool -L dist/bin/libluajit-5.1.2.dylib
- machine: windows-2025
# thankfully, windows-2019 ships with cmake in %ProgramFiles%
# language=PowerShell
build: |
cd LuaJIT/src
cmd /c msvcbuild.bat
cd ../..
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
cmake --build . --config Release
cd ..
mkdir -p dist/bin
cp build/Release/ca.exe dist/bin/
cp build/Release/*.dll dist/bin/ -ErrorAction SilentlyContinue
cp LuaJIT/src/*.dll dist/bin/ -ErrorAction SilentlyContinue
cp -r luasrc dist/
cp -r assets dist/
gci -Path dist/bin -Recurse
runs-on: ${{ matrix.kinds.machine }}
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Setup MSVC
uses: ilammy/msvc-dev-cmd@v1
- name: cache luajit download
uses: actions/cache@v4
with:
key: ${{ matrix.kinds.machine }}-${{ hashFiles('CMakeLists.txt') }}
path: |
third_party/*.gz
- name: doit
run: ${{ matrix.kinds.build }}
- name: capture built artifact
uses: actions/upload-artifact@v4
with:
name: circuit-artist-${{ matrix.kinds.machine }}
path: dist/*
retention-days: 7