forked from MiyooCFW/sdcard
-
Notifications
You must be signed in to change notification settings - Fork 5
90 lines (87 loc) · 3.43 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: CI Build
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:
build-boot-scr:
# this job runs in the docker image because it depends on tools that aren't in the default github image
name: Build boot.scr from boot.cmd
runs-on: ubuntu-20.04
container:
image: nfriedly/miyoo-toolchain:latest
steps:
- run: echo "submodule ${{ inputs.submodule }} on ${{ github.event }}"
- uses: actions/checkout@v3
- if: inputs.submodule
run: git submodule update --init --depth 1 -- ${{ inputs.submodule }}
- name: build boot.scr
run: cd ${{ inputs.submodule || '.' }} && ./gen_boot_scr.sh
- uses: actions/upload-artifact@v3
with:
name: boot.scr
path: ${{ inputs.submodule || '.' }}/boot/boot.scr
if-no-files-found: error # 'error', 'warn', 'ignore'; defaults to `warn`
build-image:
needs: build-boot-scr
name: MiyooCFW image
runs-on: ubuntu-20.04
# losetup doesn't seem to work in the dockeer image, but we also don't
# need the toolchaiin, so just run directly on the github vm instead
#container:
# image: nfriedly/miyoo-toolchain:main
steps:
- run: echo "submodule ${{ inputs.submodule }} on ${{ github.event }}"
- uses: actions/checkout@v3
- if: inputs.submodule
run: git submodule update --init --depth 1 -- ${{ inputs.submodule }}
# the download action chokes if the file already exists
# see https://github.com/actions/download-artifact/issues/138
- name: remove old boot.scr
run: rm ${{ inputs.submodule || '.' }}/boot/boot.scr
# grab boot.scr from the previous job
- uses: actions/download-artifact@master
with:
name: boot.scr
path: ${{ inputs.submodule || '.' }}/boot
- name: build image
run: cd ${{ inputs.submodule || '.' }} && sudo ./generate_image_file.sh
- uses: actions/upload-artifact@v3
with:
name: MiyooCFW SD image
path: ${{ inputs.submodule || '.' }}/cfw-*.img
if-no-files-found: error # 'error', 'warn', 'ignore'; defaults to `warn`
build-image-MINIMUM:
needs: build-boot-scr
name: MiyooCFW minimal image
runs-on: ubuntu-20.04
# losetup doesn't seem to work in the dockeer image, but we also don't
# need the toolchaiin, so just run directly on the github vm instead
#container:
# image: nfriedly/miyoo-toolchain:main
steps:
- run: echo "submodule ${{ inputs.submodule }} on ${{ github.event }}"
- uses: actions/checkout@v3
- if: inputs.submodule
run: git submodule update --init --depth 1 -- ${{ inputs.submodule }}
# the download action chokes if the file already exists
# see https://github.com/actions/download-artifact/issues/138
- name: remove old boot.scr
run: rm ${{ inputs.submodule || '.' }}/boot/boot.scr
# grab boot.scr from the previous job
- uses: actions/download-artifact@master
with:
name: boot.scr
path: ${{ inputs.submodule || '.' }}/boot
- name: build image
run: cd ${{ inputs.submodule || '.' }} && sudo ./generate_image_file.sh MINIMUM
- uses: actions/upload-artifact@v3
with:
name: MiyooCFW minimal SD image
path: ${{ inputs.submodule || '.' }}/cfw-*.img
if-no-files-found: error # 'error', 'warn', 'ignore'; defaults to `warn`