diff --git a/Dockerfile b/Dockerfile index ce44610..96c79fc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,7 +21,13 @@ RUN apk add --no-cache \ openssl-dev \ zlib-static \ zlib-dev \ - bash + linux-headers \ + bash \ + ccache \ + mold + +# Configure mold as the default linker +ENV LD=mold ######################################## # nlohmann/json (compiled static .a) # @@ -38,8 +44,7 @@ RUN git clone --depth 1 --branch v${JSON_VERSION} https://github.com/nlohmann/js ############################# # cpp‑httplib (header‑only) # ############################# -ARG HTTPLIB_VERSION=v0.15.4 -RUN wget -q https://raw.githubusercontent.com/yhirose/cpp-httplib/${HTTPLIB_VERSION}/httplib.h \ +RUN wget -q https://raw.githubusercontent.com/yhirose/cpp-httplib/master/httplib.h \ -O /usr/local/include/httplib.h ################################## @@ -83,7 +88,16 @@ RUN apk add --no-cache \ ninja \ git \ openssl-dev \ - zlib-static + zlib-static \ + bash \ + wget \ + curl \ + linux-headers \ + ccache \ + mold + +# Configure mold as the default linker +ENV LD=mold # Copy pre‑built static libs + headers COPY --from=builder /usr/local /usr/local @@ -94,4 +108,4 @@ ENV CFLAGS="-static -O2" \ WORKDIR /workspace -ENTRYPOINT ["/bin/sh"] +ENTRYPOINT ["/bin/bash"] diff --git a/build.sh b/build.sh old mode 100644 new mode 100755 diff --git a/install_host.sh b/install_host.sh index 57330e8..0019b4c 100755 --- a/install_host.sh +++ b/install_host.sh @@ -15,6 +15,6 @@ if [ ! -f /usr/local/lib/libassert.a ]; then fi if [ ! -f /usr/local/include/httplib.h ]; then - wget https://raw.githubusercontent.com/yhirose/cpp-httplib/refs/heads/master/httplib.h - sudo mv httplib.h /usr/local/include/httplib.h + sudo wget -q https://raw.githubusercontent.com/yhirose/cpp-httplib/master/httplib.h \ + -O /usr/local/include/httplib.h fi diff --git a/test/.ccache/0/CACHEDIR.TAG b/test/.ccache/0/CACHEDIR.TAG new file mode 100644 index 0000000..874477f --- /dev/null +++ b/test/.ccache/0/CACHEDIR.TAG @@ -0,0 +1,4 @@ +Signature: 8a477f597d28d172789f06886806bc55 +# This file is a cache directory tag created by ccache. +# For information about cache directory tags, see: +# http://www.brynosaurus.com/cachedir/ diff --git a/test/.ccache/0/a/stats b/test/.ccache/0/a/stats new file mode 100644 index 0000000..fbe4d7f --- /dev/null +++ b/test/.ccache/0/a/stats @@ -0,0 +1,82 @@ +0 +0 +0 +0 +3 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +3 +3 +0 +6 +0 +0 +0 +0 +0 +0 +6 +0 +3 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 diff --git a/test/.ccache/0/c/aaicapo17sbvoqmjgn2cmlcheirsr2eM b/test/.ccache/0/c/aaicapo17sbvoqmjgn2cmlcheirsr2eM new file mode 100644 index 0000000..17240c7 Binary files /dev/null and b/test/.ccache/0/c/aaicapo17sbvoqmjgn2cmlcheirsr2eM differ diff --git a/test/.ccache/0/c/stats b/test/.ccache/0/c/stats new file mode 100644 index 0000000..5203da7 --- /dev/null +++ b/test/.ccache/0/c/stats @@ -0,0 +1,82 @@ +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +1 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 diff --git a/test/.ccache/0/stats b/test/.ccache/0/stats new file mode 100644 index 0000000..dba6bce --- /dev/null +++ b/test/.ccache/0/stats @@ -0,0 +1,82 @@ +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +1 +16 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +1 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +16 +0 +0 +0 +0 diff --git a/test/.ccache/1/1/stats b/test/.ccache/1/1/stats new file mode 100644 index 0000000..72824a8 --- /dev/null +++ b/test/.ccache/1/1/stats @@ -0,0 +1,82 @@ +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +3 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 diff --git a/test/.ccache/1/2/stats b/test/.ccache/1/2/stats new file mode 100644 index 0000000..5203da7 --- /dev/null +++ b/test/.ccache/1/2/stats @@ -0,0 +1,82 @@ +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +1 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 diff --git a/test/.ccache/1/e/stats b/test/.ccache/1/e/stats new file mode 100644 index 0000000..68c5368 --- /dev/null +++ b/test/.ccache/1/e/stats @@ -0,0 +1,82 @@ +0 +0 +0 +0 +1 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +1 +1 +0 +2 +0 +0 +0 +0 +0 +0 +2 +0 +1 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 diff --git a/test/.ccache/2/5/stats b/test/.ccache/2/5/stats new file mode 100644 index 0000000..5203da7 --- /dev/null +++ b/test/.ccache/2/5/stats @@ -0,0 +1,82 @@ +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +1 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 diff --git a/test/.ccache/2/CACHEDIR.TAG b/test/.ccache/2/CACHEDIR.TAG new file mode 100644 index 0000000..874477f --- /dev/null +++ b/test/.ccache/2/CACHEDIR.TAG @@ -0,0 +1,4 @@ +Signature: 8a477f597d28d172789f06886806bc55 +# This file is a cache directory tag created by ccache. +# For information about cache directory tags, see: +# http://www.brynosaurus.com/cachedir/ diff --git a/test/.ccache/2/d/stats b/test/.ccache/2/d/stats new file mode 100644 index 0000000..68c5368 --- /dev/null +++ b/test/.ccache/2/d/stats @@ -0,0 +1,82 @@ +0 +0 +0 +0 +1 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +1 +1 +0 +2 +0 +0 +0 +0 +0 +0 +2 +0 +1 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 diff --git a/test/.ccache/2/e/9dc3onnqn8rat9gvebfkmhom2hm37teR b/test/.ccache/2/e/9dc3onnqn8rat9gvebfkmhom2hm37teR new file mode 100644 index 0000000..385ce90 Binary files /dev/null and b/test/.ccache/2/e/9dc3onnqn8rat9gvebfkmhom2hm37teR differ diff --git a/test/.ccache/2/stats b/test/.ccache/2/stats new file mode 100644 index 0000000..93b9093 --- /dev/null +++ b/test/.ccache/2/stats @@ -0,0 +1,82 @@ +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +1 +4 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +1 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +4 +0 +0 diff --git a/test/.ccache/3/4/stats b/test/.ccache/3/4/stats new file mode 100644 index 0000000..5203da7 --- /dev/null +++ b/test/.ccache/3/4/stats @@ -0,0 +1,82 @@ +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +1 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 diff --git a/test/.ccache/3/7/stats b/test/.ccache/3/7/stats new file mode 100644 index 0000000..68c5368 --- /dev/null +++ b/test/.ccache/3/7/stats @@ -0,0 +1,82 @@ +0 +0 +0 +0 +1 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +1 +1 +0 +2 +0 +0 +0 +0 +0 +0 +2 +0 +1 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 diff --git a/test/.ccache/3/e/stats b/test/.ccache/3/e/stats new file mode 100644 index 0000000..5203da7 --- /dev/null +++ b/test/.ccache/3/e/stats @@ -0,0 +1,82 @@ +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +1 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 diff --git a/test/.ccache/4/0/38skoanmcjl0asrltg5foudrhoa98l6R b/test/.ccache/4/0/38skoanmcjl0asrltg5foudrhoa98l6R new file mode 100644 index 0000000..d135eff Binary files /dev/null and b/test/.ccache/4/0/38skoanmcjl0asrltg5foudrhoa98l6R differ diff --git a/test/.ccache/4/CACHEDIR.TAG b/test/.ccache/4/CACHEDIR.TAG new file mode 100644 index 0000000..874477f --- /dev/null +++ b/test/.ccache/4/CACHEDIR.TAG @@ -0,0 +1,4 @@ +Signature: 8a477f597d28d172789f06886806bc55 +# This file is a cache directory tag created by ccache. +# For information about cache directory tags, see: +# http://www.brynosaurus.com/cachedir/ diff --git a/test/.ccache/4/b/e63vp6nheqb9ljsvvflf2rprmqrdtmuR b/test/.ccache/4/b/e63vp6nheqb9ljsvvflf2rprmqrdtmuR new file mode 100644 index 0000000..4dd5ae3 Binary files /dev/null and b/test/.ccache/4/b/e63vp6nheqb9ljsvvflf2rprmqrdtmuR differ diff --git a/test/.ccache/4/stats b/test/.ccache/4/stats new file mode 100644 index 0000000..be58fca --- /dev/null +++ b/test/.ccache/4/stats @@ -0,0 +1,82 @@ +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +2 +472 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +1 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +1 +0 +0 +0 +0 +236 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +236 +0 +0 +0 +0 +0 diff --git a/test/.ccache/6/1/99hro0kcqvitm08ph1qp23lc096dpjgM b/test/.ccache/6/1/99hro0kcqvitm08ph1qp23lc096dpjgM new file mode 100644 index 0000000..6517ef0 Binary files /dev/null and b/test/.ccache/6/1/99hro0kcqvitm08ph1qp23lc096dpjgM differ diff --git a/test/.ccache/6/CACHEDIR.TAG b/test/.ccache/6/CACHEDIR.TAG new file mode 100644 index 0000000..874477f --- /dev/null +++ b/test/.ccache/6/CACHEDIR.TAG @@ -0,0 +1,4 @@ +Signature: 8a477f597d28d172789f06886806bc55 +# This file is a cache directory tag created by ccache. +# For information about cache directory tags, see: +# http://www.brynosaurus.com/cachedir/ diff --git a/test/.ccache/6/c/cfpg24omtabmcf0551a884a2i1480imR b/test/.ccache/6/c/cfpg24omtabmcf0551a884a2i1480imR new file mode 100644 index 0000000..5754df2 Binary files /dev/null and b/test/.ccache/6/c/cfpg24omtabmcf0551a884a2i1480imR differ diff --git a/test/.ccache/6/stats b/test/.ccache/6/stats new file mode 100644 index 0000000..caff130 --- /dev/null +++ b/test/.ccache/6/stats @@ -0,0 +1,82 @@ +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +2 +8 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +1 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +1 +0 +0 +0 +0 +4 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +4 +0 +0 +0 +0 diff --git a/test/.ccache/9/CACHEDIR.TAG b/test/.ccache/9/CACHEDIR.TAG new file mode 100644 index 0000000..874477f --- /dev/null +++ b/test/.ccache/9/CACHEDIR.TAG @@ -0,0 +1,4 @@ +Signature: 8a477f597d28d172789f06886806bc55 +# This file is a cache directory tag created by ccache. +# For information about cache directory tags, see: +# http://www.brynosaurus.com/cachedir/ diff --git a/test/.ccache/9/a/fd2897kchp5ong36tqk6obhs3al8grgM b/test/.ccache/9/a/fd2897kchp5ong36tqk6obhs3al8grgM new file mode 100644 index 0000000..e3d97c9 Binary files /dev/null and b/test/.ccache/9/a/fd2897kchp5ong36tqk6obhs3al8grgM differ diff --git a/test/.ccache/9/stats b/test/.ccache/9/stats new file mode 100644 index 0000000..075c902 --- /dev/null +++ b/test/.ccache/9/stats @@ -0,0 +1,82 @@ +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +1 +16 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +1 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +16 +0 +0 +0 +0 +0 +0 diff --git a/test/.ccache/a/2/802tu8tqcjankp7asf9phvduq5nid82M b/test/.ccache/a/2/802tu8tqcjankp7asf9phvduq5nid82M new file mode 100644 index 0000000..6d0be7e Binary files /dev/null and b/test/.ccache/a/2/802tu8tqcjankp7asf9phvduq5nid82M differ diff --git a/test/.ccache/a/9/49to0fu7pau2cla8merd8b3g64qh2noM b/test/.ccache/a/9/49to0fu7pau2cla8merd8b3g64qh2noM new file mode 100644 index 0000000..5c7ac3d Binary files /dev/null and b/test/.ccache/a/9/49to0fu7pau2cla8merd8b3g64qh2noM differ diff --git a/test/.ccache/a/CACHEDIR.TAG b/test/.ccache/a/CACHEDIR.TAG new file mode 100644 index 0000000..874477f --- /dev/null +++ b/test/.ccache/a/CACHEDIR.TAG @@ -0,0 +1,4 @@ +Signature: 8a477f597d28d172789f06886806bc55 +# This file is a cache directory tag created by ccache. +# For information about cache directory tags, see: +# http://www.brynosaurus.com/cachedir/ diff --git a/test/.ccache/a/stats b/test/.ccache/a/stats new file mode 100644 index 0000000..ade9bb4 --- /dev/null +++ b/test/.ccache/a/stats @@ -0,0 +1,82 @@ +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +2 +20 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +1 +0 +0 +0 +0 +0 +0 +1 +0 +0 +0 +0 +0 +0 +0 +0 +4 +0 +0 +0 +0 +0 +0 +16 +0 +0 +0 +0 +0 +0 +0 diff --git a/test/.ccache/b/1/80mp1h8inh43vbck35d22ai3d9s5e94R b/test/.ccache/b/1/80mp1h8inh43vbck35d22ai3d9s5e94R new file mode 100644 index 0000000..004fbf7 Binary files /dev/null and b/test/.ccache/b/1/80mp1h8inh43vbck35d22ai3d9s5e94R differ diff --git a/test/.ccache/b/CACHEDIR.TAG b/test/.ccache/b/CACHEDIR.TAG new file mode 100644 index 0000000..874477f --- /dev/null +++ b/test/.ccache/b/CACHEDIR.TAG @@ -0,0 +1,4 @@ +Signature: 8a477f597d28d172789f06886806bc55 +# This file is a cache directory tag created by ccache. +# For information about cache directory tags, see: +# http://www.brynosaurus.com/cachedir/ diff --git a/test/.ccache/b/stats b/test/.ccache/b/stats new file mode 100644 index 0000000..11b39c7 --- /dev/null +++ b/test/.ccache/b/stats @@ -0,0 +1,82 @@ +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +1 +236 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +1 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +236 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 diff --git a/test/.ccache/c/0/3a34k150ga9nserg9pef8uij1gdvajeM b/test/.ccache/c/0/3a34k150ga9nserg9pef8uij1gdvajeM new file mode 100644 index 0000000..1655b07 Binary files /dev/null and b/test/.ccache/c/0/3a34k150ga9nserg9pef8uij1gdvajeM differ diff --git a/test/.ccache/c/CACHEDIR.TAG b/test/.ccache/c/CACHEDIR.TAG new file mode 100644 index 0000000..874477f --- /dev/null +++ b/test/.ccache/c/CACHEDIR.TAG @@ -0,0 +1,4 @@ +Signature: 8a477f597d28d172789f06886806bc55 +# This file is a cache directory tag created by ccache. +# For information about cache directory tags, see: +# http://www.brynosaurus.com/cachedir/ diff --git a/test/.ccache/c/stats b/test/.ccache/c/stats new file mode 100644 index 0000000..3891c2b --- /dev/null +++ b/test/.ccache/c/stats @@ -0,0 +1,82 @@ +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +1 +16 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +1 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +16 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 diff --git a/test/.ccache/f/4/8dp5jdv5s35vp9ugponj5s5qe8v4b9qR b/test/.ccache/f/4/8dp5jdv5s35vp9ugponj5s5qe8v4b9qR new file mode 100644 index 0000000..0f2c985 Binary files /dev/null and b/test/.ccache/f/4/8dp5jdv5s35vp9ugponj5s5qe8v4b9qR differ diff --git a/test/.ccache/f/CACHEDIR.TAG b/test/.ccache/f/CACHEDIR.TAG new file mode 100644 index 0000000..874477f --- /dev/null +++ b/test/.ccache/f/CACHEDIR.TAG @@ -0,0 +1,4 @@ +Signature: 8a477f597d28d172789f06886806bc55 +# This file is a cache directory tag created by ccache. +# For information about cache directory tags, see: +# http://www.brynosaurus.com/cachedir/ diff --git a/test/.ccache/f/stats b/test/.ccache/f/stats new file mode 100644 index 0000000..c122ed2 --- /dev/null +++ b/test/.ccache/f/stats @@ -0,0 +1,82 @@ +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +1 +236 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +1 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +236 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 diff --git a/test/.ccache/tmp/.cleaned b/test/.ccache/tmp/.cleaned new file mode 100644 index 0000000..e69de29 diff --git a/test/.ccache/tmp/inode-cache-64.v2 b/test/.ccache/tmp/inode-cache-64.v2 new file mode 100644 index 0000000..978a22b Binary files /dev/null and b/test/.ccache/tmp/inode-cache-64.v2 differ diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index bd4d90d..b839236 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.10) project(cppstaticbuild) -set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD 23) set(CMAKE_CXX_STANDARD_REQUIRED ON) # Static build settings @@ -11,4 +11,4 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static") include_directories(/usr/local/include) add_executable(main main.cpp) -target_link_libraries(main pthread) +target_link_libraries(main pthread assert cpptrace dwarf z zstd) diff --git a/test/build.sh b/test/build.sh new file mode 100755 index 0000000..38aa7f6 --- /dev/null +++ b/test/build.sh @@ -0,0 +1,16 @@ +#!/bin/bash +rm -f build/main + +docker run --rm -v $(pwd):/app -w /app \ + -e CCACHE_DIR=/app/.ccache \ + -e CC="ccache gcc" \ + -e CXX="ccache g++" \ + -e LD=mold \ + -e CMAKE_BUILD_PARALLEL_LEVEL=$(nproc) \ + -e NINJA_STATUS="[%f/%t] " \ + cpp-httplib-builder:latest \ + -c "mkdir -p build && cd build && cmake -G Ninja .. && ninja -j$(nproc)" + +if [ -f build/main ]; then + build/main +fi diff --git a/test/main.cpp b/test/main.cpp index ddec2a8..da07036 100644 --- a/test/main.cpp +++ b/test/main.cpp @@ -5,7 +5,9 @@ #include int main() { - httplib::Client cli("https://ipinfo.io"); + std::cout << "Retrieving IP address..." << std::endl; + + httplib::Client cli("http://ipinfo.io"); auto res = cli.Get("/ip"); ASSERT(res->status == 200, "Failed to get IP"); @@ -15,6 +17,8 @@ int main() { j["status"] = res->status; std::cout << j.dump(4) << std::endl; + + std::cout << "Done" << std::endl; return 0; -} \ No newline at end of file +} diff --git a/test/shell.sh b/test/shell.sh new file mode 100755 index 0000000..16179fe --- /dev/null +++ b/test/shell.sh @@ -0,0 +1,3 @@ +#docker run --entrypoint "/bin/sh" -it --rm cpp-httplib-builder:latest -c "/bin/sh" +docker run -it --rm cpp-httplib-builder:latest -c "/bin/bash" +