Skip to content

fixed boost::asio::spawn #2363

fixed boost::asio::spawn

fixed boost::asio::spawn #2363

Workflow file for this run

name: Build
on: [push]
permissions:
contents: read
env:
BUILD_TYPE: Release
BUILD_CONFIG: RelWithDebInfo
BEAM_DEFAULT_NETWORK: mainnet
QT_VERSION: "6.8.3"
defaults:
run:
shell: bash
jobs:
###############################################################################
# Build Desktop
###############################################################################
build_desktop:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-15, ubuntu-22.04, windows-2022]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Submodule update
run: |
git submodule update --init --recursive --jobs 4
cd beam
git apply 3rdparty/protobuf-patch.diff
###############################################################################
# Create Build Environment
###############################################################################
- name: OS name [macos && windows]
if: startsWith(matrix.os, 'macos') || startsWith(matrix.os, 'windows')
run: echo "PACKAGE_NAME=${{runner.os}}" >> $GITHUB_ENV
- name: OS name [ubuntu]
if: startsWith(matrix.os, 'ubuntu')
run: echo "PACKAGE_NAME=Linux" >> $GITHUB_ENV
- name: Create Build Environment [macos]
if: startsWith(matrix.os, 'macos')
run: |
echo $GITHUB_WORKSPACE
echo "OPENSSL_ROOT_DIR=$(brew --prefix openssl@3)" >> $GITHUB_ENV
export TZ=GMT-3
sudo systemsetup -gettimezone
# Go proxy configuration for IPFS dependencies (if enabled)
echo "GOPROXY=https://proxy.golang.org,direct" >> $GITHUB_ENV
echo "GOSUMDB=sum.golang.org" >> $GITHUB_ENV
echo "GOPRIVATE=" >> $GITHUB_ENV
security create-keychain -p github macos-build.keychain
security default-keychain -s macos-build.keychain
security unlock-keychain -p github macos-build.keychain
security set-keychain-settings -t 3600 -l ~/Library/Keychains/macos-build.keychain
echo "${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }}" | base64 --decode > certificate.p12
security import certificate.p12 -k macos-build.keychain -P ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_PASSWORD }} -T /usr/bin/codesign
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k github macos-build.keychain
- name: Create Build Environment [ubuntu]
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt update
sudo apt install build-essential -y
sudo apt install libssl-dev curl libcups2-dev mesa-common-dev ^libxcb.* libglu1-mesa-dev libglfw3-dev libgles2-mesa-dev libfontconfig1-dev libudev-dev -y
sudo apt install libfreetype6-dev libx11-dev libx11-xcb-dev libxext-dev libxfixes-dev libxi-dev libxrender-dev libxkbcommon-dev libxkbcommon-x11-dev libpci-dev libicu-dev -y
sudo apt install libwebp-dev libzstd-dev libbsd-dev uuid-dev liblzma-dev libtiff-dev -y
- name: Create Build Environment [windows]
if: startsWith(matrix.os, 'windows')
shell: powershell
run: |
$ErrorActionPreference = 'Stop'
Write-Host "Installing OpenSSL 3.6.1 via Chocolatey..."
choco install openssl --version=3.6.1 -y --limit-output
Write-Host "Locating OpenSSL installation..."
$candidateRoots = @(
"C:\Program Files\OpenSSL-Win64",
"C:\Program Files\OpenSSL",
"C:\OpenSSL-Win64",
"C:\OpenSSL"
)
$opensslPath = $candidateRoots | Where-Object { Test-Path $_ } | Select-Object -First 1
if (-not $opensslPath) {
$probe = Get-ChildItem "C:\Program Files" -Filter "OpenSSL*" -Directory -ErrorAction SilentlyContinue | Select-Object -First 1
if ($probe) { $opensslPath = $probe.FullName }
}
if (-not $opensslPath) {
throw "OpenSSL not found after installation. Checked: $($candidateRoots -join ', ')"
}
# Validate required components
$includePath = Join-Path $opensslPath 'include'
$binPath = Join-Path $opensslPath 'bin'
$cryptoDll = Join-Path $binPath 'libcrypto-3-x64.dll'
$sslDll = Join-Path $binPath 'libssl-3-x64.dll'
if (-not (Test-Path $includePath)) {
throw "OpenSSL include directory not found at: $includePath"
}
if (-not (Test-Path $cryptoDll) -or -not (Test-Path $sslDll)) {
throw "OpenSSL DLLs not found at: $binPath"
}
# Export to GitHub environment
Add-Content -Path $env:GITHUB_ENV -Value "OPENSSL_ROOT_DIR=$opensslPath"
Write-Host "OpenSSL configured at: $opensslPath"
- name: Download Boost [windows]
if: startsWith(matrix.os, 'windows')
run: |
git clone --depth=1 https://github.com/BeamMW/boost_prebuild_${{matrix.os}}.git c:/boost_prebuild
echo "BOOST_ROOT=c:\boost_prebuild" >> $GITHUB_ENV
- name: Download boost [ubuntu && macos]
if: "!startsWith(matrix.os, 'windows')"
run: |
git clone --depth=1 https://github.com/BeamMW/boost_prebuild_${{matrix.os}}.git ${{runner.workspace}}/boost_prebuild
echo "BOOST_INCLUDEDIR=${{runner.workspace}}/boost_prebuild/include" >> $GITHUB_ENV
echo "BOOST_LIBRARYDIR=${{runner.workspace}}/boost_prebuild/lib/" >> $GITHUB_ENV
###############################################################################
# Install Qt6
###############################################################################
- name: Install Qt6
uses: jurplel/install-qt-action@v4
with:
version: ${{ env.QT_VERSION }}
modules: "qthttpserver qt5compat qtwebchannel qtpositioning qtshadertools qtwebengine qtwebsockets qtserialport"
cache: true
cache-key-prefix: "qt-${{ matrix.os }}"
###############################################################################
# Configure CMake
###############################################################################
- name: Configure CMake [macos]
if: startsWith(matrix.os, 'macos')
run: |
cmake -B build -S $GITHUB_WORKSPACE \
-DBEAM_DEFAULT_NETWORK=$BEAM_DEFAULT_NETWORK \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
-DDEBUG_MESSAGES_IN_RELEASE_MODE=On \
-DBEAM_LINK_TYPE=Static \
-DBRANCH_NAME=${GITHUB_REF##*/} \
-DBEAM_SIGN_MACOS_BINARY=On \
-DBEAM_SIGN_IDENTITY="${{secrets.MACOS_SIGN_IDENTITY}}" \
-DBEAM_HW_WALLET=Off
- name: Configure CMake [ubuntu]
if: startsWith(matrix.os, 'ubuntu')
run: |
cmake -B build -S $GITHUB_WORKSPACE \
-DBEAM_DEFAULT_NETWORK=$BEAM_DEFAULT_NETWORK \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
-DCMAKE_INSTALL_PREFIX=/usr \
-DDEBUG_MESSAGES_IN_RELEASE_MODE=On \
-DBEAM_LINK_TYPE=Static \
-DBRANCH_NAME=${GITHUB_REF##*/} \
-DBEAM_HW_WALLET=Off
- name: Configure CMake [windows]
if: startsWith(matrix.os, 'windows')
run: |
cmake -B build -S $GITHUB_WORKSPACE \
-G "Visual Studio 17 2022" -A x64 \
-DBEAM_DEFAULT_NETWORK=$BEAM_DEFAULT_NETWORK \
-DCMAKE_CONFIGURATION_TYPES:STRING=$BUILD_CONFIG \
-DBEAM_LINK_TYPE=Static \
-DBRANCH_NAME=${GITHUB_REF##*/} \
-DBEAM_HW_WALLET=Off \
-DOPENSSL_ROOT_DIR="$OPENSSL_ROOT_DIR"
- name: Save version info
run: |
echo "BEAM_VERSION=$(cat beam_version.gen)" >> $GITHUB_ENV
echo "BEAM_TARGET_SUFFIX=" >> $GITHUB_ENV
echo "BEAM_DISPLAY_SUFFIX=" >> $GITHUB_ENV
echo "BEAM_DISPLAY_SUFFIX2=" >> $GITHUB_ENV
echo "BEAM_DISPLAY_SUFFIX3=" >> $GITHUB_ENV
echo "BEAM_DISPLAY_SUFFIX4=" >> $GITHUB_ENV
rm beam_version.gen
###############################################################################
# Build
###############################################################################
- name: Build [macos]
if: startsWith(matrix.os, 'macos')
run: cmake --build build --parallel 3 --config $BUILD_TYPE
- name: Build [ubuntu]
if: startsWith(matrix.os, 'ubuntu')
run: cmake --build build --parallel 4 --config $BUILD_TYPE
- name: Build [windows]
if: startsWith(matrix.os, 'windows')
run: cmake --build build --parallel 4 --config $BUILD_CONFIG
###############################################################################
# Pack
###############################################################################
- name: CPack [macos && ubuntu]
if: "!startsWith(matrix.os, 'windows')"
run: cd build && cpack
- name: AppImage [ubuntu]
if: startsWith(matrix.os, 'ubuntu')
env:
QMAKE: ${{ env.QT_ROOT_DIR }}/bin/qmake
QML_SOURCES_PATHS: ${{ github.workspace }}/ui/view
run: |
echo "Installing FUSE"
sudo add-apt-repository universe
sudo apt install -y libfuse2
echo "Downloading linuxdeploy and Qt plugin"
wget -q "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage"
wget -q "https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage"
chmod a+x linuxdeploy*.AppImage
echo "Creating AppImage deploy tree"
mkdir -p ./deploy/usr/bin
mkdir -p ./deploy/usr/share/applications
mkdir -p ./deploy/usr/share/icons/hicolor/256x256/apps
mkdir -p ./deploy/usr/share/icons/hicolor/256x256/mimetypes
mkdir -p ./deploy/usr/share/mime/packages
echo "Copying files to AppImage deploy tree"
cp build/ui/BeamWallet${{env.BEAM_DISPLAY_SUFFIX}} deploy/usr/bin/
cp build/ui/dapps_store_app.wasm deploy/usr/bin/
cp -r build/ui/apps deploy/usr/bin/
cp ui/beam.png deploy/usr/share/icons/hicolor/256x256/apps/
cp ui/beam.png deploy/usr/share/icons/hicolor/256x256/mimetypes/application-x-beam-dapp.png
cp ui/x-beam-dapp.xml deploy/usr/share/mime/packages
cp ui/beam.desktop deploy/usr/share/applications/BeamWallet${{env.BEAM_DISPLAY_SUFFIX}}.desktop
# Fix Exec path for AppImage - use relative path instead of absolute system path
sed -i 's|Exec=/usr/bin/BeamWallet|Exec=BeamWallet|g' deploy/usr/share/applications/BeamWallet${{env.BEAM_DISPLAY_SUFFIX}}.desktop
cp ui/beam-wallet.cfg deploy/usr/bin/
echo "Creating AppImage"
export VERSION=${{env.BEAM_VERSION}}
./linuxdeploy-x86_64.AppImage \
--appdir deploy \
--desktop-file deploy/usr/share/applications/BeamWallet${{env.BEAM_DISPLAY_SUFFIX}}.desktop \
--icon-file deploy/usr/share/icons/hicolor/256x256/apps/beam.png \
--plugin qt \
--output appimage \
--exclude-library "libnss3.so" \
--exclude-library "libnssutil3.so"
- name: CPack [windows]
if: startsWith(matrix.os, 'windows')
run: cd build && cpack.exe --verbose -G NSIS -C $BUILD_CONFIG
###############################################################################
# Collect artifacts
###############################################################################
- name: Collect [macos]
if: startsWith(matrix.os, 'macos')
run: |
cp build/BeamWallet${{env.BEAM_DISPLAY_SUFFIX}}-${{env.BEAM_VERSION}}-Darwin.dmg Beam-Wallet${{env.BEAM_DISPLAY_SUFFIX2}}-${{env.BEAM_VERSION}}.dmg
codesign --deep --force -v -s "${{secrets.MACOS_SIGN_IDENTITY}}" -o runtime --timestamp Beam-Wallet${{env.BEAM_DISPLAY_SUFFIX2}}-${{env.BEAM_VERSION}}.dmg
- name: Notarize [macos]
if: startsWith(matrix.os, 'macos')
env:
MACOS_NOTARIZE_USER: ${{ secrets.MACOS_NOTARIZE_USER }}
MACOS_NOTARIZE_PASS: ${{ secrets.MACOS_NOTARIZE_PASS }}
MACOS_NOTARIZE_PROVIDER: ${{ secrets.MACOS_NOTARIZE_PROVIDER }}
BEAM_WALLET_UI_IN: Beam-Wallet${{env.BEAM_DISPLAY_SUFFIX2}}-${{env.BEAM_VERSION}}.dmg
run: |
chmod +x ./notarize.sh
./notarize.sh
shasum -a 256 Beam-Wallet${{env.BEAM_DISPLAY_SUFFIX2}}-${{env.BEAM_VERSION}}.dmg > checksum.txt
- name: Configure GPG Key [ubuntu]
if: startsWith(matrix.os, 'ubuntu')
run: |
echo -n "$GPG_SIGNING_KEY" | gpg2 --import
env:
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}
- name: Sign AppImage [ubuntu]
if: startsWith(matrix.os, 'ubuntu')
run: |
mkdir signing
cd signing
# Download AppImageTool
wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
sudo chmod +x appimagetool-x86_64.AppImage
cp ../Beam_Wallet${{env.BEAM_DISPLAY_SUFFIX4}}-${{env.BEAM_VERSION}}-x86_64.AppImage .
# Extract, sign and pack AppImage
./Beam_Wallet${{env.BEAM_DISPLAY_SUFFIX4}}-${{env.BEAM_VERSION}}-x86_64.AppImage --appimage-extract
./appimagetool-x86_64.AppImage squashfs-root --sign
mv Beam_Wallet${{env.BEAM_DISPLAY_SUFFIX4}}-x86_64.AppImage ../Beam_Wallet${{env.BEAM_DISPLAY_SUFFIX4}}-${{env.BEAM_VERSION}}-x86_64.AppImage
# Output signature
../Beam_Wallet${{env.BEAM_DISPLAY_SUFFIX4}}-${{env.BEAM_VERSION}}-x86_64.AppImage --appimage-signature
- name: Collect [ubuntu]
if: startsWith(matrix.os, 'ubuntu')
run: |
cp Beam_Wallet${{env.BEAM_DISPLAY_SUFFIX4}}-${{env.BEAM_VERSION}}-x86_64.AppImage Beam-Wallet${{env.BEAM_DISPLAY_SUFFIX2}}-${{env.BEAM_VERSION}}.AppImage
sha256sum Beam-Wallet${{env.BEAM_DISPLAY_SUFFIX2}}-${{env.BEAM_VERSION}}.AppImage > Beam-Wallet${{env.BEAM_DISPLAY_SUFFIX2}}-${{env.BEAM_VERSION}}.AppImage-checksum.txt
chmod a+x Beam-Wallet${{env.BEAM_DISPLAY_SUFFIX2}}-${{env.BEAM_VERSION}}.AppImage
- name: Collect [windows]
if: startsWith(matrix.os, 'windows')
run: |
cp build/BeamWallet${{env.BEAM_DISPLAY_SUFFIX}}-${{env.BEAM_VERSION}}-win64.exe Beam-Wallet${{env.BEAM_DISPLAY_SUFFIX2}}-${{env.BEAM_VERSION}}.exe
certUtil -hashfile Beam-Wallet${{env.BEAM_DISPLAY_SUFFIX2}}-${{env.BEAM_VERSION}}.exe SHA256 > checksum.txt
###############################################################################
# Upload
###############################################################################
- uses: actions/upload-artifact@v4
if: startsWith(matrix.os, 'windows') || startsWith(matrix.os, 'macos')
with:
name: ${{env.PACKAGE_NAME}}-Beam-Wallet${{env.BEAM_DISPLAY_SUFFIX2}}-${{env.BEAM_VERSION}}
path: |
Beam-Wallet${{env.BEAM_DISPLAY_SUFFIX2}}-${{env.BEAM_VERSION}}*
*checksum.txt
if-no-files-found: error
- uses: actions/upload-artifact@v4
if: startsWith(matrix.os, 'ubuntu')
with:
name: ${{env.PACKAGE_NAME}}-Beam-Wallet${{env.BEAM_DISPLAY_SUFFIX2}}-${{env.BEAM_VERSION}}
path: |
Beam-Wallet${{env.BEAM_DISPLAY_SUFFIX2}}-${{env.BEAM_VERSION}}.AppImage
Beam-Wallet${{env.BEAM_DISPLAY_SUFFIX2}}-${{env.BEAM_VERSION}}.AppImage-checksum.txt
if-no-files-found: error
- uses: actions/upload-artifact@v4
if: startsWith(matrix.os, 'windows')
with:
name: beam-pdb${{env.BEAM_TARGET_SUFFIX}}-${{env.BEAM_VERSION}}
path: build/ui/${{env.BUILD_CONFIG}}/Beam Wallet${{env.BEAM_DISPLAY_SUFFIX3}}.pdb
if-no-files-found: error