-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rebuild MaixCDK doc by commit refs/heads/main
- Loading branch information
0 parents
commit a4556ee
Showing
165 changed files
with
121,329 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# This is a basic workflow to help you get started with Actions | ||
|
||
name: Build test for Linux | ||
|
||
# Controls when the action will run. | ||
on: | ||
# Triggers the workflow on push or pull request events but only for the main branch | ||
push: | ||
branches: [ main, dev ] | ||
pull_request: | ||
branches: [ main, dev ] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# permissions: write-all | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "build" | ||
build: | ||
# Only run job for specific repository | ||
if: github.repository == 'sipeed/MaixCDK' | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.11"] # MaixCAM use 3.11 | ||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Build MaixCDK Examples | ||
run: | | ||
echo "-- Check python version must python 3.11 --" | ||
python3 -c 'import sys;print(sys.version);assert sys.version_info >= (3, 11);assert sys.version_info < (3, 12)' | ||
python -c 'import sys;print(sys.version);assert sys.version_info >= (3, 11);assert sys.version_info < (3, 12)' | ||
whereis python | ||
whereis python3 | ||
# export PATH=~/.local/bin/:$PATH | ||
echo "--------------------------------" | ||
echo "-- Install requirements first --" | ||
echo "--------------------------------" | ||
python -m pip install -r requirements.txt | ||
echo "--------------------------------" | ||
echo "-- Build Test for Linux now --" | ||
echo "--------------------------------" | ||
cd test/test_examples | ||
chmod +x test_cases.sh | ||
./test_cases.sh linux 0 | ||
- name: Build doc | ||
run: | | ||
pip3 install teedoc | ||
cd docs | ||
echo "== install plugins ==" | ||
teedoc install | ||
echo "== start build ==" | ||
teedoc build | ||
echo "== build complete ==" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# This is a basic workflow to help you get started with Actions | ||
|
||
name: Build test for MaixCAM | ||
|
||
# Controls when the action will run. | ||
on: | ||
# Triggers the workflow on push or pull request events but only for the main branch | ||
push: | ||
branches: [ main, dev ] | ||
pull_request: | ||
branches: [ main, dev ] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# permissions: write-all | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "build" | ||
build: | ||
# Only run job for specific repository | ||
if: github.repository == 'sipeed/MaixCDK' | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.11"] # MaixCAM use 3.11 | ||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Build MaixCDK Examples | ||
run: | | ||
echo "-- Check python version must python 3.11 --" | ||
python3 -c 'import sys;print(sys.version);assert sys.version_info >= (3, 11);assert sys.version_info < (3, 12)' | ||
python -c 'import sys;print(sys.version);assert sys.version_info >= (3, 11);assert sys.version_info < (3, 12)' | ||
whereis python | ||
whereis python3 | ||
# export PATH=~/.local/bin/:$PATH | ||
echo "--------------------------------" | ||
echo "-- Install requirements first --" | ||
echo "--------------------------------" | ||
python -m pip install -r requirements.txt | ||
echo "--------------------------------" | ||
echo "-- Build Test for MaixCAM now --" | ||
echo "--------------------------------" | ||
cd test/test_examples | ||
chmod +x test_cases.sh | ||
./test_cases.sh maixcam 0 | ||
echo "------------------------------------" | ||
echo "-- Build Projects for MaixCAM now --" | ||
echo "------------------------------------" | ||
cd ../../projects | ||
chmod +x build_all.sh | ||
./build_all.sh | ||
- name: Build doc | ||
run: | | ||
pip3 install teedoc | ||
cd docs | ||
echo "== install plugins ==" | ||
teedoc install | ||
echo "== start build ==" | ||
teedoc build | ||
echo "== build complete ==" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
# This is a basic workflow to help you get started with Actions | ||
|
||
name: Build and publish docs for MaixCAM | ||
|
||
# Controls when the action will run. | ||
on: | ||
# Triggers the workflow on push or pull request events but only for the main branch | ||
push: | ||
branches: [ main ] | ||
# pull_request: | ||
# branches: [ main ] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
permissions: write-all | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "build" | ||
build: | ||
# Only run job for specific repository | ||
if: github.repository == 'sipeed/MaixCDK' | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.11"] # MaixCAM use 3.11 | ||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Build MaixCDK API doc | ||
run: | | ||
echo "-- Check python version must python 3.11 --" | ||
python3 -c 'import sys;print(sys.version);assert sys.version_info >= (3, 11);assert sys.version_info < (3, 12)' | ||
python -c 'import sys;print(sys.version);assert sys.version_info >= (3, 11);assert sys.version_info < (3, 12)' | ||
whereis python | ||
whereis python3 | ||
# export PATH=~/.local/bin/:$PATH | ||
echo "--------------------------------" | ||
echo "-- Install requirements first --" | ||
echo "--------------------------------" | ||
python -m pip install -r requirements.txt | ||
echo "--------------------------------" | ||
echo "-- Build API DOC for MaixCAM now --" | ||
echo "--------------------------------" | ||
cd examples/nn_yolov5 | ||
maixcdk distclean | ||
maixcdk build -p maixcam | ||
- name: Push doc to github pages | ||
run: | | ||
pip3 install teedoc | ||
cd docs | ||
echo "== install plugins ==" | ||
teedoc install | ||
echo "== start build ==" | ||
teedoc build | ||
echo "== build complete ==" | ||
remote_addr=`git remote get-url --push origin` | ||
remote_addr=`echo $remote_addr| awk -F'://' '{print $2}'` | ||
user_name=`git log -1 --pretty=format:'%an'` | ||
user_email=`git log -1 --pretty=format:'%ae'` | ||
echo "== checkout gh-pages branch ==" | ||
cd out | ||
cp -r ../../.github . | ||
git config --global init.defaultBranch gh-pages | ||
git init | ||
git config user.name "${user_name}" | ||
git config user.email ${user_email} | ||
remote_addr="https://Neutree:${{ secrets.DISPATCH_PAT }}@${remote_addr}" | ||
echo "-- user ${user_name}" | ||
echo "-- remote addr: ${remote_addr}" | ||
git remote add origin "${remote_addr}" | ||
echo "== add web files ==" | ||
git add -A | ||
git commit -m "Rebuild MaixCDK doc by commit $GITHUB_REF" | ||
git push origin HEAD:gh-pages --force | ||
echo "== push complete ==" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# This is a basic workflow to help you get started with Actions | ||
|
||
name: sync code to gitee | ||
|
||
# Controls when the action will run. Triggers the workflow on push or pull request | ||
# events but only for the master branch | ||
# on: | ||
# push: | ||
# branches: [ master ] | ||
# pull_request: | ||
# branches: [ master ] | ||
on: | ||
# Triggers the workflow on push or pull request events but only for the main branch | ||
push: | ||
branches: [ main ] | ||
# pull_request: | ||
# branches: [ main ] | ||
|
||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "build" | ||
sync_gitee: | ||
name: sync repo to gitee | ||
# Only run job for specific repository | ||
if: github.repository == 'sipeed/MaixCDK' | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- name: checkout code from github | ||
uses: actions/checkout@v2 | ||
|
||
# Runs a set of commands using the runners shell | ||
- name: sync shell cmd | ||
run: | | ||
GITEE_GIT_ADDR="[email protected]:Sipeed/MaixCDK.git" | ||
git fetch --unshallow | ||
SSHPATH="$HOME/.ssh" | ||
rm -rf "$SSHPATH" | ||
mkdir -p "$SSHPATH" | ||
echo "${{ secrets.GITEE_SYNC_ACCESSS_KEY }}" > "$SSHPATH/id_rsa" | ||
chmod 600 "$SSHPATH/id_rsa" | ||
sudo sh -c "echo StrictHostKeyChecking no >>/etc/ssh/ssh_config" | ||
git remote add upstream $GITEE_GIT_ADDR | ||
git push upstream main:main --force |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# This is a basic workflow to help you get started with Actions | ||
|
||
name: trigger wiki | ||
|
||
# Controls when the action will run. | ||
on: | ||
push: | ||
branches: | ||
- gh-pages | ||
pull_request: | ||
branches: | ||
- gh-pages | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
permissions: write-all | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "build" | ||
trigger_wiki: | ||
name: trigger sipeed_wiki | ||
# Only run job for specific repository | ||
# if: github.repository == 'sipeed/MaixPy' | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
# strategy: | ||
# matrix: | ||
# python-version: [3.8] | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
- name: trigger sipeed wiki request | ||
uses: actions/github-script@v6 | ||
with: | ||
github-token: ${{ secrets.DISPATCH_PAT }} | ||
script: | | ||
const result = await github.rest.repos.createDispatchEvent({ | ||
owner: 'sipeed', | ||
repo: 'sipeed_wiki', | ||
event_type: 'update_maixcdk_doc', | ||
client_payload: {"key": "value"} | ||
}) | ||
console.log(result); |
Oops, something went wrong.