chore: daily ci improvement

This commit is contained in:
darshankabariya 2025-12-16 17:15:06 +05:30
parent 555b747d26
commit c50de8cbc0
No known key found for this signature in database
GPG Key ID: 9A92CCD9899F0D22
4 changed files with 40 additions and 13 deletions

View File

@ -31,8 +31,11 @@ jobs:
- name: Install Go dependencies
run: go mod download
- name: Build nwaku dependencies
run: make -C waku
- name: Build libwaku from submodule
run: make -C waku build-libwaku
- name: Build waku bindings
run: make -C waku build
- name: Increase ulimit
run: sudo sh -c "ulimit -n 8192"

View File

@ -29,8 +29,11 @@ jobs:
- name: Install Go dependencies
run: go mod download
- name: Build nwaku dependencies
run: make -C waku
- name: Build libwaku from submodule
run: make -C waku build-libwaku
- name: Build waku bindings
run: make -C waku build
- name: Increase ulimit
run: sudo sh -c "ulimit -n 8192"
@ -79,8 +82,11 @@ jobs:
- name: Install Go dependencies
run: go mod download
- name: Build nwaku dependencies
run: make -C waku
- name: Build libwaku from submodule
run: make -C waku build-libwaku
- name: Build waku bindings
run: make -C waku build
- name: Increase ulimit
run: sudo sh -c "ulimit -n 8192"

View File

@ -30,8 +30,11 @@ jobs:
- name: Install Go dependencies
run: go mod download
- name: Build dependencies
run: make -C waku
- name: Build libwaku from submodule
run: make -C waku build-libwaku
- name: Build waku bindings
run: make -C waku build
- name: Clean environment
run: go clean -cache

View File

@ -1,15 +1,20 @@
# Makefile for Waku Go Bindings
# The LIBWAKU_LIB_PATH and LIBWAKU_HEADER_PATH env vars should be defined beforehand
# Therefore, we assume the libwaku library and headers are located in the specified paths
export CGO_CFLAGS="-I${LIBWAKU_HEADER_PATH}/"
export CGO_LDFLAGS="-L${LIBWAKU_LIB_PATH}/ -lsds -Wl,-rpath,${LIBWAKU_LIB_PATH}/"
# Path to logos-messaging-nim (nwaku) submodule
NWAKU_DIR ?= $(shell pwd)/../third_party/nwaku
# Default paths for libwaku library and headers (can be overridden)
LIBWAKU_HEADER_PATH ?= $(NWAKU_DIR)/library
LIBWAKU_LIB_PATH ?= $(NWAKU_DIR)/build
export CGO_CFLAGS := -I$(LIBWAKU_HEADER_PATH)/
export CGO_LDFLAGS := -L$(LIBWAKU_LIB_PATH)/ -lwaku -Wl,-rpath,$(LIBWAKU_LIB_PATH)/
# Expected files
HEADER_FILE := $(LIBWAKU_HEADER_PATH)/libwaku.h
LIB_FILES := $(wildcard $(LIBWAKU_LIB_PATH)/libwaku.*)
.PHONY: all clean prepare build
.PHONY: all clean prepare build build-libwaku
# Default target
all: build
@ -47,6 +52,16 @@ build: check-folders
@echo "Building Waku Go Bindings..."
go build ./...
# Build libwaku from the nwaku submodule
build-libwaku:
@echo "Building libwaku from nwaku submodule..."
@if [ ! -d "$(NWAKU_DIR)" ]; then \
echo "ERROR: nwaku submodule not found at $(NWAKU_DIR)"; \
echo "Run 'git submodule update --init --recursive' first"; \
exit 1; \
fi
$(MAKE) -C $(NWAKU_DIR) libwaku
# Clean up generated files
clean:
@echo "Cleaning up..."