-
Notifications
You must be signed in to change notification settings - Fork 14
executable file
·59 lines (54 loc) · 2.29 KB
/
build_maixcam.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# 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: [ master, dev ]
# 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 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