Skip to content

Commit 2c4cc01

Browse files
committed
Rebuild MaixPy doc by commit refs/heads/main
0 parents  commit 2c4cc01

File tree

461 files changed

+238247
-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.

461 files changed

+238247
-0
lines changed
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: Build 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/MaixPy'
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 MaixPy
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+
# pull sipeed/MaixCDK repo here first
45+
pwd_path=$(pwd)
46+
cd ~
47+
git clone https://github.com/sipeed/MaixCDK --depth=1
48+
export MAIXCDK_PATH=`pwd`/MaixCDK
49+
cd $pwd_path
50+
python -m pip install -U pip setuptools wheel
51+
python -m pip install -r $MAIXCDK_PATH/requirements.txt
52+
python -m pip install pybind11-stubgen
53+
echo "--------------------------------"
54+
echo "-- Build MaixPy for Linux now --"
55+
echo "--------------------------------"
56+
sudo apt update -y
57+
sudo apt install -y libopencv-dev libopencv-contrib-dev libsdl2-dev cmake autoconf automake libtool git build-essential
58+
cmake --version
59+
python setup.py bdist_wheel linux
60+
echo "--------------------------------"
61+
echo "-- Test MaixPy basic for Linux now --"
62+
echo "--------------------------------"
63+
chmod +x ./run.sh && ./run.sh test/test_basic.py
64+
mkdir -p artifact
65+
mv dist/* artifact/
66+
echo "----------------------------------"
67+
echo "-- Build MaixPy for MaixCAM now --"
68+
echo "----------------------------------"
69+
python setup.py bdist_wheel maixcam
70+
mv dist/* artifact/
71+
72+
- name: Upload MaixPy Linux firmware as artifact
73+
uses: actions/upload-artifact@v4
74+
with:
75+
name: maixpy_firmware
76+
path: artifact/*.whl
77+
78+
# Runs a set of commands using the runners shell
79+
- name: Push doc to github pages
80+
run: |
81+
pip3 install teedoc
82+
cd docs
83+
echo "== install plugins =="
84+
teedoc install
85+
echo "== start build =="
86+
teedoc build
87+
echo "== build complete =="
88+
remote_addr=`git remote get-url --push origin`
89+
remote_addr=`echo $remote_addr| awk -F'://' '{print $2}'`
90+
user_name=`git log -1 --pretty=format:'%an'`
91+
user_email=`git log -1 --pretty=format:'%ae'`
92+
echo "== checkout gh-pages branch =="
93+
cd out
94+
cp -r ../../.github .
95+
git config --global init.defaultBranch gh-pages
96+
git init
97+
git config user.name "${user_name}"
98+
git config user.email ${user_email}
99+
remote_addr="https://Neutree:${{ secrets.DISPATCH_PAT }}@${remote_addr}"
100+
echo "-- user ${user_name}"
101+
echo "-- remote addr: ${remote_addr}"
102+
git remote add origin "${remote_addr}"
103+
echo "== add web files =="
104+
git add -A
105+
git commit -m "Rebuild MaixPy doc by commit $GITHUB_REF"
106+
git push origin HEAD:gh-pages --force
107+
echo "== push complete =="
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: Build MaixCAM Dev branch
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: [ dev ]
10+
pull_request:
11+
branches: [ 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/MaixPy'
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 MaixPy
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+
# pull sipeed/MaixCDK repo here first
45+
pwd_path=$(pwd)
46+
cd ~
47+
git clone https://github.com/sipeed/MaixCDK -b dev --depth=1
48+
export MAIXCDK_PATH=`pwd`/MaixCDK
49+
cd $pwd_path
50+
python -m pip install -U pip setuptools wheel
51+
python -m pip install -r $MAIXCDK_PATH/requirements.txt
52+
python -m pip install pybind11-stubgen
53+
echo "--------------------------------"
54+
echo "-- Build MaixPy for Linux now --"
55+
echo "--------------------------------"
56+
sudo apt update -y
57+
sudo apt install -y libopencv-dev libopencv-contrib-dev libsdl2-dev cmake autoconf automake libtool git build-essential
58+
cmake --version
59+
python setup.py bdist_wheel linux
60+
echo "--------------------------------"
61+
echo "-- Test MaixPy basic for Linux now --"
62+
echo "--------------------------------"
63+
chmod +x ./run.sh && ./run.sh test/test_basic.py
64+
mkdir -p artifact
65+
mv dist/* artifact/
66+
echo "----------------------------------"
67+
echo "-- Build MaixPy for MaixCAM now --"
68+
echo "----------------------------------"
69+
python setup.py bdist_wheel maixcam
70+
mv dist/* artifact/
71+
72+
- name: Upload MaixPy Linux firmware as artifact
73+
uses: actions/upload-artifact@v4
74+
with:
75+
name: maixpy_firmware
76+
path: artifact/*.whl
77+
78+
# Runs a set of commands using the runners shell
79+
- name: build doc
80+
run: |
81+
echo "== install teedoc =="
82+
pip3 install teedoc
83+
cd docs
84+
echo "== install plugins =="
85+
teedoc install
86+
echo "== start build =="
87+
teedoc build
88+
echo "== build complete =="
89+
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: Build MaixCAM PR
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/MaixPy'
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 MaixPy
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+
# pull sipeed/MaixCDK repo here first
45+
pwd_path=$(pwd)
46+
cd ~
47+
git clone https://github.com/sipeed/MaixCDK --depth=1
48+
export MAIXCDK_PATH=`pwd`/MaixCDK
49+
cd $pwd_path
50+
python -m pip install -U pip setuptools wheel
51+
python -m pip install -r $MAIXCDK_PATH/requirements.txt
52+
python -m pip install pybind11-stubgen
53+
echo "--------------------------------"
54+
echo "-- Build MaixPy for Linux now --"
55+
echo "--------------------------------"
56+
sudo apt update -y
57+
sudo apt install -y libopencv-dev libopencv-contrib-dev libsdl2-dev cmake autoconf automake libtool git build-essential
58+
cmake --version
59+
python setup.py bdist_wheel linux
60+
echo "--------------------------------"
61+
echo "-- Test MaixPy basic for Linux now --"
62+
echo "--------------------------------"
63+
chmod +x ./run.sh && ./run.sh test/test_basic.py
64+
mkdir -p artifact
65+
mv dist/* artifact/
66+
echo "----------------------------------"
67+
echo "-- Build MaixPy for MaixCAM now --"
68+
echo "----------------------------------"
69+
python setup.py bdist_wheel maixcam
70+
mv dist/* artifact/
71+
72+
- name: Upload MaixPy Linux firmware as artifact
73+
uses: actions/upload-artifact@v4
74+
with:
75+
name: maixpy_firmware
76+
path: artifact/*.whl
77+
78+
# Runs a set of commands using the runners shell
79+
- name: build doc
80+
run: |
81+
echo "== install teedoc =="
82+
pip3 install teedoc
83+
cd docs
84+
echo "== install plugins =="
85+
teedoc install
86+
echo "== start build =="
87+
teedoc build
88+
echo "== build complete =="
89+

0 commit comments

Comments
 (0)