Skip to content

Commit

Permalink
Build docker_wrapper for linux on ci and upload it to the artifacts
Browse files Browse the repository at this point in the history
Signed-off-by: Vitalii Koshura <[email protected]>
  • Loading branch information
AenBleidd committed Oct 25, 2024
1 parent 9c9ccad commit c2e443e
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 8 deletions.
6 changes: 5 additions & 1 deletion deploy/prepare_deployment.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@
'./samples/openclapp/openclapp',
'./samples/wrappture/wrappture_example',
'./samples/wrappture/fermi',
'./samples/sporadic/sporadic'
'./samples/sporadic/sporadic',
'./samples/docker_wrapper/docker_wrapper',
]

linux_manager_list = [
Expand Down Expand Up @@ -77,6 +78,7 @@
'./samples/wrappture/fermi.exe',
'./samples/sporadic/sporadic.exe',
'./samples/wsl_wrapper/wsl_wrapper.exe',
'./samples/docker_wrapper/docker_wrapper.exe',
]

android_manager_generic_list = [
Expand Down Expand Up @@ -172,6 +174,7 @@
'./win_build/Build/x64/Release/wrappture*.exe',
'./win_build/Build/x64/Release/crypt_prog.exe',
'./win_build/Build/x64/Release/wsl_wrapper.exe',
'./win_build/Build/x64/Release/docker_wrapper.exe',
'./win_build/Build/ARM64/Release/htmlgfx*.exe',
'./win_build/Build/ARM64/Release/wrapper*.exe',
'./win_build/Build/ARM64/Release/vboxwrapper*.exe',
Expand All @@ -186,6 +189,7 @@
'./win_build/Build/ARM64/Release/wrappture*.exe',
'./win_build/Build/ARM64/Release/crypt_prog.exe',
'./win_build/Build/ARM64/Release/wsl_wrapper.exe',
'./win_build/Build/ARM64/Release/docker_wrapper.exe',
]

windows_client_list = [
Expand Down
4 changes: 4 additions & 0 deletions samples/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,8 @@ if BUILD_WITH_OPENCL
SUBDIRS += openclapp
endif

if ! ANDROID
SUBDIRS += docker_wrapper
endif

maintainer-clean:
53 changes: 46 additions & 7 deletions samples/docker_wrapper/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,49 @@


BOINC_DIR = ../..
BOINC_SOURCE_API_DIR = $(BOINC_DIR)/api
BOINC_SOURCE_LIB_DIR = $(BOINC_DIR)/lib
BOINC_SOURCE_ZIP_DIR = $(BOINC_DIR)/zip

BOINC_API_DIR = $(BOINC_SOURCE_API_DIR)
BOINC_LIB_DIR = $(BOINC_SOURCE_LIB_DIR)
BOINC_ZIP_DIR = $(BOINC_SOURCE_ZIP_DIR)

MAKEFILE_LDFLAGS = -lpthread libstdc++.a
MAKEFILE_STDLIB = libstdc++.a

CXXFLAGS += -g \
-Wall -W -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wformat-overflow=0 -fno-common \
-I$(BOINC_DIR) \
-I$(BOINC_SOURCE_API_DIR) \
-I$(BOINC_SOURCE_LIB_DIR) \
-I$(BOINC_SOURCE_ZIP_DIR) \
-L$(BOINC_API_DIR) \
-L$(BOINC_LIB_DIR) \
-L.

ifdef BUILD_APPS_WITH_VCPKG
BUILD_DIR = $(BOINC_DIR)/3rdParty/linux
VCPKG_DIR ?= $(BUILD_DIR)/vcpkg/installed/x64-linux

CXXFLAGS += \
-I$(VCPKG_DIR)/include \
-L$(VCPKG_DIR)/lib
endif

all: docker_wrapper

CXXFLAGS = -g -I../../lib -I../../api\
-L../../lib -L../../api \
-Wformat-overflow=0
libstdc++.a:
ln -s `$(CXX) $(CXXFLAGS) -print-file-name=libstdc++.a`

clean: distclean

distclean:
/bin/rm -f docker_wrapper $(addsuffix .exe, docker_wrapper) *.o libstdc++.a

install: all

docker_wrapper: docker_wrapper.cpp
g++ $(CXXFLAGS) docker_wrapper.cpp \
-lboinc_api -lboinc -lpthread \
-o docker_wrapper
docker_wrapper: docker_wrapper.o $(MAKEFILE_STDLIB) $(BOINC_API_DIR)/libboinc_api.a $(BOINC_LIB_DIR)/libboinc.a
$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) -o docker_wrapper docker_wrapper.o \
-lboinc_api -lboinc $(MAKEFILE_LDFLAGS) \
$(STDCPPTC)

0 comments on commit c2e443e

Please sign in to comment.