Skip to content

Commit

Permalink
More in Docker tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeMirzayanov committed Sep 28, 2023
1 parent ffe5752 commit f5b8c28
Show file tree
Hide file tree
Showing 16 changed files with 116 additions and 18 deletions.
7 changes: 5 additions & 2 deletions tests/docker/clang-11/run.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
"C:\Program Files\Docker\Docker"\DockerCli.exe -SwitchLinuxEngine
@echo off

docker run -it test-testlib-clang-11
SET IMAGE_NAME=test-testlib-clang-11
for /f "tokens=*" %%i in ('git rev-parse --abbrev-ref HEAD') do set CURRENT_BRANCH=%%i

"C:\Program Files\Docker\Docker"\DockerCli.exe -SwitchLinuxEngine
docker run -it %IMAGE_NAME% /bin/bash /startup.sh %CURRENT_BRANCH%
9 changes: 7 additions & 2 deletions tests/docker/clang-11/startup.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
#!/bin/bash
set -e -o pipefail

CPP_STANDARD=14

BRANCH=${1:-dev-mikemirzayanov}
echo "Use branch ""$BRANCH"""

git clone https://github.com/MikeMirzayanov/testlib.git
cd testlib
git checkout dev-mikemirzayanov
git checkout "$BRANCH"
cd tests
./run.sh v0 11
./run.sh clang++ v0 "$CPP_STANDARD"
cd /
rm -rf testlib
7 changes: 7 additions & 0 deletions tests/docker/clang-3.5/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM silkeh/clang:3.5
RUN apt-get update
RUN apt-get install -y git default-jre
COPY startup.sh /
WORKDIR /
RUN chmod +x /startup.sh
CMD ["/bin/bash", "/startup.sh"]
4 changes: 4 additions & 0 deletions tests/docker/clang-3.5/build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
"C:\Program Files\Docker\Docker"\DockerCli.exe -SwitchLinuxEngine

docker build . -t test-testlib-clang-3.5

7 changes: 7 additions & 0 deletions tests/docker/clang-3.5/run.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@echo off

SET IMAGE_NAME=test-testlib-clang-3.5
for /f "tokens=*" %%i in ('git rev-parse --abbrev-ref HEAD') do set CURRENT_BRANCH=%%i

"C:\Program Files\Docker\Docker"\DockerCli.exe -SwitchLinuxEngine
docker run -it %IMAGE_NAME% /bin/bash /startup.sh %CURRENT_BRANCH%
15 changes: 15 additions & 0 deletions tests/docker/clang-3.5/startup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash
set -e -o pipefail

CPP_STANDARD=11

BRANCH=${1:-dev-mikemirzayanov}
echo "Use branch ""$BRANCH"""

git clone https://github.com/MikeMirzayanov/testlib.git
cd testlib
git checkout "$BRANCH"
cd tests
./run.sh clang++ v0 "$CPP_STANDARD"
cd /
rm -rf testlib
7 changes: 7 additions & 0 deletions tests/docker/clang-7/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM silkeh/clang:7
RUN apt-get update
RUN apt-get install -y git default-jre
COPY startup.sh /
WORKDIR /
RUN chmod +x /startup.sh
CMD ["/bin/bash", "/startup.sh"]
4 changes: 4 additions & 0 deletions tests/docker/clang-7/build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
"C:\Program Files\Docker\Docker"\DockerCli.exe -SwitchLinuxEngine

docker build . -t test-testlib-clang-7

7 changes: 7 additions & 0 deletions tests/docker/clang-7/run.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@echo off

SET IMAGE_NAME=test-testlib-clang-7
for /f "tokens=*" %%i in ('git rev-parse --abbrev-ref HEAD') do set CURRENT_BRANCH=%%i

"C:\Program Files\Docker\Docker"\DockerCli.exe -SwitchLinuxEngine
docker run -it %IMAGE_NAME% /bin/bash /startup.sh %CURRENT_BRANCH%
15 changes: 15 additions & 0 deletions tests/docker/clang-7/startup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash
set -e -o pipefail

