Skip to content

Commit

Permalink
[kirkstone] Update workflows.
Browse files Browse the repository at this point in the history
  • Loading branch information
NobuoTsukamoto committed Apr 8, 2024
1 parent da53462 commit 33548f5
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 31 deletions.
24 changes: 9 additions & 15 deletions .github/workflows/build_riscv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,41 +39,35 @@ jobs:
- name: Install Pakages
run: |
sudo apt-get update
sudo apt-get -y install gawk wget git-core diffstat unzip texinfo gcc-multilib build-essential chrpath socat cpio python3 python3-pip python3-pexpect xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev pylint3 xterm zstd liblz4-tool
sudo apt-get -y install gawk wget git-core diffstat unzip texinfo gcc-multilib \
build-essential chrpath socat cpio python3 python3-pip python3-pexpect xz-utils \
debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev \
pylint xterm zstd liblz4-tool
sudo apt-get clean
sudo apt-get autoclean -y
# Check space before cleanup
- name: Check space before cleanup
run: |
df -h
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
df -h
# checkout repository
- name: Clone repository
run: |
sudo chown runner /mnt
git clone -b ${TARGET_VERSION} https://github.com/riscv/meta-riscv.git
git clone -b ${TARGET_VERSION} https://github.com/openembedded/openembedded-core.git
git clone -b 2.0 https://github.com/openembedded/bitbake.git
git clone -b ${TARGET_VERSION} https://github.com/openembedded/meta-openembedded.git
working-directory: ../
working-directory: /mnt

# Run bitbake
- name: Bitbake MACHINE=${{ matrix.target_machine }}, TensorFlow-Lite Python ${{ matrix.tensorflow_version }}
run: |
source openembedded-core/oe-init-build-env build
bitbake-layers add-layer ../meta-openembedded/meta-oe
bitbake-layers add-layer ../meta-openembedded/meta-python
bitbake-layers add-layer ../meta-tensorflow-lite
bitbake-layers add-layer /home/runner/work/meta-tensorflow-lite/meta-tensorflow-lite
bitbake-layers add-layer ../meta-riscv
cat <<EOF> conf/auto.conf
PREFERRED_VERSION_python3-tensorflow-lite="${{ matrix.tensorflow_version }}"
PREFERRED_VERSION_libtensorflow-lite="${{ matrix.tensorflow_version }}"
EOF
cat conf/auto.conf
MACHINE=${{matrix.target_machine}} bitbake python3-tensorflow-lite libtensorflow-lite python3-tensorflow-lite-example tensorflow-lite-label-image tensorflow-lite-minimal tensorflow-lite-benchmark
working-directory: ../
working-directory: /mnt
26 changes: 10 additions & 16 deletions .github/workflows/build_rpi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,40 +39,34 @@ jobs:
- name: Install Pakages
run: |
sudo apt-get update
sudo apt-get -y install gawk wget git-core diffstat unzip texinfo gcc-multilib build-essential chrpath socat cpio python3 python3-pip python3-pexpect xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev pylint3 xterm
sudo apt-get -y install gawk wget git-core diffstat unzip texinfo gcc-multilib \
build-essential chrpath socat cpio python3 python3-pip python3-pexpect xz-utils \
debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev \
pylint xterm zstd liblz4-tool
sudo apt-get clean
# Check space before cleanup
- name: Check space before cleanup
run: |
df -h
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
df -h
sudo apt-get autoclean -y
# checkout repository
- name: Clone poky, meta-raspberrypi, meta-openembedded
run: |
sudo chown runner /mnt
git clone -b ${TARGET_VERSION} git://git.yoctoproject.org/poky.git
git clone -b ${TARGET_VERSION} git://git.yoctoproject.org/meta-raspberrypi
git clone -b ${TARGET_VERSION} git://git.openembedded.org/meta-openembedded
working-directory: ../
working-directory: /mnt

# Run bitbake
- name: Bitbake MACHINE=${{ matrix.target_machine }}, TensorFlow-Lite ${{ matrix.tensorflow_version }}
run: |
source poky/oe-init-build-env rpi-build
bitbake-layers add-layer ../meta-openembedded/meta-oe/
bitbake-layers add-layer ../meta-openembedded/meta-python/
bitbake-layers add-layer ../meta-tensorflow-lite/
bitbake-layers add-layer /home/runner/work/meta-tensorflow-lite/meta-tensorflow-lite
bitbake-layers add-layer ../meta-raspberrypi/
cat <<EOF> conf/auto.conf
PREFERRED_VERSION_python3-tensorflow-lite="${{ matrix.tensorflow_version }}"
PREFERRED_VERSION_libtensorflow-lite="${{ matrix.tensorflow_version }}"
EOF
cat conf/auto.conf
MACHINE=${{matrix.target_machine}} bitbake python3-tensorflow-lite libtensorflow-lite python3-tensorflow-lite-example tensorflow-lite-label-image tensorflow-lite-minimal tensorflow-lite-benchmark
working-directory: ../
working-directory: /mnt

0 comments on commit 33548f5

Please sign in to comment.