This repository has been archived by the owner on Feb 14, 2024. It is now read-only.
Build ffdon firmware #72
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: Build ffdon firmware | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
- v* | |
pull_request: | |
paths-ignore: | |
- "**.md" | |
- "**/CODEOWNERS" | |
- ".github/ISSUE_TEMPLATE" | |
- ".github/*.yml" | |
- "contrib/sign.sh" | |
env: | |
gluon_ref: "v2020.2.3" | |
jobs: | |
build_firmware: | |
strategy: | |
fail-fast: false | |
matrix: | |
target: [ "ar71xx-generic", "ar71xx-nand", "ar71xx-tiny", "mpc85xx-generic", "ramips-mt7621", "x86-64", "x86-generic", "x86-geode" ] | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Maximize build space | |
run: | | |
sudo rm -rf /usr/share/dotnet | |
sudo rm -rf /usr/local/lib/android | |
sudo rm -rf /opt/ghc | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Install build dependencies | |
run: | | |
sudo -E ./scripts/install_build_dependencies.sh | |
- name: build target ${{ matrix.target }} | |
id: compile | |
run: | | |
# Build images | |
./scripts/build.sh ${{ matrix.target }} ${{ env.gluon_ref }} | |
- name: print output files | |
run: | | |
ls -AlR output/ || true | |
- name: Upload firmware ${{ matrix.target }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.target }}_output | |
path: ./output/ | |
create_release: | |
runs-on: ubuntu-latest | |
needs: | |
- build_firmware | |
# Only build for tags starting with a "v" | |
if: startsWith(github.ref, 'refs/tags/v') | |
steps: | |
- name: Maximize build space | |
run: | | |
sudo rm -rf /usr/share/dotnet | |
sudo rm -rf /usr/local/lib/android | |
sudo rm -rf /opt/ghc | |
- name: Download all artifacts | |
uses: actions/download-artifact@v3 | |
- name: Display structure of artifacts | |
run: ls -R | |
- name: Create tar.gz files | |
run: | | |
set -x | |
for output in *_output; do | |
tar zcf "${output}.tar.gz" "${output}" | |
ls -al "${output}.tar.gz" || true | |
du -sm "${output}" || true | |
rm -r "${output}" # Clean up artifacts to save space | |
done | |
- name: Create Release & Upload Release Assets | |
uses: softprops/action-gh-release@v1 | |
with: | |
# Note: If there is no release name specified, releases created in | |
# the GitHub UI do not trigger a failure and are modified instead. | |
draft: false | |
prerelease: false | |
# Note: Release notes are only auto-generated if the release was | |
# created by the Github Action and was not created in the Github UI. | |
generate_release_notes: true | |
files: | | |
./*_output.tar.gz |