c2e5cf4330
Every release now ships with Tor integrated: - Windows Qt/daemon: tor.exe + geoip data in tor/ subfolder - Linux Qt/daemon: tor binary + geoip data in tor/ subfolder - macOS DMG: tor binary inside .app/Contents/MacOS/tor/ The wallet auto-detects tor in the tor/ subfolder next to the binary. No user configuration needed - Tor starts automatically on launch. Release assets now packaged as archives (zip/tar.gz) to include the tor/ directory alongside the wallet binary.
397 lines
14 KiB
YAML
397 lines
14 KiB
YAML
name: Build All Platforms
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
tags: ['v*']
|
|
pull_request:
|
|
branches: [master]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
test-linux-unit:
|
|
runs-on: ubuntu-22.04
|
|
continue-on-error: true
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y build-essential libboost-all-dev \
|
|
libssl-dev libdb++-dev libleveldb-dev libevent-dev libminiupnpc-dev
|
|
|
|
- name: Build LevelDB
|
|
run: |
|
|
cd src/leveldb
|
|
chmod +x build_detect_platform
|
|
make clean || true
|
|
make OPT="-O2" libleveldb.a libmemenv.a
|
|
|
|
- name: Build and run unit tests
|
|
run: |
|
|
cd src
|
|
make -f makefile.unix test -j$(nproc)
|
|
./test_triangles --log_level=test_suite 2>&1 || true
|
|
|
|
build-windows-qt:
|
|
runs-on: windows-latest
|
|
defaults:
|
|
run:
|
|
shell: msys2 {0}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: msys2/setup-msys2@v2
|
|
with:
|
|
msystem: MINGW64
|
|
update: true
|
|
install: >-
|
|
mingw-w64-x86_64-gcc
|
|
mingw-w64-x86_64-qt5-base
|
|
mingw-w64-x86_64-qt5-tools
|
|
mingw-w64-x86_64-boost
|
|
mingw-w64-x86_64-openssl
|
|
mingw-w64-x86_64-db
|
|
mingw-w64-x86_64-libevent
|
|
mingw-w64-x86_64-miniupnpc
|
|
make
|
|
|
|
- name: Create Qt5 tool symlinks
|
|
run: |
|
|
ln -sf /mingw64/bin/qmake-qt5.exe /mingw64/bin/qmake.exe 2>/dev/null || true
|
|
ln -sf /mingw64/bin/lrelease-qt5.exe /mingw64/bin/lrelease.exe 2>/dev/null || true
|
|
ln -sf /mingw64/bin/windeployqt-qt5.exe /mingw64/bin/windeployqt.exe 2>/dev/null || true
|
|
|
|
- name: Clean stale build artifacts
|
|
run: rm -rf build/*.o build/*.h
|
|
|
|
- name: Build LevelDB
|
|
run: |
|
|
cd src/leveldb
|
|
make clean || true
|
|
CC=gcc CXX=g++ TARGET_OS=OS_WINDOWS_CROSSCOMPILE make OPT="-fno-keep-inline-dllexport -march=nocona -msahf -mtune=generic -Wa,-mbig-obj -O2" libleveldb.a libmemenv.a
|
|
|
|
- name: Run qmake
|
|
run: |
|
|
qmake triangles-qt.pro "RELEASE=1"
|
|
|
|
- name: Build
|
|
run: |
|
|
make -j$(nproc)
|
|
|
|
- name: Package
|
|
run: |
|
|
mkdir -p dist
|
|
cp release/triangles-qt.exe dist/
|
|
windeployqt dist/triangles-qt.exe || true
|
|
# Copy runtime DLLs
|
|
for dll in libgcc_s_seh-1.dll libstdc++-6.dll libwinpthread-1.dll; do
|
|
cp /mingw64/bin/$dll dist/ 2>/dev/null || true
|
|
done
|
|
|
|
- name: Strip binary
|
|
run: strip --strip-all dist/triangles-qt.exe
|
|
|
|
- name: Bundle Tor
|
|
shell: powershell
|
|
run: |
|
|
$TOR_VERSION = "14.0.8"
|
|
$TOR_URL = "https://archive.torproject.org/tor-package-archive/torbrowser/${TOR_VERSION}/tor-expert-bundle-windows-x86_64-${TOR_VERSION}.tar.gz"
|
|
Invoke-WebRequest -Uri $TOR_URL -OutFile tor-bundle.tar.gz
|
|
New-Item -ItemType Directory -Path tor-extract -Force
|
|
tar -xzf tor-bundle.tar.gz -C tor-extract
|
|
New-Item -ItemType Directory -Path dist/tor -Force
|
|
Copy-Item tor-extract/tor/tor.exe dist/tor/
|
|
Copy-Item tor-extract/tor/tor-gencert.exe dist/tor/ -ErrorAction SilentlyContinue
|
|
if (Test-Path tor-extract/tor/pluggable_transports) {
|
|
Copy-Item -Recurse tor-extract/tor/pluggable_transports dist/tor/
|
|
}
|
|
if (Test-Path tor-extract/data) {
|
|
Copy-Item -Recurse tor-extract/data dist/tor/data
|
|
}
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: windows-qt
|
|
path: dist/
|
|
|
|
build-windows-daemon:
|
|
runs-on: windows-latest
|
|
defaults:
|
|
run:
|
|
shell: msys2 {0}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: msys2/setup-msys2@v2
|
|
with:
|
|
msystem: MINGW64
|
|
update: true
|
|
install: >-
|
|
mingw-w64-x86_64-gcc
|
|
mingw-w64-x86_64-boost
|
|
mingw-w64-x86_64-openssl
|
|
mingw-w64-x86_64-db
|
|
mingw-w64-x86_64-libevent
|
|
mingw-w64-x86_64-miniupnpc
|
|
make
|
|
|
|
- name: Build LevelDB
|
|
run: |
|
|
cd src/leveldb
|
|
make clean || true
|
|
CC=gcc CXX=g++ TARGET_OS=OS_WINDOWS_CROSSCOMPILE make OPT="-fno-keep-inline-dllexport -march=nocona -msahf -mtune=generic -Wa,-mbig-obj -O2" libleveldb.a libmemenv.a
|
|
|
|
- name: Build daemon
|
|
run: |
|
|
set -eo pipefail
|
|
cd src
|
|
mkdir -p obj
|
|
make -f makefile.mingw DEPSDIR=/mingw64 all -j$(nproc) 2>&1
|
|
strip --strip-all trianglesd.exe
|
|
cp trianglesd.exe ../trianglesd.exe
|
|
|
|
- name: Bundle Tor
|
|
shell: powershell
|
|
run: |
|
|
$TOR_VERSION = "14.0.8"
|
|
$TOR_URL = "https://archive.torproject.org/tor-package-archive/torbrowser/${TOR_VERSION}/tor-expert-bundle-windows-x86_64-${TOR_VERSION}.tar.gz"
|
|
Invoke-WebRequest -Uri $TOR_URL -OutFile tor-bundle.tar.gz
|
|
New-Item -ItemType Directory -Path tor-extract -Force
|
|
tar -xzf tor-bundle.tar.gz -C tor-extract
|
|
New-Item -ItemType Directory -Path daemon-dist/tor -Force
|
|
Copy-Item trianglesd.exe daemon-dist/
|
|
Copy-Item tor-extract/tor/tor.exe daemon-dist/tor/
|
|
if (Test-Path tor-extract/data) {
|
|
Copy-Item -Recurse tor-extract/data daemon-dist/tor/data
|
|
}
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: windows-daemon
|
|
path: daemon-dist/
|
|
|
|
build-linux-qt:
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set VERSION from source
|
|
run: |
|
|
MAJOR=$(grep 'CLIENT_VERSION_MAJOR' src/clientversion.h | awk '{print $3}')
|
|
MINOR=$(grep 'CLIENT_VERSION_MINOR' src/clientversion.h | awk '{print $3}')
|
|
REV=$(grep 'CLIENT_VERSION_REVISION' src/clientversion.h | awk '{print $3}')
|
|
echo "VERSION=${MAJOR}.${MINOR}.${REV}" >> $GITHUB_ENV
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y build-essential qt5-qmake qtbase5-dev \
|
|
qttools5-dev-tools libboost-all-dev libssl-dev libdb++-dev \
|
|
libleveldb-dev libevent-dev libminiupnpc-dev
|
|
|
|
- name: Build LevelDB
|
|
run: |
|
|
cd src/leveldb
|
|
chmod +x build_detect_platform
|
|
make clean || true
|
|
make OPT="-O2" libleveldb.a libmemenv.a
|
|
|
|
- name: Clean stale build artifacts
|
|
run: rm -rf build/*.o
|
|
|
|
- name: Run qmake
|
|
run: qmake triangles-qt.pro "RELEASE=1"
|
|
|
|
- name: Build
|
|
run: make -j$(nproc)
|
|
|
|
- name: Strip binary
|
|
run: strip --strip-all triangles-qt
|
|
|
|
- name: Bundle Tor
|
|
run: |
|
|
TOR_VERSION="14.0.8"
|
|
curl -sL "https://archive.torproject.org/tor-package-archive/torbrowser/${TOR_VERSION}/tor-expert-bundle-linux-x86_64-${TOR_VERSION}.tar.gz" -o tor-bundle.tar.gz
|
|
mkdir -p tor-extract && tar -xzf tor-bundle.tar.gz -C tor-extract
|
|
mkdir -p linux-qt-dist/tor
|
|
mv triangles-qt "linux-qt-dist/Cryptographic-Triangles-v${VERSION}-linux-x64-qt"
|
|
cp tor-extract/tor/tor linux-qt-dist/tor/
|
|
chmod +x linux-qt-dist/tor/tor
|
|
cp -r tor-extract/data linux-qt-dist/tor/data
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: linux-qt
|
|
path: linux-qt-dist/
|
|
|
|
build-linux-daemon:
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set VERSION from source
|
|
run: |
|
|
MAJOR=$(grep 'CLIENT_VERSION_MAJOR' src/clientversion.h | awk '{print $3}')
|
|
MINOR=$(grep 'CLIENT_VERSION_MINOR' src/clientversion.h | awk '{print $3}')
|
|
REV=$(grep 'CLIENT_VERSION_REVISION' src/clientversion.h | awk '{print $3}')
|
|
echo "VERSION=${MAJOR}.${MINOR}.${REV}" >> $GITHUB_ENV
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y build-essential libboost-all-dev \
|
|
libssl-dev libdb++-dev libleveldb-dev libevent-dev libminiupnpc-dev
|
|
|
|
- name: Build LevelDB
|
|
run: |
|
|
cd src/leveldb
|
|
chmod +x build_detect_platform
|
|
make clean || true
|
|
make OPT="-O2" libleveldb.a libmemenv.a
|
|
|
|
- name: Build daemon
|
|
run: |
|
|
cd src
|
|
mkdir -p obj
|
|
make -f makefile.unix trianglesd -j$(nproc)
|
|
|
|
- name: Strip binary
|
|
run: strip --strip-all src/trianglesd
|
|
|
|
- name: Bundle Tor
|
|
run: |
|
|
TOR_VERSION="14.0.8"
|
|
curl -sL "https://archive.torproject.org/tor-package-archive/torbrowser/${TOR_VERSION}/tor-expert-bundle-linux-x86_64-${TOR_VERSION}.tar.gz" -o tor-bundle.tar.gz
|
|
mkdir -p tor-extract && tar -xzf tor-bundle.tar.gz -C tor-extract
|
|
mkdir -p linux-daemon-dist/tor
|
|
mv src/trianglesd "linux-daemon-dist/Cryptographic-Triangles-v${VERSION}-linux-x64-daemon"
|
|
cp tor-extract/tor/tor linux-daemon-dist/tor/
|
|
chmod +x linux-daemon-dist/tor/tor
|
|
cp -r tor-extract/data linux-daemon-dist/tor/data
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: linux-daemon
|
|
path: linux-daemon-dist/
|
|
|
|
build-macos:
|
|
runs-on: macos-15
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set VERSION from source
|
|
run: |
|
|
MAJOR=$(grep 'CLIENT_VERSION_MAJOR' src/clientversion.h | awk '{print $3}')
|
|
MINOR=$(grep 'CLIENT_VERSION_MINOR' src/clientversion.h | awk '{print $3}')
|
|
REV=$(grep 'CLIENT_VERSION_REVISION' src/clientversion.h | awk '{print $3}')
|
|
echo "VERSION=${MAJOR}.${MINOR}.${REV}" >> $GITHUB_ENV
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
brew install qt@5 openssl@3 boost berkeley-db@5 leveldb libevent miniupnpc
|
|
|
|
- name: Clean stale build artifacts
|
|
run: rm -rf build/*.o build/*.h
|
|
|
|
- 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: Bundle Tor into app
|
|
run: |
|
|
TOR_VERSION="14.0.8"
|
|
curl -sL "https://archive.torproject.org/tor-package-archive/torbrowser/${TOR_VERSION}/tor-expert-bundle-macos-aarch64-${TOR_VERSION}.tar.gz" -o tor-bundle.tar.gz
|
|
mkdir -p tor-extract && tar -xzf tor-bundle.tar.gz -C tor-extract
|
|
mkdir -p Triangles-Qt.app/Contents/MacOS/tor
|
|
cp tor-extract/tor/tor Triangles-Qt.app/Contents/MacOS/tor/
|
|
chmod +x Triangles-Qt.app/Contents/MacOS/tor/tor
|
|
cp -r tor-extract/data Triangles-Qt.app/Contents/MacOS/tor/data
|
|
|
|
- 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-v${VERSION}-macos-arm64.dmg"
|
|
|
|
- name: Upload DMG
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: macos-arm64-dmg
|
|
path: "*.dmg"
|
|
|
|
release:
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
needs: [build-windows-qt, build-windows-daemon, build-linux-qt, build-linux-daemon, build-macos]
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- name: Set VERSION from tag
|
|
run: echo "VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_ENV
|
|
|
|
- name: Download all artifacts
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
path: artifacts
|
|
|
|
- name: Prepare release assets
|
|
run: |
|
|
mkdir -p release
|
|
# Windows Qt (zip with Tor bundle included)
|
|
cd artifacts/windows-qt && zip -r ../../release/Cryptographic-Triangles-${VERSION}-win-x64-qt.zip . && cd ../..
|
|
# Windows daemon (zip with Tor bundle included)
|
|
cd artifacts/windows-daemon && zip -r ../../release/Cryptographic-Triangles-${VERSION}-win-x64-daemon.zip . && cd ../..
|
|
# Linux Qt (tar.gz with Tor bundle)
|
|
cd artifacts/linux-qt && tar -czf ../../release/Cryptographic-Triangles-${VERSION}-linux-x64-qt.tar.gz . && cd ../..
|
|
# Linux daemon (tar.gz with Tor bundle)
|
|
cd artifacts/linux-daemon && tar -czf ../../release/Cryptographic-Triangles-${VERSION}-linux-x64-daemon.tar.gz . && cd ../..
|
|
# macOS
|
|
cp artifacts/macos-arm64-dmg/*.dmg release/
|
|
ls -la release/
|
|
|
|
- name: Create Release
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
files: release/*
|
|
generate_release_notes: true
|