Skip to content

Commit f108ad0

Browse files
committed
refactor: replace git submodule with direct clone and handle GitHub CICD environment
1 parent 7b74f4a commit f108ad0

File tree

4 files changed

+18
-5
lines changed

4 files changed

+18
-5
lines changed

.workflow/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ stages:
2222
command:
2323
- 'apt-get update '
2424
- 'apt-get install -y build-essential curl cmake openssl libssl-dev git '
25-
- 'git submodule update --init --recursive --depth=1 '
25+
- 'git clone https://gitee.com/chenxuan520/cpptest src/third_party/cpptest'
2626
- 'cd src '
2727
- ./release.sh
2828
- 'cp ./cppnet.tar.gz ../cppnet-ubuntu-release.tar.gz '

.workflow/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ stages:
2222
command:
2323
- apt-get update
2424
- apt-get install -y build-essential curl cmake openssl libssl-dev git
25-
- git submodule update --init --recursive --depth=1
25+
- git clone https://gitee.com/chenxuan520/cpptest src/third_party/cpptest
2626
- cd src
2727
- ./build.sh
2828
- ./bin/test_bin

demo/mnist/init.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
#!/bin/bash
22

3-
git clone https://gitee.com/chenxuan520/cppjson
4-
git clone https://gitee.com/chenxuan520/deeplearning.git
3+
if [ "$GITHUB_ACTIONS" = "true" ]; then
4+
echo "In GitHub CICD environment"
5+
git clone https://github.com/chenxuan520/cppjson
6+
git clone https://github.com/chenxuan520/deeplearning.git
7+
else
8+
echo "Not in GitHub CICD environment"
9+
git clone https://gitee.com/chenxuan520/cppjson
10+
git clone https://gitee.com/chenxuan520/deeplearning.git
11+
fi
512

613
# if not exist demo.param
714
if [ ! -f "./demo.param" ]; then

demo/web-server/init.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
#!/bin/bash
2-
git clone https://gitee.com/chenxuan520/cppjson
2+
if [ "$GITHUB_ACTIONS" = "true" ]; then
3+
echo "In GitHub CICD environment"
4+
git clone https://github.com/chenxuan520/cppjson
5+
else
6+
echo "Not in GitHub CICD environment"
7+
git clone https://gitee.com/chenxuan520/cppjson
8+
fi
39

410
# if not exist ssl dir
511
if [ ! -d "./ssl" ]; then

0 commit comments

Comments
 (0)