Skip to content

Commit

Permalink
Remove ci because of network.
Browse files Browse the repository at this point in the history
  • Loading branch information
small-turtle-1 committed Oct 31, 2024
1 parent cf6bba1 commit 4bf3ee7
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 52 deletions.
34 changes: 25 additions & 9 deletions .github/workflows/slow_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,28 +65,44 @@ jobs:
sudo docker exec ${BUILDER_CONTAINER} bash -c "rm -rf /root/.config/pip/pip.conf && cd /infinity/ && pip3 uninstall -y infinity-sdk && cd python/infinity_sdk/ && pip3 install . -v --config-settings=cmake.build-type='RelWithDebInfo' --config-settings=build-dir='cmake-build-release' -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host tuna.tsinghua.edu.cn && cd ../.."
sudo docker exec ${BUILDER_CONTAINER} bash -c "rm -rf /root/.config/pip/pip.conf && cd /infinity/ && pip3 uninstall -y infinity-embedded-sdk && pip3 install . -v --config-settings=cmake.build-type='RelWithDebInfo' --config-settings=build-dir='cmake-build-release' -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host tuna.tsinghua.edu.cn"
# - name: Prepare cluster test
# - name: Create Test image
# if: ${{ !cancelled() && !failure() }}
# run : |
# sudo docker exec ${BUILDER_CONTAINER} bash -c "cd /infinity/ && pip3 install -r python/test_cluster/requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host tuna.tsinghua.edu.cn"
# # sudo docker exec ${BUILDER_CONTAINER} bash -c "yum install sudo iproute2 bridge-utils -y"
# # sudo apt install virtualenv -y
# # virtualenv -p python3 .venv
# # source .venv/bin/activate && pip3 install pytest && pip3 install -r python/test_cluster/requirements.txt
# run: |
# wget https://mirrors.edge.kernel.org/pub/linux/utils/net/iproute2/iproute2-6.9.0.tar.gz
# curl -fsSL https://get.docker.com -o get-docker.sh
# sudo docker build -f scripts/Dockerfile_infinity_tester_centos7 -t infiniflow/infinity_tester:centos7_clang18 .
# echo docker image ls

# - name: Start tester container
# if: ${{ !cancelled() && !failure() }}
# run: |
# TESTER_CONTAINER=infinity_tester_$(od -An -N4 -tx4 /dev/urandom | tr -d ' ')
# CPUS=${CPUS:-$(nproc)}
# echo "TESTER_CONTAINER=${TESTER_CONTAINER}" >> $GITHUB_ENV
# echo "CPUS=${CPUS}" >> $GITHUB_ENV
# TZ=${TZ:-$(readlink -f /etc/localtime | awk -F '/zoneinfo/' '{print $2}')}
# sudo docker rm -f -v ${TESTER_CONTAINER} && sudo docker run --net=host --cap-add=NET_ADMIN -d --name ${TESTER_CONTAINER} -e TZ=$TZ -e CMAKE_BUILD_PARALLEL_LEVEL=${CPUS} -e INFINITY_DIR=$PWD -v $PWD:/infinity -v /boot:/boot -v /var/run/docker.sock:/var/run/docker.sock --cpus ${CPUS} infiniflow/infinity_tester:centos7_clang18

# - name: Run cluster test
# if: ${{ !cancelled() && !failure() }}
# id: run_cluster_test
# run: |
# sudo docker exec ${BUILDER_CONTAINER} bash -c "cd /infinity/ && rm -fr /var/infinity && LD_PRELOAD=/usr/local/lib/clang/18/lib/x86_64-unknown-linux-gnu/libclang_rt.asan.so ASAN_OPTIONS=detect_leaks=0 python3 tools/run_cluster_test.py --infinity_path=cmake-build-release/src/infinity"
# # source .venv/bin/activate && sudo python3 tools/run_cluster_test.py --infinity_path=cmake-build-release/src/infinity --docker
# sudo docker exec ${TESTER_CONTAINER} bash -c "cd /infinity/ && rm -fr /var/infinity && LD_PRELOAD=/usr/local/lib/clang/18/lib/x86_64-unknown-linux-gnu/libclang_rt.asan.so ASAN_OPTIONS=detect_leaks=0 python3 tools/run_cluster_test.py --infinity_path=cmake-build-release/src/infinity --infinity_dir=$INFINITY_DIR"
# sudo docker exec ${TESTER_CONTAINER} bash -c "cd /infinity/ && rm -fr /var/infinity && LD_PRELOAD=/usr/local/lib/clang/18/lib/x86_64-unknown-linux-gnu/libclang_rt.asan.so ASAN_OPTIONS=detect_leaks=0 python3 tools/run_cluster_test.py --infinity_path=cmake-build-release/src/infinity --infinity_dir=$INFINITY_DIR --docker"

