Compiler test scripts: added clang
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
FROM p2pool_compiler_tests_ubuntu
|
||||
ARG P2POOL_VERSION GCC_VERSION
|
||||
ADD test.sh /p2pool/
|
||||
RUN /p2pool/test.sh ${P2POOL_VERSION} ${GCC_VERSION}
|
||||
Executable
+13
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Example usage: ./build.sh v4.8.1 20
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
docker build --build-arg P2POOL_VERSION=$1 --build-arg GCC_VERSION=$2 -t p2pool_compiler_test_clang_$2 .
|
||||
|
||||
docker create --name p2pool_compiler_test_clang_$2_container p2pool_compiler_test_clang_$2:latest
|
||||
docker cp p2pool_compiler_test_clang_$2_container:/p2pool/logs.tar.gz clang_$2_logs.tar.gz
|
||||
docker rm p2pool_compiler_test_clang_$2_container
|
||||
|
||||
docker image rm -f p2pool_compiler_test_clang_$2
|
||||
Executable
+24
@@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
|
||||
cd /p2pool
|
||||
git fetch --jobs=$(nproc)
|
||||
git checkout $1
|
||||
git submodule update --recursive --jobs $(nproc)
|
||||
|
||||
COMPILER="-DCMAKE_C_COMPILER=clang-$2 -DCMAKE_CXX_COMPILER=clang++-$2"
|
||||
|
||||
cd /p2pool
|
||||
mkdir build && cd build
|
||||
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release $COMPILER 1>> /p2pool/output.log 2>&1
|
||||
make -j$(nproc) p2pool 1>> /p2pool/output.log 2>&1
|
||||
./p2pool --test 1>> /p2pool/output.log 2>&1
|
||||
|
||||
cd ../tests
|
||||
mkdir build && cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Release $COMPILER 1>> /p2pool/output.log 2>&1
|
||||
make -j$(nproc) p2pool_tests 1>> /p2pool/output.log 2>&1
|
||||
gunzip *.gz
|
||||
./p2pool_tests 1>> /p2pool/output.log 2>&1
|
||||
|
||||
tar -czvf /p2pool/logs.tar.gz /p2pool/output.log
|
||||
Reference in New Issue
Block a user