Update generate image rules. #2
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
name: CanMV K230 Build for Release | |
on: | |
push: | |
tags: [ "v*" ] | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
permissions: | |
contents: write | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- name: Setup SSH | |
run: | | |
# configure git | |
git config --global user.name kendryte747 | |
git config --global user.email kendryte747@gmail.com | |
# update ssh key | |
mkdir -p ~/.ssh | |
echo "${{ secrets.ACTIONS_PRIVATE_KEY }}" > ~/.ssh/id_rsa | |
chmod 600 ~/.ssh/id_rsa | |
- name: Install repo | |
run: | | |
# install repo | |
mkdir -p ~/.bin/ | |
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/.bin/repo | |
chmod +x ~/.bin/repo | |
- name: Prepare code | |
run: | | |
rm -rf * | |
ls -alh | |
~/.bin/repo init -u git@github.com:canmv-k230/manifest.git | |
~/.bin/repo sync | |
# - name: Tag Subprojects | |
# run: | | |
# ./.github/tag_subproject.sh ${{ github.ref_name }} | |
- name: Prepare Environment | |
run: | | |
sudo apt update | |
sudo apt install -y bison flex gcc libncurses5-dev pkg-config \ | |
libconfuse-dev libssl-dev python3 python3-pip python-is-python3 \ | |
cmake libyaml-dev scons mtools bzip2 | |
pip3 install pycryptodome gmssl | |
- name: Download toolchains | |
run: | | |
make dl_toolchain | |
- name: Build Projects | |
run: | | |
projects=("k230_canmv_01studio_defconfig" "k230_canmv_defconfig" "k230_canmv_lckfb_defconfig" "k230_canmv_v3p0_defconfig" "k230d_canmv_bpi_zero_defconfig") | |
echo "Config list is ${projects}" | |
for proj in ${projects[@]};do | |
echo "-------------------" | |
echo "build project ${proj}" | |
echo "-------------------" | |
make ${proj} | |
time make log | |
echo "-------------------" | |
done | |
- name: Upload images to Release Asset | |
uses: softprops/action-gh-release@v2 | |
with: | |
tag_name: ${{ github.ref_name }} | |
files: | | |
output/**/*.img.gz | |
output/**/*.img.md5 | |
generate_release_notes: true |