# - name: Collect cluster test output
# if: ${{ !cancelled() }}
# run: |
# failure="${{ steps.run_cluster_test.outcome == 'failure'}}"
# sudo python3 scripts/collect_cluster_log.py --executable_path=cmake-build-release/src/infinity --log_dir=/var/infinity/ --output_dir=${RUNNER_WORKSPACE_PREFIX}/log --failure=${failure}

# - name: Remove tester container
# if: always() # always run this step even if previous steps failed
# run: |
# if [ -n "${TESTER_CONTAINER}" ]; then
# sudo docker rm -f -v ${TESTER_CONTAINER}
# fi

- name: Prepare restart test data
if: ${{ !cancelled() && !failure() }}
run: |
Expand Down
102 changes: 59 additions & 43 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,43 +64,43 @@ jobs:
if: ${{ !cancelled() && !failure() }}
run: sudo docker exec ${BUILDER_CONTAINER} bash -c "rm -rf /root/.config/pip/pip.conf && cd /infinity/ && pip3 uninstall -y infinity-sdk infinity-embedded-sdk && pip3 install . -v --config-settings=cmake.build-type='Debug' --config-settings=build-dir='cmake-build-debug' -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host tuna.tsinghua.edu.cn && cd python/infinity_sdk/ && pip3 install . -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host tuna.tsinghua.edu.cn && cd ../.."

- name: Create Test image
if: ${{ !cancelled() && !failure() }}
run: |
wget https://mirrors.edge.kernel.org/pub/linux/utils/net/iproute2/iproute2-6.9.0.tar.gz
curl -fsSL https://get.docker.com -o get-docker.sh
sudo docker build -f scripts/Dockerfile_infinity_tester_centos7 -t infiniflow/infinity_tester:centos7_clang18 .
echo docker image ls
# - name: Create Test image
# if: ${{ !cancelled() && !failure() }}
# run: |
# wget https://mirrors.edge.kernel.org/pub/linux/utils/net/iproute2/iproute2-6.9.0.tar.gz
# curl -fsSL https://get.docker.com -o get-docker.sh
# sudo docker build -f scripts/Dockerfile_infinity_tester_centos7 -t infiniflow/infinity_tester:centos7_clang18 .
# echo docker image ls

- name: Start tester container
if: ${{ !cancelled() && !failure() }}
run: |
TESTER_CONTAINER=infinity_tester_$(od -An -N4 -tx4 /dev/urandom | tr -d ' ')
CPUS=${CPUS:-$(nproc)}
echo "TESTER_CONTAINER=${TESTER_CONTAINER}" >> $GITHUB_ENV
echo "CPUS=${CPUS}" >> $GITHUB_ENV
TZ=${TZ:-$(readlink -f /etc/localtime | awk -F '/zoneinfo/' '{print $2}')}
sudo docker rm -f -v ${TESTER_CONTAINER} && sudo docker run --net=host --cap-add=NET_ADMIN -d --name ${TESTER_CONTAINER} -e TZ=$TZ -e CMAKE_BUILD_PARALLEL_LEVEL=${CPUS} -e INFINITY_DIR=$PWD -v $PWD:/infinity -v /boot:/boot -v /var/run/docker.sock:/var/run/docker.sock --cpus ${CPUS} infiniflow/infinity_tester:centos7_clang18
# - name: Start tester container
# if: ${{ !cancelled() && !failure() }}
# run: |
# TESTER_CONTAINER=infinity_tester_$(od -An -N4 -tx4 /dev/urandom | tr -d ' ')
# CPUS=${CPUS:-$(nproc)}
# echo "TESTER_CONTAINER=${TESTER_CONTAINER}" >> $GITHUB_ENV
# echo "CPUS=${CPUS}" >> $GITHUB_ENV
# TZ=${TZ:-$(readlink -f /etc/localtime | awk -F '/zoneinfo/' '{print $2}')}
# sudo docker rm -f -v ${TESTER_CONTAINER} && sudo docker run --net=host --cap-add=NET_ADMIN -d --name ${TESTER_CONTAINER} -e TZ=$TZ -e CMAKE_BUILD_PARALLEL_LEVEL=${CPUS} -e INFINITY_DIR=$PWD -v $PWD:/infinity -v /boot:/boot -v /var/run/docker.sock:/var/run/docker.sock --cpus ${CPUS} infiniflow/infinity_tester:centos7_clang18

