Skip to content

Commit f9737a2

Browse files
committed
Rebuild MaixCDK doc by commit refs/heads/main
0 parents  commit f9737a2

File tree

171 files changed

+144937
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

171 files changed

+144937
-0
lines changed

.github/workflows/build_linux.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: Build test for Linux
4+
5+
# Controls when the action will run.
6+
on:
7+
# Triggers the workflow on push or pull request events but only for the main branch
8+
push:
9+
branches: [ main, dev ]
10+
pull_request:
11+
branches: [ main, dev ]
12+
13+
# Allows you to run this workflow manually from the Actions tab
14+
workflow_dispatch:
15+
16+
# permissions: write-all
17+
18+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
19+
jobs:
20+
# This workflow contains a single job called "build"
21+
build:
22+
# Only run job for specific repository
23+
if: github.repository == 'sipeed/MaixCDK'
24+
# The type of runner that the job will run on
25+
runs-on: ubuntu-latest
26+
strategy:
27+
matrix:
28+
python-version: ["3.11"] # MaixCAM use 3.11
29+
# Steps represent a sequence of tasks that will be executed as part of the job
30+
steps:
31+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
32+
- uses: actions/checkout@v4
33+
- uses: actions/setup-python@v5
34+
with:
35+
python-version: ${{ matrix.python-version }}
36+
- name: Build MaixCDK Examples
37+
run: |
38+
echo "-- Check python version must python 3.11 --"
39+
python3 -c 'import sys;print(sys.version);assert sys.version_info >= (3, 11);assert sys.version_info < (3, 12)'
40+
python -c 'import sys;print(sys.version);assert sys.version_info >= (3, 11);assert sys.version_info < (3, 12)'
41+
whereis python
42+
whereis python3
43+
# export PATH=~/.local/bin/:$PATH
44+
echo "--------------------------------"
45+
echo "-- Install requirements first --"
46+
echo "--------------------------------"
47+
python -m pip install -r requirements.txt
48+
sudo apt update -y
49+
sudo apt install -y libopencv-dev libopencv-contrib-dev libsdl2-dev cmake autoconf automake libtool git build-essential
50+
echo "--------------------------------"
51+
echo "-- Build Test for Linux now --"
52+
echo "--------------------------------"
53+
cd test/test_examples
54+
chmod +x test_cases.sh
55+
./test_cases.sh linux 0
56+
57+
- name: Build doc
58+
run: |
59+
pip3 install teedoc
60+
cd docs
61+
echo "== install plugins =="
62+
teedoc install
63+
echo "== start build =="
64+
teedoc build
65+
echo "== build complete =="
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: Build test for MaixCAM
4+
5+
# Controls when the action will run.
6+
on:
7+
# Triggers the workflow on push or pull request events but only for the main branch
8+
push:
9+
branches: [ main, dev ]
10+
pull_request:
11+
branches: [ main, dev ]
12+
13+
# Allows you to run this workflow manually from the Actions tab
14+
workflow_dispatch:
15+
16+
# permissions: write-all
17+
18+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
19+
jobs:
20+
# This workflow contains a single job called "build"
21+
build:
22+
# Only run job for specific repository
23+
if: github.repository == 'sipeed/MaixCDK'
24+
# The type of runner that the job will run on
25+
runs-on: ubuntu-latest
26+
strategy:
27+
matrix:
28+
python-version: ["3.11"] # MaixCAM use 3.11
29+
# Steps represent a sequence of tasks that will be executed as part of the job
30+
steps:
31+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
32+
- uses: actions/checkout@v4
33+
- uses: actions/setup-python@v5
34+
with:
35+
python-version: ${{ matrix.python-version }}
36+
- name: Build MaixCDK Examples
37+
run: |
38+
echo "-- Check python version must python 3.11 --"
39+
python3 -c 'import sys;print(sys.version);assert sys.version_info >= (3, 11);assert sys.version_info < (3, 12)'
40+
python -c 'import sys;print(sys.version);assert sys.version_info >= (3, 11);assert sys.version_info < (3, 12)'
41+
whereis python
42+
whereis python3
43+
# export PATH=~/.local/bin/:$PATH
44+
echo "--------------------------------"
45+
echo "-- Install requirements first --"
46+
echo "--------------------------------"
47+
python -m pip install -r requirements.txt
48+
sudo apt update -y
49+
sudo apt install -y cmake autoconf automake libtool git build-essential
50+
echo "--------------------------------"
51+
echo "-- Build Test for MaixCAM now --"
52+
echo "--------------------------------"
53+
cd test/test_examples
54+
chmod +x test_cases.sh
55+
./test_cases.sh maixcam 0
56+
echo "------------------------------------"
57+
echo "-- Build Projects for MaixCAM now --"
58+
echo "------------------------------------"
59+
cd ../../projects
60+
chmod +x build_all.sh
61+
./build_all.sh maixcam
62+
63+
- name: Build doc
64+
run: |
65+
pip3 install teedoc
66+
cd docs
67+
echo "== install plugins =="
68+
teedoc install
69+
echo "== start build =="
70+
teedoc build
71+
echo "== build complete =="
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: Build test for MaixCAM2
4+
5+
# Controls when the action will run.
6+
on:
7+
# Triggers the workflow on push or pull request events but only for the main branch
8+
push:
9+
branches: [ main, dev ]
10+
pull_request:
11+
branches: [ main, dev ]
12+
13+
# Allows you to run this workflow manually from the Actions tab
14+
workflow_dispatch:
15+
16+
# permissions: write-all
17+
18+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
19+
jobs:
20+
# This workflow contains a single job called "build"
21+
build:
22+
# Only run job for specific repository
23+
if: github.repository == 'sipeed/MaixCDK'
24+
# The type of runner that the job will run on
25+
runs-on: ubuntu-latest
26+
strategy:
27+
matrix:
28+
python-version: ["3.13"] # MaixCAM2 use 3.13
29+
# Steps represent a sequence of tasks that will be executed as part of the job
30+
steps:
31+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
32+
- uses: actions/checkout@v4
33+
- uses: actions/setup-python@v5
34+
with:
35+
python-version: ${{ matrix.python-version }}
36+
- name: Build MaixCDK Examples
37+
run: |
38+
echo "-- Check python version must python 3.13 --"
39+
python3 -c 'import sys;print(sys.version);assert sys.version_info >= (3, 13);assert sys.version_info < (3, 14)'
40+
python -c 'import sys;print(sys.version);assert sys.version_info >= (3, 13);assert sys.version_info < (3, 14)'
41+
whereis python
42+
whereis python3
43+
# export PATH=~/.local/bin/:$PATH
44+
echo "--------------------------------"
45+
echo "-- Install requirements first --"
46+
echo "--------------------------------"
47+
python -m pip install -r requirements.txt
48+
sudo apt update -y
49+
sudo apt install -y cmake autoconf automake libtool git build-essential
50+
echo "--------------------------------"
51+
echo "-- Build Test for MaixCAM2 now --"
52+
echo "--------------------------------"
53+
cd test/test_examples
54+
chmod +x test_cases.sh
55+
./test_cases.sh maixcam2 0
56+
echo "------------------------------------"
57+
echo "-- Build Projects for MaixCAM2 now --"
58+
echo "------------------------------------"
59+
cd ../../projects
60+
chmod +x build_all.sh
61+
./build_all.sh maixcam2
62+
63+
- name: Build doc
64+
run: |
65+
pip3 install teedoc
66+
cd docs
67+
echo "== install plugins =="
68+
teedoc install
69+
echo "== start build =="
70+
teedoc build
71+
echo "== build complete =="
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: Build and publish docs for MaixCAM
4+
5+
# Controls when the action will run.
6+
on:
7+
# Triggers the workflow on push or pull request events but only for the main branch
8+
push:
9+
branches: [ main ]
10+
# pull_request:
11+
# branches: [ main ]
12+
13+
# Allows you to run this workflow manually from the Actions tab
14+
workflow_dispatch:
15+
16+
permissions: write-all
17+
18+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
19+
jobs:
20+
# This workflow contains a single job called "build"
21+
build:
22+
# Only run job for specific repository
23+
if: github.repository == 'sipeed/MaixCDK'
24+
# The type of runner that the job will run on
25+
runs-on: ubuntu-latest
26+
strategy:
27+
matrix:
28+
python-version: ["3.11"] # MaixCAM use 3.11
29+
# Steps represent a sequence of tasks that will be executed as part of the job
30+
steps:
31+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
32+
- uses: actions/checkout@v4
33+
- uses: actions/setup-python@v5
34+
with:
35+
python-version: ${{ matrix.python-version }}
36+
- name: Build MaixCDK API doc
37+
run: |
38+
echo "-- Check python version must python 3.11 --"
39+
python3 -c 'import sys;print(sys.version);assert sys.version_info >= (3, 11);assert sys.version_info < (3, 12)'
40+
python -c 'import sys;print(sys.version);assert sys.version_info >= (3, 11);assert sys.version_info < (3, 12)'
41+
whereis python
42+
whereis python3
43+
# export PATH=~/.local/bin/:$PATH
44+
echo "--------------------------------"
45+
echo "-- Install requirements first --"
46+
echo "--------------------------------"
47+
python -m pip install -r requirements.txt
48+
sudo apt update -y
49+
sudo apt install -y cmake autoconf automake libtool git build-essential
50+
echo "--------------------------------"
51+
echo "-- Build API DOC for MaixCAM now --"
52+
echo "--------------------------------"
53+
cd examples/nn_yolov5
54+
maixcdk distclean
55+
maixcdk build -p maixcam
56+
57+
- name: Push doc to github pages
58+
run: |
59+
pip3 install teedoc
60+
cd docs
61+
echo "== install plugins =="
62+
teedoc install
63+
echo "== start build =="
64+
teedoc build
65+
echo "== build complete =="
66+
remote_addr=`git remote get-url --push origin`
67+
remote_addr=`echo $remote_addr| awk -F'://' '{print $2}'`
68+
user_name=`git log -1 --pretty=format:'%an'`
69+
user_email=`git log -1 --pretty=format:'%ae'`
70+
echo "== checkout gh-pages branch =="
71+
cd out
72+
cp -r ../../.github .
73+
git config --global init.defaultBranch gh-pages
74+
git init
75+
git config user.name "${user_name}"
76+
git config user.email ${user_email}
77+
remote_addr="https://Neutree:${{ secrets.DISPATCH_PAT }}@${remote_addr}"
78+
echo "-- user ${user_name}"
79+
echo "-- remote addr: ${remote_addr}"
80+
git remote add origin "${remote_addr}"
81+
echo "== add web files =="
82+
git add -A
83+
git commit -m "Rebuild MaixCDK doc by commit $GITHUB_REF"
84+
git push origin HEAD:gh-pages --force
85+
echo "== push complete =="

