251e87abb0
- macos-13 (Intel) runners no longer available, use macos-15 (ARM64) - chmod +x build_detect_platform before LevelDB build - Simplify to single ARM64 build for now Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
74 lines
2.3 KiB
YAML
74 lines
2.3 KiB
YAML
name: Build macOS
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build-macos:
|
|
runs-on: macos-15 # Apple Silicon runner (ARM64)
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
brew install qt@5 openssl@3 boost berkeley-db@5 leveldb libevent miniupnpc
|
|
|
|
- name: Build LevelDB
|
|
run: |
|
|
cd src/leveldb
|
|
chmod +x build_detect_platform
|
|
make clean || true
|
|
CC=clang CXX=clang++ make OPT="-O2" libleveldb.a libmemenv.a
|
|
|
|
- name: Run qmake
|
|
run: |
|
|
export PATH="/opt/homebrew/opt/qt@5/bin:$PATH"
|
|
qmake triangles-qt.pro -spec macx-clang \
|
|
"BOOST_INCLUDE_PATH=/opt/homebrew/opt/boost/include" \
|
|
"BOOST_LIB_PATH=/opt/homebrew/opt/boost/lib" \
|
|
"BDB_INCLUDE_PATH=/opt/homebrew/opt/berkeley-db@5/include" \
|
|
"BDB_LIB_PATH=/opt/homebrew/opt/berkeley-db@5/lib" \
|
|
"BDB_LIB_SUFFIX=" \
|
|
"OPENSSL_INCLUDE_PATH=/opt/homebrew/opt/openssl@3/include" \
|
|
"OPENSSL_LIB_PATH=/opt/homebrew/opt/openssl@3/lib" \
|
|
"MINIUPNPC_INCLUDE_PATH=/opt/homebrew/opt/miniupnpc/include" \
|
|
"MINIUPNPC_LIB_PATH=/opt/homebrew/opt/miniupnpc/lib" \
|
|
"EVENT_INCLUDE_PATH=/opt/homebrew/opt/libevent/include" \
|
|
"EVENT_LIB_PATH=/opt/homebrew/opt/libevent/lib" \
|
|
"RELEASE=1"
|
|
|
|
- name: Build
|
|
run: |
|
|
export PATH="/opt/homebrew/opt/qt@5/bin:$PATH"
|
|
make -j$(sysctl -n hw.ncpu)
|
|
|
|
- name: Create .app bundle
|
|
run: |
|
|
export PATH="/opt/homebrew/opt/qt@5/bin:$PATH"
|
|
macdeployqt Triangles-Qt.app -verbose=1
|
|
|
|
- name: Create DMG
|
|
run: |
|
|
mkdir -p dmg_contents
|
|
cp -R Triangles-Qt.app dmg_contents/
|
|
ln -s /Applications dmg_contents/Applications
|
|
hdiutil create -volname "Cryptographic Triangles" \
|
|
-srcfolder dmg_contents \
|
|
-ov -format UDZO \
|
|
"Cryptographic-Triangles-macos-arm64.dmg"
|
|
|
|
- name: Upload DMG
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: macos-arm64-dmg
|
|
path: "*.dmg"
|
|
|
|
- name: Upload to Release
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
files: "*.dmg"
|