- name: Run cluster test
if: ${{ !cancelled() && !failure() }}
id: run_cluster_test
run: |
sudo docker exec ${TESTER_CONTAINER} bash -c "cd /infinity/ && rm -fr /var/infinity && LD_PRELOAD=/usr/local/lib/clang/18/lib/x86_64-unknown-linux-gnu/libclang_rt.asan.so ASAN_OPTIONS=detect_leaks=0 python3 tools/run_cluster_test.py --infinity_path=cmake-build-debug/src/infinity --infinity_dir=$INFINITY_DIR"
sudo docker exec ${TESTER_CONTAINER} bash -c "cd /infinity/ && rm -fr /var/infinity && LD_PRELOAD=/usr/local/lib/clang/18/lib/x86_64-unknown-linux-gnu/libclang_rt.asan.so ASAN_OPTIONS=detect_leaks=0 python3 tools/run_cluster_test.py --infinity_path=cmake-build-debug/src/infinity --infinity_dir=$INFINITY_DIR --docker"
# - name: Run cluster test
# if: ${{ !cancelled() && !failure() }}
# id: run_cluster_test
# run: |
# sudo docker exec ${TESTER_CONTAINER} bash -c "cd /infinity/ && rm -fr /var/infinity && LD_PRELOAD=/usr/local/lib/clang/18/lib/x86_64-unknown-linux-gnu/libclang_rt.asan.so ASAN_OPTIONS=detect_leaks=0 python3 tools/run_cluster_test.py --infinity_path=cmake-build-debug/src/infinity --infinity_dir=$INFINITY_DIR"
# sudo docker exec ${TESTER_CONTAINER} bash -c "cd /infinity/ && rm -fr /var/infinity && LD_PRELOAD=/usr/local/lib/clang/18/lib/x86_64-unknown-linux-gnu/libclang_rt.asan.so ASAN_OPTIONS=detect_leaks=0 python3 tools/run_cluster_test.py --infinity_path=cmake-build-debug/src/infinity --infinity_dir=$INFINITY_DIR --docker"

- name: Collect cluster test output
if: ${{ !cancelled() }}
run: |
failure="${{ steps.run_cluster_test.outcome == 'failure'}}"
sudo python3 scripts/collect_cluster_log.py --executable_path=cmake-build-debug/src/infinity --log_dir=/var/infinity/ --output_dir=${RUNNER_WORKSPACE_PREFIX}/log --failure=${failure}
# - name: Collect cluster test output
# if: ${{ !cancelled() }}
# run: |
# failure="${{ steps.run_cluster_test.outcome == 'failure'}}"
# sudo python3 scripts/collect_cluster_log.py --executable_path=cmake-build-debug/src/infinity --log_dir=/var/infinity/ --output_dir=${RUNNER_WORKSPACE_PREFIX}/log --failure=${failure}

- name: Remove tester container
if: always() # always run this step even if previous steps failed
run: |
if [ -n "${TESTER_CONTAINER}" ]; then
sudo docker rm -f -v ${TESTER_CONTAINER}
fi
# - name: Remove tester container
# if: always() # always run this step even if previous steps failed
# run: |
# if [ -n "${TESTER_CONTAINER}" ]; then
# sudo docker rm -f -v ${TESTER_CONTAINER}
# fi

- name: Prepare restart test data
if: ${{ !cancelled() && !failure() }}
Expand Down Expand Up @@ -258,27 +258,43 @@ jobs:
if: ${{ !cancelled() && !failure() }}
run: sudo docker exec ${BUILDER_CONTAINER} bash -c "rm -rf /root/.config/pip/pip.conf && cd /infinity/ && pip3 uninstall -y infinity-sdk infinity-embedded-sdk && pip3 install . -v --config-settings=cmake.build-type='RelWithDebInfo' --config-settings=build-dir='cmake-build-release' -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host tuna.tsinghua.edu.cn && cd python/infinity_sdk/ && pip3 install . -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host tuna.tsinghua.edu.cn && cd ../.."