.github/workflows/sync_gitee.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: sync code to gitee
4+
5+
# Controls when the action will run. Triggers the workflow on push or pull request
6+
# events but only for the master branch
7+
# on:
8+
# push:
9+
# branches: [ master ]
10+
# pull_request:
11+
# branches: [ master ]
12+
on:
13+
# Triggers the workflow on push or pull request events but only for the main branch
14+
push:
15+
branches: [ main ]
16+
# pull_request:
17+
# branches: [ main ]
18+
19+
20+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
21+
jobs:
22+
# This workflow contains a single job called "build"
23+
sync_gitee:
24+
name: sync repo to gitee
25+
# Only run job for specific repository
26+
if: github.repository == 'sipeed/MaixCDK'
27+
# The type of runner that the job will run on
28+
runs-on: ubuntu-latest
29+
30+
# Steps represent a sequence of tasks that will be executed as part of the job
31+
steps:
32+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
33+
- name: checkout code from github
34+
uses: actions/checkout@v2
35+
36+
# Runs a set of commands using the runners shell
37+
- name: sync shell cmd
38+
run: |
39+
GITEE_GIT_ADDR="git@gitee.com:Sipeed/MaixCDK.git"
40+
git fetch --unshallow
41+
SSHPATH="$HOME/.ssh"
42+
rm -rf "$SSHPATH"
43+
mkdir -p "$SSHPATH"
44+
echo "${{ secrets.GITEE_SYNC_ACCESSS_KEY }}" > "$SSHPATH/id_rsa"
45+
chmod 600 "$SSHPATH/id_rsa"
46+
sudo sh -c "echo StrictHostKeyChecking no >>/etc/ssh/ssh_config"
47+
git remote add upstream $GITEE_GIT_ADDR
48+
git push upstream main:main --force

