-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
83 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
name: Visionfive2-Build-Fedora | ||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
prepare_release: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Get time | ||
id: time | ||
uses: nanzm/[email protected] | ||
with: | ||
format: 'YYYYMMDD-HHmm' | ||
- name: Create empty release | ||
id: release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
tag_name: ${{ steps.time.outputs.time }} | ||
body_path: VERSION | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
target_commitish: main | ||
draft: false | ||
outputs: | ||
release_id: ${{ steps.release.outputs.id }} | ||
build: | ||
runs-on: ubuntu-20.04 | ||
needs: prepare_release | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Clean environment | ||
env: | ||
DEBIAN_FRONTEND: noninteractive | ||
run: | | ||
set +e | ||
docker rmi `docker images -q` | ||
echo "Deleting files, please wait ..." | ||
sudo rm -rf \ | ||
/usr/share/dotnet \ | ||
/etc/mysql \ | ||
/etc/php | ||
sudo -E apt-get -y purge \ | ||
azure-cli \ | ||
ghc* \ | ||
zulu* \ | ||
hhvm \ | ||
llvm* \ | ||
firefox \ | ||
google* \ | ||
dotnet* \ | ||
powershell \ | ||
openjdk* \ | ||
mysql* \ | ||
php* | ||
sudo -E apt-get update | ||
sudo -E apt-get -y install build-essential gcc-riscv64-linux-gnu asciidoc binutils bzip2 gawk gettext git libncurses5-dev msmtp libssl-dev texinfo libglib2.0-dev | ||
sudo -E apt-get -y install patch python2.7 unzip zlib1g-dev lib32gcc-s1 libc6-dev-i386 subversion flex node-uglify git gcc-multilib p7zip p7zip-full xmlto libreadline-dev | ||
sudo -E apt-get -y install python3 python3-pip python3-pyelftools haveged lrzsz scons ecj fastjar re2c xz-utils tar binutils ccache curl wget vim nano rsync coreutils | ||
sudo -E apt-get -y install qemu-utils upx-ucl libelf-dev autoconf automake libtool autopoint antlr3 gperf wget curl swig gcc g++ | ||
sudo -E apt-get -y autoremove --purge | ||
sudo -E apt-get clean | ||
- name: Build | ||
shell: bash | ||
run: | | ||
sudo bash build_visionfive2.sh | ||
- name: Upload | ||
if: needs.prepare_release.outputs.release_id != '' | ||
uses: xresloader/upload-to-github-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
release_id: ${{ needs.prepare_release.outputs.release_id }} | ||
file: "./*.img.xz*;./firmware/*u-boot-*.bin" | ||
draft: false | ||
- name: Rollback release | ||
if: failure() && needs.prepare_release.outputs.release_id != '' | ||
uses: author/action-rollback@stable | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
release_id: ${{ needs.prepare_release.outputs.release_id }} |