diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 416fd9f..8167c6a 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -1,4 +1,4 @@ -name: Build Wownero LWS (Mac Non-Recursive) +name: Build Wownero LWS (Mac Fix / Win Disabled) on: push: branches: [ master, main ] @@ -154,6 +154,8 @@ jobs: find . -name "libhidapi*.a" -exec cp -n {} libhidapi.a \; || true find . -name "libzstd*.a" -exec cp -n {} libzstd.a \; || true find . -name "libz*.a" ! -name "*zmq*" -exec cp -n {} libz.a \; || true + + # Symlink Cross RT SYSROOT_RT=$(find ${{ matrix.sysroot }} -name "librt.a" 2>/dev/null | head -n 1) if [ -n "$SYSROOT_RT" ]; then ln -s "$SYSROOT_RT" librt.a @@ -161,21 +163,31 @@ jobs: FALLBACK=$(find /usr -name "librt.a" | grep ${{ matrix.proc }} | head -n 1) if [ -n "$FALLBACK" ]; then ln -s "$FALLBACK" librt.a; fi fi + + # Patch Boost Context (Aarch64) - USING CORRECT URL - name: Patch Boost Context (Aarch64) if: matrix.target == 'aarch64-linux-gnu' run: | echo "Downloading and compiling missing Boost Context ASM for aarch64..." mkdir -p boost_asm && cd boost_asm + + # Use 'develop' branch to avoid 404 BASE="https://raw.githubusercontent.com/boostorg/context/develop/src/asm" + curl -f -O $BASE/jump_arm64_aapcs_elf_gas.S curl -f -O $BASE/make_arm64_aapcs_elf_gas.S curl -f -O $BASE/ontop_arm64_aapcs_elf_gas.S + if [ ! -s jump_arm64_aapcs_elf_gas.S ]; then echo "FATAL: Empty file downloaded"; exit 1; fi + aarch64-linux-gnu-gcc -c jump_arm64_aapcs_elf_gas.S -o jump.o aarch64-linux-gnu-gcc -c make_arm64_aapcs_elf_gas.S -o make.o aarch64-linux-gnu-gcc -c ontop_arm64_aapcs_elf_gas.S -o ontop.o + aarch64-linux-gnu-ar r /opt/wownero-sdk/lib/libboost_context.a jump.o make.o ontop.o aarch64-linux-gnu-ar s /opt/wownero-sdk/lib/libboost_context.a + echo "Patch applied successfully." + - name: Install Modern CMake run: | 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 @@ -227,7 +239,7 @@ jobs: -DLIBEVENT_INCLUDE_DIR=$SDK_DIR/include \ -DRT_LIBRARY=rt \ -DUSE_READLINE=OFF \ - -DCMAKE_EXE_LINKER_FLAGS="-static -Wl,--allow-multiple-definition" + -DCMAKE_EXE_LINKER_FLAGS="-static -Wl,--allow-multiple-definition" make -j$(nproc) - name: Package run: | @@ -240,14 +252,14 @@ jobs: path: release/*.tar.gz # ================================================================== - # JOB 3: WINDOWS - COMMENTED OUT + # JOB 3: WINDOWS - DISABLED # ================================================================== # windows: # runs-on: ubuntu-latest # ... # ================================================================== - # JOB 4: MACOS - NON-RECURSIVE CLONE + # JOB 4: MACOS - RESTORED & FIXED # ================================================================== macos: runs-on: macos-latest @@ -264,7 +276,7 @@ jobs: arch: arm64 platform: macos-arm64 steps: - - name: Manual Checkout (Non-Recursive) + - name: Manual Checkout env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | @@ -275,28 +287,29 @@ jobs: git remote add origin http://oauth2:${GITHUB_TOKEN}@git.such.software:3000/${{ github.repository }}.git git fetch origin ${{ github.sha }} git checkout ${{ github.sha }} - - # FIX: Only update the main submodule (Wownero Core), not its children (MiniUPnP, etc) - # This avoids connecting to GitHub.com - git submodule update --init + git submodule update --init --recursive - name: Patch Source run: | perl -pi -e 's/handler_loop\s+final/handler_loop/g' src/rest_server.cpp perl -pi -e 's/find_library\(ICU/# find_library(ICU/g' external/monero/CMakeLists.txt perl -pi -e 's/locale//g' external/monero/CMakeLists.txt + - name: Install CMake run: brew install cmake + - name: Download SDK run: | curl -L -k -o sdk.tar.gz "https://git.such.software/Builds/wownero/releases/download/${{ env.CORE_TAG }}/wownero-core-${{ matrix.target }}.tar.gz" if [ $(stat -f%z sdk.tar.gz) -lt 1000000 ]; then exit 1; fi mkdir -p wownero-sdk tar -xf sdk.tar.gz -C wownero-sdk + - name: Build run: | mkdir build && cd build SDK_DIR="$(pwd)/../wownero-sdk" + cmake .. -DCMAKE_BUILD_TYPE=Release \ -DBUILD_STATIC=ON \ -DBoost_USE_STATIC_RUNTIME=OFF \ @@ -322,9 +335,16 @@ jobs: -DLIBEVENT_LIBRARY=$SDK_DIR/lib/libevent.a \ -DLIBEVENT_INCLUDE_DIR=$SDK_DIR/include \ -DUSE_READLINE=OFF + make -j$(sysctl -n hw.ncpu) + - name: Package run: | mkdir release zip -j release/wownero-lws-${{ matrix.platform }}.zip build/src/wownero-lws-daemon build/src/wownero-lws-admin - # Upload disabled. \ No newline at end of file + + - name: Upload + uses: actions/upload-artifact@v3 + with: + name: wownero-lws-${{ matrix.platform }} + path: release/*.zip \ No newline at end of file