buildbrain/.github/workflows/build.yml

97 lines
3.0 KiB
YAML
Raw Normal View History

name: Build
on:
push:
branches: ci*
2020-11-24 04:37:15 +09:00
tags: '*'
jobs:
2020-11-08 21:01:29 +09:00
create_release:
name: Create release
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- name: Generate release name
id: release_name
2020-11-24 04:30:16 +09:00
run: echo "::set-output name=name::`date "+%Y-%m-%d-%H%M%S"`"
2020-11-08 21:01:29 +09:00
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.release_name.outputs.name }}
release_name: ${{ steps.release_name.outputs.name }}
body: |
Build ${{ steps.release_name.outputs.name }}
draft: false
prerelease: true
build:
runs-on: ubuntu-20.04
2020-11-08 21:01:29 +09:00
needs: [create_release]
strategy:
matrix:
2020-11-24 04:31:23 +09:00
include:
- model: sh1
nk: edsa1exe.bin
- model: sh2
nk: edsa2exe.bin
- model: sh3
nk: edsa3exe.bin
- model: sh4
nk: edsh4exe.bin
- model: sh5
nk: edsh5exe.bin
- model: sh6
nk: edsh6exe.bin
2020-11-24 03:39:40 +09:00
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Workaround for apt update failure
run: sudo rm /etc/apt/sources.list.d/github_git-lfs.*
- name: Install deps
run: sudo apt update && sudo apt install build-essential bison flex libncurses5-dev gcc-arm-linux-gnueabi qemu-user-static debootstrap
- name: Build nkbin-maker
run: make nkbin-maker
- name: Configure for U-Boot
2020-11-24 04:31:23 +09:00
run: make udefconfig-${{ matrix.model }}
2020-11-24 03:39:40 +09:00
- name: Build U-Boot
run: make ubuild
- name: Generate NK.bin
run: make nk.bin
- name: Configure for Linux
run: make ldefconfig
- name: Build Linux
run: make lbuild
2020-11-24 03:39:40 +09:00
# - name: Build Debian Root # Wait for buildroot
# run: |
# ./tools/aptcache_linux_amd64 \
# -rule 'local=localhost:65432, remote=ftp.us.debian.org' \
# -rule 'local=localhost:65433, remote=security.debian.org' &
# make debian
2020-11-05 11:36:50 +09:00
2020-11-24 03:39:40 +09:00
- name: Setup releases
id: release_name
run: |
mkdir release
cp ./u-boot-brain/u-boot.bin release/u-boot.bin
cp ./u-boot-brain/u-boot.sb release/u-boot.sb
2020-11-24 04:31:23 +09:00
cp ./nk.bin release/${{ matrix.nk }}
cp ./linux-brain/arch/arm/boot/dts/imx28-pw${{ matrix.model }}.dtb release/imx28-pw${{ matrix.model }}.dtb
2020-11-24 03:39:40 +09:00
cp ./linux-brain/arch/arm/boot/zImage release/zImage
zip -r release.zip release/
- name: Upload release.zip
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create_release.outputs.upload_url }}
asset_path: release.zip
2020-11-24 04:31:23 +09:00
asset_name: ${{ matrix.model }}-boot.zip
2020-11-24 03:39:40 +09:00
asset_content_type: application/zip