Fixed toolchain build errors. #266
Workflow file for this run
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
# This is a basic workflow to help you get started with Actions | |
name: Bitbake qemuriscv | |
# Controls when the workflow will run | |
on: | |
# Triggers the workflow on push or pull request events but only for the kirkstone branch | |
push: | |
branches: [ mickledore ] | |
pull_request: | |
branches: [ mickledore ] | |
schedule: | |
- cron: '0 12 * * 5' | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
env: | |
TARGET_VERSION: mickledore | |
TARGET_BITBAKE_VERSION: 2.4 | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
bitbake-riscv: | |
strategy: | |
matrix: | |
target_machine: [qemuriscv64, qemuriscv32] | |
tensorflow_version: [2.12.1] | |
# 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 | |
- uses: actions/checkout@v2 | |
# Check space before cleanup | |
# https://zenn.dev/pinto0309/scraps/c6413eb15a1b2a | |
- name: Check space before cleanup | |
run: | | |
docker images | |
sudo rm -rf "/opt/ghc" || true | |
sudo rm -rf "/usr/share/dotnet" || true | |
sudo rm -rf "$AGENT_TOOLSDIRECTORY" || true | |
sudo rm -rf "/usr/local/lib/android" || true | |
sudo rm -rf "/usr/local/share/boost" || true | |
docker rmi $(docker image ls -q --filter "reference=node*") | |
docker rmi $(docker image ls -q --filter "reference=buildpack*") | |
docker rmi $(docker image ls -q --filter "reference=debian*") | |
docker rmi $(docker image ls -q --filter "reference=alpine*") | |
docker rmi $(docker image ls -q --filter "reference=ubuntu:18.04") | |
docker rmi $(docker image ls -q --filter "reference=ubuntu:20.04") | |
sudo apt purge \ | |
ansible \ | |
aria2 \ | |
azure-cli \ | |
bazel \ | |
cabal* \ | |
clang* \ | |
dotnet-sdk* \ | |
ghc* \ | |
google-chrome-stable \ | |
google-cloud-sdk \ | |
heroku \ | |
kubectl \ | |
mysql* \ | |
node* \ | |
npm* \ | |
php* \ | |
powershell \ | |
rpm \ | |
ruby* \ | |
subversion \ | |
yarn \ | |
-yq >/dev/null 2>&1 || true | |
sudo apt-get autoremove -y >/dev/null 2>&1 || true | |
sudo apt-get autoclean -y >/dev/null 2>&1 || true | |
df -h | |
# Install essential host packages | |
- 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 \ | |
pylint xterm zstd liblz4-tool | |
sudo apt-get clean | |
# checkout repository | |
- name: Clone repository | |
run: | | |
git clone https://github.com/riscv/meta-riscv.git | |
git clone -b ${TARGET_VERSION} https://github.com/openembedded/openembedded-core.git | |
git clone -b ${TARGET_BITBAKE_VERSION} https://github.com/openembedded/bitbake.git | |
git clone -b ${TARGET_VERSION} https://github.com/openembedded/meta-openembedded.git | |
working-directory: ../ | |
# 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 ../meta-riscv | |
cat <<EOF> conf/auto.conf | |
FORTRAN:forcevariable = ",fortran" | |
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 \ | |
libtensorflow-lite-c python3-tensorflow-lite-example tensorflow-lite-label-image \ | |
tensorflow-lite-minimal tensorflow-lite-benchmark libedgetpu-std | |
working-directory: ../ |