'Generic Commit'
Some checks failed
Build-Test-Publish / build (linux/amd64) (push) Failing after 17s
Build-Test-Publish / build (linux/arm64) (push) Failing after 25s
Build-Test-Publish / create-manifest (push) Has been skipped

This commit is contained in:
Your Name
2025-06-15 16:40:43 +12:00
parent bf9f714a3d
commit de99ef0d11
3 changed files with 64 additions and 4 deletions

51
.dockerignore Normal file
View 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

View File

@@ -15,9 +15,17 @@ ENV CCACHE_DIR=/ccache
ENV CCACHE_COMPILERCHECK=content
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 \
--mount=type=cache,target=/build \
mkdir -p /build && \
@@ -38,11 +46,12 @@ RUN --mount=type=cache,target=/ccache \
-DOPENSSL_INCLUDE_DIR=/usr/local/include \
${CMAKE_TOOLCHAIN_FILE:+-DCMAKE_TOOLCHAIN_FILE=$CMAKE_TOOLCHAIN_FILE}
# Build with cache mounts
# Run prebuild script
RUN --mount=type=cache,target=/ccache \
--mount=type=cache,target=/build \
cmake --build /build --target run_prebuild_script
# Build project (ccache will help here when only some files change)
RUN --mount=type=cache,target=/ccache \
--mount=type=cache,target=/build \
cmake --build /build

View File

@@ -107,7 +107,7 @@ int main(int argc, char* argv[]) {
std::cout << dropshell::VERSION << std::endl;
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