# - name: Prepare cluster test
# - name: Create Test image
# if: ${{ !cancelled() && !failure() }}
# run : |
# sudo docker exec ${BUILDER_CONTAINER} bash -c "cd /infinity/ && pip3 install -r python/test_cluster/requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host tuna.tsinghua.edu.cn"
# # sudo docker exec ${BUILDER_CONTAINER} bash -c "yum install sudo iproute2 bridge-utils -y"
# # sudo apt install virtualenv -y
# # virtualenv -p python3 .venv
# # source .venv/bin/activate && pip3 install pytest && pip3 install -r python/test_cluster/requirements.txt
# run: |
# wget https://mirrors.edge.kernel.org/pub/linux/utils/net/iproute2/iproute2-6.9.0.tar.gz
# curl -fsSL https://get.docker.com -o get-docker.sh
# sudo docker build -f scripts/Dockerfile_infinity_tester_centos7 -t infiniflow/infinity_tester:centos7_clang18 .
# echo docker image ls

# - name: Start tester container
# if: ${{ !cancelled() && !failure() }}
# run: |
# TESTER_CONTAINER=infinity_tester_$(od -An -N4 -tx4 /dev/urandom | tr -d ' ')
# CPUS=${CPUS:-$(nproc)}
# echo "TESTER_CONTAINER=${TESTER_CONTAINER}" >> $GITHUB_ENV
# echo "CPUS=${CPUS}" >> $GITHUB_ENV
# TZ=${TZ:-$(readlink -f /etc/localtime | awk -F '/zoneinfo/' '{print $2}')}
# sudo docker rm -f -v ${TESTER_CONTAINER} && sudo docker run --net=host --cap-add=NET_ADMIN -d --name ${TESTER_CONTAINER} -e TZ=$TZ -e CMAKE_BUILD_PARALLEL_LEVEL=${CPUS} -e INFINITY_DIR=$PWD -v $PWD:/infinity -v /boot:/boot -v /var/run/docker.sock:/var/run/docker.sock --cpus ${CPUS} infiniflow/infinity_tester:centos7_clang18

# - name: Run cluster test
# if: ${{ !cancelled() && !failure() }}
# id: run_cluster_test
# run:
# sudo docker exec ${BUILDER_CONTAINER} bash -c "cd /infinity/ && rm -fr /var/infinity && LD_PRELOAD=/usr/local/lib/clang/18/lib/x86_64-unknown-linux-gnu/libclang_rt.asan.so ASAN_OPTIONS=detect_leaks=0 python3 tools/run_cluster_test.py --infinity_path=cmake-build-release/src/infinity"
# # source .venv/bin/activate && python3 tools/run_cluster_test.py --infinity_path=cmake-build-release/src/infinity --docker
# run: |
# sudo docker exec ${TESTER_CONTAINER} bash -c "cd /infinity/ && rm -fr /var/infinity && LD_PRELOAD=/usr/local/lib/clang/18/lib/x86_64-unknown-linux-gnu/libclang_rt.asan.so ASAN_OPTIONS=detect_leaks=0 python3 tools/run_cluster_test.py --infinity_path=cmake-build-release/src/infinity --infinity_dir=$INFINITY_DIR"
# sudo docker exec ${TESTER_CONTAINER} bash -c "cd /infinity/ && rm -fr /var/infinity && LD_PRELOAD=/usr/local/lib/clang/18/lib/x86_64-unknown-linux-gnu/libclang_rt.asan.so ASAN_OPTIONS=detect_leaks=0 python3 tools/run_cluster_test.py --infinity_path=cmake-build-release/src/infinity --infinity_dir=$INFINITY_DIR --docker"

# - name: Collect cluster test output
# if: ${{ !cancelled() }}
# run: |
# failure="${{ steps.run_cluster_test.outcome == 'failure'}}"
# sudo python3 scripts/collect_cluster_log.py --executable_path=cmake-build-release/src/infinity --log_dir=/var/infinity/ --output_dir=${RUNNER_WORKSPACE_PREFIX}/log --failure=${failure}

# - name: Remove tester container
# if: always() # always run this step even if previous steps failed
# run: |
# if [ -n "${TESTER_CONTAINER}" ]; then
# sudo docker rm -f -v ${TESTER_CONTAINER}
# fi

- name: Prepare restart test data
if: ${{ !cancelled() && !failure() }}
Expand Down

0 comments on commit 4bf3ee7

Please sign in to comment.