'Generic Commit'
This commit is contained in:
51
.dockerignore
Normal file
51
.dockerignore
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
# Build outputs
|
||||||
|
output/
|
||||||
|
*.o
|
||||||
|
*.a
|
||||||
|
*.so
|
||||||
|
*.exe
|
||||||
|
|
||||||
|
# Temporary files
|
||||||
|
*.tmp
|
||||||
|
*.temp
|
||||||
|
*~
|
||||||
|
.#*
|
||||||
|
#*
|
||||||
|
|
||||||
|
# IDE files
|
||||||
|
.vscode/
|
||||||
|
.idea/
|
||||||
|
*.swp
|
||||||
|
*.swo
|
||||||
|
|
||||||
|
# OS files
|
||||||
|
.DS_Store
|
||||||
|
Thumbs.db
|
||||||
|
|
||||||
|
# Git files
|
||||||
|
.git/
|
||||||
|
.gitignore
|
||||||
|
|
||||||
|
# Documentation builds
|
||||||
|
docs/_build/
|
||||||
|
*.pdf
|
||||||
|
|
||||||
|
# Test outputs
|
||||||
|
test_file.bin
|
||||||
|
downloaded_*.bin
|
||||||
|
*.downloaded*
|
||||||
|
|
||||||
|
# Docker files
|
||||||
|
.dockerignore
|
||||||
|
|
||||||
|
# Logs
|
||||||
|
*.log
|
||||||
|
|
||||||
|
# Cache directories
|
||||||
|
.cache/
|
||||||
|
__pycache__/
|
||||||
|
|
||||||
|
# Coverage reports
|
||||||
|
*.gcov
|
||||||
|
*.gcda
|
||||||
|
*.gcno
|
@@ -15,9 +15,17 @@ ENV CCACHE_DIR=/ccache
|
|||||||
ENV CCACHE_COMPILERCHECK=content
|
ENV CCACHE_COMPILERCHECK=content
|
||||||
ENV CCACHE_MAXSIZE=2G
|
ENV CCACHE_MAXSIZE=2G
|
||||||
|
|
||||||
COPY . .
|
# Copy only build files first (for better layer caching)
|
||||||
|
COPY CMakeLists.txt cmake_prebuild.sh ./
|
||||||
|
COPY src/version.hpp.in src/
|
||||||
|
|
||||||
# Configure and build with ccache using cache mounts
|
# Run prebuild script early (this rarely changes)
|
||||||
|
RUN bash cmake_prebuild.sh
|
||||||
|
|
||||||
|
# Copy source files (this invalidates cache when source changes)
|
||||||
|
COPY src/ src/
|
||||||
|
|
||||||
|
# Configure project (this step is cached unless CMakeLists.txt changes)
|
||||||
RUN --mount=type=cache,target=/ccache \
|
RUN --mount=type=cache,target=/ccache \
|
||||||
--mount=type=cache,target=/build \
|
--mount=type=cache,target=/build \
|
||||||
mkdir -p /build && \
|
mkdir -p /build && \
|
||||||
@@ -38,11 +46,12 @@ RUN --mount=type=cache,target=/ccache \
|
|||||||
-DOPENSSL_INCLUDE_DIR=/usr/local/include \
|
-DOPENSSL_INCLUDE_DIR=/usr/local/include \
|
||||||
${CMAKE_TOOLCHAIN_FILE:+-DCMAKE_TOOLCHAIN_FILE=$CMAKE_TOOLCHAIN_FILE}
|
${CMAKE_TOOLCHAIN_FILE:+-DCMAKE_TOOLCHAIN_FILE=$CMAKE_TOOLCHAIN_FILE}
|
||||||
|
|
||||||
# Build with cache mounts
|
# Run prebuild script
|
||||||
RUN --mount=type=cache,target=/ccache \
|
RUN --mount=type=cache,target=/ccache \
|
||||||
--mount=type=cache,target=/build \
|
--mount=type=cache,target=/build \
|
||||||
cmake --build /build --target run_prebuild_script
|
cmake --build /build --target run_prebuild_script
|
||||||
|
|
||||||
|
# Build project (ccache will help here when only some files change)
|
||||||
RUN --mount=type=cache,target=/ccache \
|
RUN --mount=type=cache,target=/ccache \
|
||||||
--mount=type=cache,target=/build \
|
--mount=type=cache,target=/build \
|
||||||
cmake --build /build
|
cmake --build /build
|
||||||
|
@@ -107,7 +107,7 @@ int main(int argc, char* argv[]) {
|
|||||||
std::cout << dropshell::VERSION << std::endl;
|
std::cout << dropshell::VERSION << std::endl;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
std::cout << "simple_object_storage version: " << dropshell::VERSION << std::endl;
|
std::cout << "Simple Object Storage version: " << dropshell::VERSION << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set up signal handlers
|
// Set up signal handlers
|
||||||
|
Reference in New Issue
Block a user