forked from such-gitea/wownero
Compare commits
6 Commits
wow_1140_1
...
v0.11.4.0
| Author | SHA1 | Date | |
|---|---|---|---|
| c04ab0b3b8 | |||
| 115cc7199b | |||
| c91af646d6 | |||
| 48935978f7 | |||
| 32106203a3 | |||
| 7136ae9788 |
117
.gitea/workflows/build.yaml
Normal file
117
.gitea/workflows/build.yaml
Normal file
@@ -0,0 +1,117 @@
|
||||
name: Build Wownero Core (Clean / Boost 1.90 / CMake 3.28)
|
||||
on:
|
||||
push:
|
||||
branches: [ master, main ]
|
||||
tags: [ 'v*' ]
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
NODE_TLS_REJECT_UNAUTHORIZED: '0'
|
||||
|
||||
jobs:
|
||||
build-all:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: wownero-builder-base:latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
target:
|
||||
- x86_64-linux-gnu # Linux x64
|
||||
- x86_64-w64-mingw32 # Windows x64
|
||||
- aarch64-linux-gnu # Linux ARM64
|
||||
- riscv64-linux-gnu # Linux RISC-V
|
||||
- x86_64-apple-darwin11 # macOS Intel
|
||||
- aarch64-apple-darwin11 # macOS ARM
|
||||
|
||||
steps:
|
||||
- name: Fix DNS
|
||||
run: echo "192.168.88.230 git.such.software" >> /etc/hosts
|
||||
|
||||
- name: Checkout
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
rm -rf *
|
||||
git config --global --add safe.directory '*'
|
||||
|
||||
# --- CRITICAL FIX: FORCE LOCAL MIRRORS ---
|
||||
# These lines tell Git: "If you try to go to Codeberg, GO HERE INSTEAD."
|
||||
# We use the internal port 3000 and the token to ensure access.
|
||||
|
||||
# 1. Catch 'https://codeberg.org/wownero/RandomWOW' (no .git)
|
||||
git config --global url."http://oauth2:${GITHUB_TOKEN}@git.such.software:3000/Builds/RandomWOW.git".insteadOf "https://codeberg.org/wownero/RandomWOW"
|
||||
|
||||
# 2. Catch 'https://codeberg.org/wownero/RandomWOW.git' (with .git)
|
||||
git config --global url."http://oauth2:${GITHUB_TOKEN}@git.such.software:3000/Builds/RandomWOW.git".insteadOf "https://codeberg.org/wownero/RandomWOW.git"
|
||||
|
||||
# 3. Main Clone
|
||||
git clone http://oauth2:$GITHUB_TOKEN@git.such.software:3000/${{ github.repository }}.git .
|
||||
|
||||
# 4. Now update submodules (It will use the re-written URLs above)
|
||||
git submodule update --init --recursive
|
||||
|
||||
- name: Download macOS SDK
|
||||
if: contains(matrix.target, 'apple')
|
||||
run: |
|
||||
mkdir -p contrib/depends/SDKs
|
||||
curl -L -k -o contrib/depends/SDKs/MacOSX10.15.sdk.tar.gz \
|
||||
"https://github.com/phracker/MacOSX-SDKs/releases/download/10.15/MacOSX10.15.sdk.tar.gz"
|
||||
|
||||
- name: Install Modern CMake
|
||||
run: |
|
||||
echo "Installing CMake 3.28.1..."
|
||||
curl -L -o cmake.tar.gz https://github.com/Kitware/CMake/releases/download/v3.28.1/cmake-3.28.1-linux-x86_64.tar.gz
|
||||
tar -xf cmake.tar.gz
|
||||
# Add new cmake to PATH
|
||||
echo "$(pwd)/cmake-3.28.1-linux-x86_64/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: Build Dependencies
|
||||
run: |
|
||||
cd contrib/depends
|
||||
# This builds Boost 1.90.0 using your updated boost.mk
|
||||
make HOST=${{ matrix.target }} -j$(nproc)
|
||||
|
||||
- name: Build Wownero Core
|
||||
run: |
|
||||
PREFIX=$(pwd)/contrib/depends/${{ matrix.target }}
|
||||
mkdir build && cd build
|
||||
|
||||
# Use the new 'cmake' (v3.28)
|
||||
cmake .. \
|
||||
-DCMAKE_TOOLCHAIN_FILE=../contrib/depends/${{ matrix.target }}/share/toolchain.cmake \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DBUILD_STATIC=ON
|
||||
|
||||
make -j$(nproc)
|
||||
|
||||
- name: Package Artifacts
|
||||
run: |
|
||||
LIB_DIR="contrib/depends/${{ matrix.target }}/lib"
|
||||
INC_DIR="contrib/depends/${{ matrix.target }}/include"
|
||||
mkdir -p output/lib output/include output/bin
|
||||
find build/bin -type f -exec cp {} output/bin/ \;
|
||||
cp $LIB_DIR/*.a output/lib/
|
||||
find build -name "*.a" -exec cp {} output/lib/ \;
|
||||
cp -r src output/include/wownero-src
|
||||
cp -r $INC_DIR/* output/include/
|
||||
tar -czf wownero-core-${{ matrix.target }}.tar.gz -C output .
|
||||
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: wownero-core-${{ matrix.target }}
|
||||
path: wownero-core-${{ matrix.target }}.tar.gz
|
||||
|
||||
release:
|
||||
needs: build-all
|
||||
runs-on: ubuntu-latest
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
steps:
|
||||
- name: Download Artifacts
|
||||
uses: actions/download-artifact@v3
|
||||
- name: Publish Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
files: |
|
||||
wownero-core-*/wownero-core-*.tar.gz
|
||||
@@ -1,36 +1,38 @@
|
||||
package=boost
|
||||
$(package)_version=1.69.0
|
||||
package=boost
|
||||
$(package)_version=1.90.0
|
||||
$(package)_download_path=https://archives.boost.io/release/$($(package)_version)/source/
|
||||
$(package)_file_name=$(package)_$(subst .,_,$($(package)_version)).tar.gz
|
||||
$(package)_sha256_hash=9a2c2819310839ea373f42d69e733c339b4e9a19deab6bfec448281554aa4dbb
|
||||
$(package)_file_name=$(package)_$(subst .,_,$($(package)_version)).tar.bz2
|
||||
$(package)_sha256_hash=49551aff3b22cbc5c5a9ed3dbc92f0e23ea50a0f7325b0d198b705e8ee3fc305
|
||||
$(package)_dependencies=libiconv
|
||||
$(package)_patches=fix_aroptions.patch fix_arm_arch.patch
|
||||
|
||||
define $(package)_set_vars
|
||||
$(package)_config_opts_release=variant=release
|
||||
$(package)_config_opts_debug=variant=debug
|
||||
$(package)_config_opts+=--layout=system --user-config=user-config.jam
|
||||
$(package)_config_opts+=threading=multi link=static -sNO_BZIP2=1 -sNO_ZLIB=1
|
||||
$(package)_config_opts_linux=threadapi=pthread runtime-link=shared
|
||||
$(package)_config_opts_android=threadapi=pthread runtime-link=static target-os=android
|
||||
$(package)_config_opts_darwin=--toolset=darwin runtime-link=shared
|
||||
$(package)_config_opts_mingw32=binary-format=pe target-os=windows threadapi=win32 runtime-link=static
|
||||
$(package)_config_opts_x86_64_mingw32=address-model=64
|
||||
$(package)_config_opts_i686_mingw32=address-model=32
|
||||
$(package)_config_opts_i686_linux=address-model=32 architecture=x86
|
||||
$(package)_toolset_$(host_os)=gcc
|
||||
$(package)_archiver_$(host_os)=$($(package)_ar)
|
||||
$(package)_toolset_darwin=darwin
|
||||
$(package)_archiver_darwin=$($(package)_libtool)
|
||||
$(package)_config_libraries=chrono,filesystem,program_options,system,thread,test,date_time,regex,serialization,locale
|
||||
$(package)_cxxflags=-std=c++11
|
||||
$(package)_cxxflags_linux=-fPIC
|
||||
$(package)_cxxflags_freebsd=-fPIC
|
||||
$(package)_config_opts_release=variant=release
|
||||
$(package)_config_opts_debug=variant=debug
|
||||
|
||||
# KEY FIX: Use 'system' layout to avoid weird naming (libboost_filesystem.a vs libboost_filesystem-mt-x64.a)
|
||||
$(package)_config_opts+=--layout=system --user-config=user-config.jam
|
||||
$(package)_config_opts+=threading=multi link=static -sNO_BZIP2=1 -sNO_ZLIB=1
|
||||
|
||||
# CRITICAL: Force static runtime for Linux to fix "Wrong Format" linker errors
|
||||
$(package)_config_opts_linux=threadapi=pthread runtime-link=static
|
||||
$(package)_config_opts_darwin=target-os=darwin address-model=64 runtime-link=shared
|
||||
$(package)_config_opts_mingw32=binary-format=pe target-os=windows threadapi=win32 runtime-link=static
|
||||
$(package)_config_opts_x86_64_mingw32=address-model=64
|
||||
$(package)_config_opts_i686_mingw32=address-model=32
|
||||
$(package)_config_opts_i686_linux=address-model=32 architecture=x86
|
||||
|
||||
$(package)_toolset_$(host_os)=gcc
|
||||
$(package)_archiver_$(host_os)=$($(package)_ar)
|
||||
$(package)_toolset_darwin=darwin
|
||||
$(package)_archiver_darwin=$($(package)_libtool)
|
||||
|
||||
# CRITICAL: Added context, coroutine (for LWS) and C++17 (for Monero v18)
|
||||
# Added 'atomic' and 'chrono' just to be safe for all platforms.
|
||||
$(package)_config_libraries=atomic,chrono,date_time,filesystem,program_options,regex,serialization,system,thread,locale,context,coroutine
|
||||
$(package)_cxxflags=-std=c++17 -fPIC
|
||||
endef
|
||||
|
||||
define $(package)_preprocess_cmds
|
||||
patch -p1 < $($(package)_patch_dir)/fix_aroptions.patch &&\
|
||||
patch -p1 < $($(package)_patch_dir)/fix_arm_arch.patch &&\
|
||||
echo "using $(boost_toolset_$(host_os)) : : $($(package)_cxx) : <cxxflags>\"$($(package)_cxxflags) $($(package)_cppflags)\" <linkflags>\"$($(package)_ldflags)\" <archiver>\"$(boost_archiver_$(host_os))\" <arflags>\"$($(package)_arflags)\" <striper>\"$(host_STRIP)\" <ranlib>\"$(host_RANLIB)\" <rc>\"$(host_WINDRES)\" : ;" > user-config.jam
|
||||
endef
|
||||
|
||||
@@ -44,4 +46,4 @@ endef
|
||||
|
||||
define $(package)_stage_cmds
|
||||
./b2 -d0 -j4 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) install
|
||||
endef
|
||||
endef
|
||||
Reference in New Issue
Block a user