.github/workflows/trigger_wiki.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: trigger wiki
4+
5+
# Controls when the action will run.
6+
on:
7+
push:
8+
branches:
9+
- gh-pages
10+
pull_request:
11+
branches:
12+
- gh-pages
13+
14+
# Allows you to run this workflow manually from the Actions tab
15+
workflow_dispatch:
16+
17+
permissions: write-all
18+
19+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
20+
jobs:
21+
# This workflow contains a single job called "build"
22+
trigger_wiki:
23+
name: trigger sipeed_wiki
24+
# Only run job for specific repository
25+
# if: github.repository == 'sipeed/MaixPy'
26+
# The type of runner that the job will run on
27+
runs-on: ubuntu-latest
28+
# strategy:
29+
# matrix:
30+
# python-version: [3.8]
31+
32+
# Steps represent a sequence of tasks that will be executed as part of the job
33+
steps:
34+
- name: trigger sipeed wiki request
35+
uses: actions/github-script@v6
36+
with:
37+
github-token: ${{ secrets.DISPATCH_PAT }}
38+
script: |
39+
const result = await github.rest.repos.createDispatchEvent({
40+
owner: 'sipeed',
41+
repo: 'sipeed_wiki',
42+
event_type: 'update_maixcdk_doc',
43+
client_payload: {"key": "value"}
44+
})
45+
console.log(result);

0 commit comments

Comments
 (0)