Added builder images for linux and process to perform release
This commit is contained in:
parent
0d4a81cfe5
commit
087d809be0
6 changed files with 106 additions and 3 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -181,5 +181,6 @@ tmp/
|
|||
|
||||
# CMake
|
||||
build/
|
||||
release/
|
||||
|
||||
|
||||
|
|
|
|||
20
Makefile
20
Makefile
|
|
@ -38,9 +38,10 @@ clean_cmake:
|
|||
####### Visual studio build shortcut commands #######
|
||||
|
||||
mk_cmake:
|
||||
$(CMAKE_BIN) \
|
||||
cmake \
|
||||
-Bbuild \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DKOMPUTE_OPT_BUILD_DOCS=0 \
|
||||
-DCMAKE_TOOLCHAIN_FILE=$(VCPKG_UNIX_PATH) \
|
||||
-DCMAKE_EXPORT_COMPILE_COMMANDS=1 \
|
||||
-G "Unix Makefiles"
|
||||
|
|
@ -92,13 +93,26 @@ vs_run_docs: vs_build_docs
|
|||
vs_run_tests: vs_build_tests
|
||||
./build/test/Debug/test_kompute.exe
|
||||
|
||||
####### Create release ######
|
||||
|
||||
update_builder_image:
|
||||
docker build -f Dockerfile.linux . \
|
||||
-t axsauze/kompute-builder:0.1
|
||||
docker push axsauze/kompute-builder:0.1
|
||||
|
||||
create_linux_release:
|
||||
docker run -it \
|
||||
-v $(pwd):/workspace \
|
||||
axsauze/kompute-builder:0.1 \
|
||||
/workspace/scripts/build_release_linux.sh
|
||||
|
||||
####### General project commands #######
|
||||
|
||||
install_python_reqs:
|
||||
python -m pip install -r scripts/requirements.txt
|
||||
python3 -m pip install -r scripts/requirements.txt
|
||||
|
||||
build_shaders:
|
||||
python scripts/convert_shaders.py \
|
||||
python3 scripts/convert_shaders.py \
|
||||
--shader-path shaders/glsl \
|
||||
--shader-binary $(SCMP_BIN) \
|
||||
--header-path src/include/kompute/shaders/ \
|
||||
|
|
|
|||
60
builders/Dockerfile.linux
Normal file
60
builders/Dockerfile.linux
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
FROM amd64/ubuntu:20.04
|
||||
|
||||
# First install vulkan
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y curl unzip tar wget
|
||||
RUN wget -O VulkanSDK.tar.gz https://sdk.lunarg.com/sdk/download/1.2.141.2/linux/vulkansdk-linux-x86_64-1.2.141.2.tar.gz?u=true && \
|
||||
mkdir VulkanSDK && \
|
||||
cd VulkanSDK && \
|
||||
tar xvf /VulkanSDK.tar.gz
|
||||
|
||||
RUN cd VulkanSDK/1.2.141.2
|
||||
ENV VULKAN_SDK="/VulkanSDK/1.2.141.2/x86_64"
|
||||
ENV PATH="${VULKAN_SDK}/bin:${PATH}"
|
||||
ENV LD_LIBRARY_PATH="${VULKAN_SDK}/lib"
|
||||
ENV VK_LAYER_PATH="${VULKAN_SDK}/etc/explicit_layer.d"
|
||||
|
||||
# Configure dependencies required to setup external apt-repos
|
||||
RUN apt-get install \
|
||||
apt-transport-https \
|
||||
ca-certificates \
|
||||
gnupg \
|
||||
software-properties-common \
|
||||
wget -y
|
||||
|
||||
# Adding kitware repo to upgrade to latest cmake (17+)
|
||||
RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null
|
||||
RUN apt-add-repository 'deb https://apt.kitware.com/ubuntu/ bionic main'
|
||||
# Adding security repo to add cmake dependency on libssl 1.0
|
||||
RUN echo "deb http://security.ubuntu.com/ubuntu bionic-security main" | tee -a /etc/apt/sources.list.d/bionic.list
|
||||
RUN apt-get update
|
||||
RUN apt-get upgrade -y
|
||||
|
||||
# Install build dependencies
|
||||
RUN apt-get install -y libssl1.0-dev
|
||||
RUN apt-get install -y cmake g++
|
||||
RUN apt-get install -y libglm-dev libxcb-dri3-0 libxcb-present0
|
||||
RUN apt-get install -y libpciaccess0 libpng-dev libxcb-keysyms1-dev
|
||||
RUN apt-get install -y libxcb-dri3-dev libx11-dev libmirclient-dev
|
||||
RUN apt-get install -y libwayland-dev libxrandr-dev
|
||||
RUN apt-get install -y wget
|
||||
RUN apt-get install -y libglfw3-dev
|
||||
RUN apt-get install -y git
|
||||
RUN apt-get install -y python python3-pip
|
||||
|
||||
RUN apt-get install -y zip pkg-config
|
||||
RUN apt-get install xxd
|
||||
|
||||
RUN mkdir /core
|
||||
WORKDIR /core
|
||||
RUN git clone https://github.com/microsoft/vcpkg
|
||||
RUN ./vcpkg/bootstrap-vcpkg.sh
|
||||
ENV VCPKG_PATH=/core/vcpkg
|
||||
ENV VCPKG_ROOT=/core/vcpkg
|
||||
|
||||
# INstall dependencies for kompute
|
||||
RUN vcpkg install catch2 fmt spdlog vulkan
|
||||
|
||||
RUN mkdir /workspace
|
||||
WORKDIR /workspace
|
||||
|
||||
18
scripts/build_release_linux.sh
Normal file
18
scripts/build_release_linux.sh
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
#!/bin/bash
|
||||
|
||||
make install_python_reqs
|
||||
|
||||
make clean_cmake
|
||||
|
||||
make mk_cmake \
|
||||
VCPKG_UNIX_PATH=/core/vcpkg/scripts/buildsystems/vcpkg.cmake
|
||||
|
||||
make -C build/ mk_run_tests \
|
||||
SCMP_BIN=/VulkanSDK/1.2.141.2/x86_64/bin/glslangValidator
|
||||
|
||||
# Copy output components
|
||||
mkdir -p release/linux-amd64/lib/
|
||||
mkdir -p release/linux-amd64/include/
|
||||
cp build/src/libkompute.a release/linux-amd64/lib/
|
||||
cp -r single_include/kompute release/linux-amd64/include/kompute
|
||||
|
||||
10
scripts/build_release_windows.sh
Normal file
10
scripts/build_release_windows.sh
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
|
||||
make install_python_reqs
|
||||
|
||||
make clean_cmake
|
||||
|
||||
make vs_cmake
|
||||
|
||||
make vs_run_tests
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue