Files
buildroot/.github/workflows/rootfs.yml
2023-03-12 19:56:43 +01:00

151 lines
5.2 KiB
YAML

name: Build Root Filesystem
on:
push:
pull_request:
workflow_call:
inputs:
submodule:
description: The directory of the submodule, if this workflow is being called on a submodule
required: true
type: string
jobs:
rootfs-uclibc:
runs-on: ubuntu-22.04
env:
FORCE_UNSAFE_CONFIGURE: 1
steps:
- uses: actions/checkout@v3
- if: inputs.submodule
run: git submodule update --init --depth 1 -- ${{ inputs.submodule }}
- name: Generate cache key
if: inputs.submodule
id: cache-key
run: |
cd ${{ inputs.submodule }}
echo "::set-output name=key::${{ inputs.submodule }}-$(git rev-parse --short HEAD)"
- uses: actions/cache@v3
if: inputs.submodule
with:
path: ${{ inputs.submodule || '.' }}/output/images/rootfs.tar.xz
key: ${{ steps.cache-key.outputs.key }}
id: cache
- name: build
if: steps.cache.outputs.cache-hit != 'true'
run: |
cd ${{ inputs.submodule || '.' }}
apt update && apt install -y wget unzip build-essential git bc swig libncurses-dev libpython3-dev libssl-dev cpio rsync subversion
make miyoo_uclibc_defconfig
make
cd /opt
tar cf sdk.tar miyoo
- uses: actions/upload-artifact@v2
with:
name: rootfs (uClibc)
path: ${{ inputs.submodule || '.' }}/output/images/rootfs.tar.xz
if-no-files-found: error # 'error', 'warn', 'ignore'; defaults to `warn`
- uses: actions/upload-artifact@v2
with:
name: suniv-f1c500s-miyoo-4bit.dtb (uClibc)
path: ${{ inputs.submodule || '.' }}/output/images/suniv-f1c500s-miyoo-4bit.dtb
if-no-files-found: error # 'error', 'warn', 'ignore'; defaults to `warn`
- uses: actions/upload-artifact@v2
with:
name: suniv-f1c500s-miyoo.dtb (uClibc)
path: ${{ inputs.submodule || '.' }}/output/images/suniv-f1c500s-miyoo.dtb
if-no-files-found: error # 'error', 'warn', 'ignore'; defaults to `warn`
- uses: actions/upload-artifact@v2
with:
name: u-boot-sunxi-with-spl.bin (uClibc)
path: ${{ inputs.submodule || '.' }}/output/images/u-boot-sunxi-with-spl.bin
if-no-files-found: error # 'error', 'warn', 'ignore'; defaults to `warn`
- uses: actions/upload-artifact@v2
with:
name: zImage (uClibc)
path: ${{ inputs.submodule || '.' }}/output/images/zImage
if-no-files-found: error # 'error', 'warn', 'ignore'; defaults to `warn`
- uses: actions/upload-artifact@v2
with:
name: SDK (uClibc)
path: /opt/sdk.tar
if-no-files-found: error # 'error', 'warn', 'ignore'; defaults to `warn`
rootfs-musl:
runs-on: ubuntu-22.04
env:
FORCE_UNSAFE_CONFIGURE: 1
steps:
- uses: actions/checkout@v3
- if: inputs.submodule
run: git submodule update --init --depth 1 -- ${{ inputs.submodule }}
- name: Generate cache key
if: inputs.submodule
id: cache-key
run: |
cd ${{ inputs.submodule }}
echo "::set-output name=key::${{ inputs.submodule }}-$(git rev-parse --short HEAD)"
- uses: actions/cache@v3
if: inputs.submodule
with:
path: ${{ inputs.submodule || '.' }}/output/images/rootfs.tar.xz
key: ${{ steps.cache-key.outputs.key }}
id: cache
- name: build
if: steps.cache.outputs.cache-hit != 'true'
run: |
cd ${{ inputs.submodule || '.' }}
apt update && apt install -y wget unzip build-essential git bc swig libncurses-dev libpython3-dev libssl-dev cpio rsync subversion
make miyoo_defconfig
make
cd /opt
tar cf sdk.tar miyoo
- uses: actions/upload-artifact@v2
with:
name: rootfs (musl)
path: ${{ inputs.submodule || '.' }}/output/images/rootfs.tar.xz
if-no-files-found: error # 'error', 'warn', 'ignore'; defaults to `warn`
- uses: actions/upload-artifact@v2
with:
name: suniv-f1c500s-miyoo-4bit.dtb (musl)
path: ${{ inputs.submodule || '.' }}/output/images/suniv-f1c500s-miyoo-4bit.dtb
if-no-files-found: error # 'error', 'warn', 'ignore'; defaults to `warn`
- uses: actions/upload-artifact@v2
with:
name: suniv-f1c500s-miyoo.dtb (musl)
path: ${{ inputs.submodule || '.' }}/output/images/suniv-f1c500s-miyoo.dtb
if-no-files-found: error # 'error', 'warn', 'ignore'; defaults to `warn`
- uses: actions/upload-artifact@v2
with:
name: u-boot-sunxi-with-spl.bin (musl)
path: ${{ inputs.submodule || '.' }}/output/images/u-boot-sunxi-with-spl.bin
if-no-files-found: error # 'error', 'warn', 'ignore'; defaults to `warn`
- uses: actions/upload-artifact@v2
with:
name: zImage (musl)
path: ${{ inputs.submodule || '.' }}/output/images/zImage
if-no-files-found: error # 'error', 'warn', 'ignore'; defaults to `warn`
- uses: actions/upload-artifact@v2
with:
name: SDK (musl)
path: /opt/sdk.tar
if-no-files-found: error # 'error', 'warn', 'ignore'; defaults to `warn`