1+ # This is a basic workflow to help you get started with Actions
2+
3+ name : Bitbake intel
4+
5+ # Controls when the workflow will run
6+ on :
7+ # Triggers the workflow on push or pull request events
8+ push :
9+ branches : [ main ]
10+ pull_request :
11+ branches : [ main ]
12+ schedule :
13+ - cron : ' 0 12 * * 5'
14+
15+ # Allows you to run this workflow manually from the Actions tab
16+ workflow_dispatch :
17+
18+ env :
19+ TARGET_VERSION : master
20+ TARGET_INTEL_VERSION : master
21+ WORKING_DIR : /home/runner/work
22+ BUILD_DIR : /mnt/build
23+ DOWNLOAD_DIR : /mnt/build/downloads
24+ SSTATE_DIR : /mnt/build/sstate-cache
25+
26+ # A workflow run is made up of one or more jobs that can run sequentially or in parallel
27+ jobs :
28+ bitbake-intel :
29+
30+ strategy :
31+ matrix :
32+ target_machine : [genericx86-64, intel-corei7-64, intel-skylake-64]
33+ tensorflow_version : [2.19.0]
34+ fail-fast : false
35+
36+ # The type of runner that the job will run on
37+ runs-on : ubuntu-22.04
38+
39+ # Steps represent a sequence of tasks that will be executed as part of the job
40+ steps :
41+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
42+ - uses : actions/checkout@v2
43+
44+ # Install essential host packages
45+ - name : Install Packages
46+ run : |
47+ sudo apt-get update
48+ sudo apt-get -y install gawk wget git diffstat unzip texinfo gcc build-essential \
49+ chrpath socat cpio python3 python3-pip python3-pexpect xz-utils debianutils \
50+ iputils-ping python3-git python3-jinja2 python3-subunit zstd liblz4-tool file \
51+ locales libacl1
52+ sudo apt-get clean
53+ sudo apt-get autoclean -y
54+ sudo locale-gen en_US.UTF-8
55+
56+ - name : Prepare build directory
57+ run : |
58+ sudo mkdir -p ${BUILD_DIR}
59+ sudo chown runner ${BUILD_DIR}
60+ - name : Restore cache
61+ id : ccache-restore
62+ uses : actions/cache/restore@v4
63+ with :
64+ path : |
65+ ${{ env.DOWNLOAD_DIR }}
66+ ${{ env.SSTATE_DIR }}
67+ key : cache-${{ matrix.target_machine }}-${{ env.TARGET_VERSION }}
68+
69+ # checkout repository
70+ - name : Clone poky, meta-intel, meta-openembedded
71+ run : |
72+ sudo chown runner /mnt
73+ git clone --depth 1 -b ${TARGET_VERSION} git://git.yoctoproject.org/poky.git
74+ git clone --depth 1 -b ${TARGET_INTEL_VERSION} https://git.yoctoproject.org/meta-intel.git
75+ git clone --depth 1 -b ${TARGET_VERSION} git://git.openembedded.org/meta-openembedded
76+ working-directory : /home/runner/work
77+
78+ # Run bitbake
79+ - name : Bitbake MACHINE=${{ matrix.target_machine }}, TensorFlow-Lite version ${{ matrix.tensorflow_version }}
80+ run : |
81+ source ${WORKING_DIR}/poky/oe-init-build-env ${BUILD_DIR}
82+ bitbake-layers add-layer ${WORKING_DIR}/meta-openembedded/meta-oe/
83+ bitbake-layers add-layer ${WORKING_DIR}/meta-openembedded/meta-python/
84+ bitbake-layers add-layer ${WORKING_DIR}/meta-tensorflow-lite/meta-tensorflow-lite/
85+ bitbake-layers add-layer ${WORKING_DIR}/meta-intel/
86+ cat <<EOF> conf/auto.conf
87+ BB_NUMBER_THREADS = "8"
88+ EOF
89+ cat conf/auto.conf
90+ MACHINE=${{matrix.target_machine}} bitbake python3-tensorflow-lite libtensorflow-lite \
91+ libtensorflow-lite-c python3-tensorflow-lite-example tensorflow-lite-label-image \
92+ tensorflow-lite-minimal tensorflow-lite-benchmark libedgetpu-std
93+ df -h
94+ working-directory : /mnt
95+
96+ # Remove all files that hasn't been access in 10 days
97+ - name : Clean SState Cache
98+ run : |
99+ find ${SSTATE_DIR} -type f -mtime +10 -delete
100+ - name : Save cache
101+ uses : actions/cache/save@v4
102+ if : always()
103+ with :
104+ path : |
105+ ${{ env.DOWNLOAD_DIR }}
106+ ${{ env.SSTATE_DIR }}
107+ key : ${{ steps.ccache-restore.outputs.cache-primary-key }}
0 commit comments