CPP_STANDARD=11

BRANCH=${1:-dev-mikemirzayanov}
echo "Use branch ""$BRANCH"""

git clone https://github.com/MikeMirzayanov/testlib.git
cd testlib
git checkout "$BRANCH"
cd tests
./run.sh clang++ v0 "$CPP_STANDARD"
cd /
rm -rf testlib
7 changes: 5 additions & 2 deletions tests/docker/clang-latest/run.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
"C:\Program Files\Docker\Docker"\DockerCli.exe -SwitchLinuxEngine
@echo off

docker run -it test-testlib-clang-latest
SET IMAGE_NAME=test-testlib-clang-latest
for /f "tokens=*" %%i in ('git rev-parse --abbrev-ref HEAD') do set CURRENT_BRANCH=%%i

"C:\Program Files\Docker\Docker"\DockerCli.exe -SwitchLinuxEngine
docker run -it %IMAGE_NAME% /bin/bash /startup.sh %CURRENT_BRANCH%
9 changes: 7 additions & 2 deletions tests/docker/clang-latest/startup.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
#!/bin/bash
set -e -o pipefail

CPP_STANDARD=20

BRANCH=${1:-dev-mikemirzayanov}
echo "Use branch ""$BRANCH"""

git clone https://github.com/MikeMirzayanov/testlib.git
cd testlib
git checkout dev-mikemirzayanov
git checkout "$BRANCH"
cd tests
./run.sh v0 23
./run.sh clang++ v0 "$CPP_STANDARD"
cd /
rm -rf testlib
7 changes: 5 additions & 2 deletions tests/docker/gcc-7/run.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
"C:\Program Files\Docker\Docker"\DockerCli.exe -SwitchLinuxEngine
@echo off

docker run -it test-testlib-gcc-7
SET IMAGE_NAME=test-testlib-gcc-7
for /f "tokens=*" %%i in ('git rev-parse --abbrev-ref HEAD') do set CURRENT_BRANCH=%%i

"C:\Program Files\Docker\Docker"\DockerCli.exe -SwitchLinuxEngine
docker run -it %IMAGE_NAME% /bin/bash /startup.sh %CURRENT_BRANCH%
9 changes: 7 additions & 2 deletions tests/docker/gcc-7/startup.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
#!/bin/bash
set -e -o pipefail

CPP_STANDARD=11

BRANCH=${1:-dev-mikemirzayanov}
echo "Use branch ""$BRANCH"""

git clone https://github.com/MikeMirzayanov/testlib.git
cd testlib
git checkout dev-mikemirzayanov
git checkout "$BRANCH"
cd tests
./run.sh g++ v0 11
./run.sh g++ v0 "$CPP_STANDARD"
cd /
rm -rf testlib
11 changes: 7 additions & 4 deletions tests/docker/gcc-latest/run.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
"C:\Program Files\Docker\Docker"\DockerCli.exe -SwitchLinuxEngine

docker run -it test-testlib-gcc-latest

@echo off

SET IMAGE_NAME=test-testlib-gcc-latest
for /f "tokens=*" %%i in ('git rev-parse --abbrev-ref HEAD') do set CURRENT_BRANCH=%%i

"C:\Program Files\Docker\Docker"\DockerCli.exe -SwitchLinuxEngine
docker run -it %IMAGE_NAME% /bin/bash /startup.sh %CURRENT_BRANCH%
9 changes: 7 additions & 2 deletions tests/docker/gcc-latest/startup.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
#!/bin/bash
set -e -o pipefail

CPP_STANDARD=23

BRANCH=${1:-dev-mikemirzayanov}
echo "Use branch ""$BRANCH"""

git clone https://github.com/MikeMirzayanov/testlib.git
cd testlib
git checkout dev-mikemirzayanov
git checkout "$BRANCH"
cd tests
./run.sh g++ v0 23
./run.sh g++ v0 "$CPP_STANDARD"
cd /
rm -rf testlib

0 comments on commit f5b8c28

Please sign in to comment.