forked from strijar/x6100_gui
-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (73 loc) · 2.27 KB
/
main.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
name: Build image
on:
workflow_dispatch:
push:
# Pattern matched against refs/tags
tags:
- '*' # Push events to every tag not containing /
jobs:
build:
runs-on: ubuntu-22.04
# Use the Bash shell regardless whether the GitHub Actions runner is ubuntu-latest, macos-latest, or windows-latest
defaults:
run:
shell: bash
steps:
- name: cleanup
run: |
sudo rm -rf /usr/share/dotnet
- name: check free space
run: |
df -h
pwd
# Checkout the repository to the GitHub Actions runner
- name: Checkout GUI
uses: actions/checkout@v4
with:
submodules: true
path: x6100_gui
- name: Checkout buildroot
uses: actions/checkout@v4
with:
submodules: true
repository: gdyuldin/AetherX6100Buildroot
path: AetherX6100Buildroot
- name: Patch GUI mk
run: |
sed -i "s,https://github.com/gdyuldin/x6100_gui,${GITHUB_WORKSPACE}/x6100_gui,g" AetherX6100Buildroot/br2_external/package/x6100-gui/x6100_gui.mk
sed -i "s,^X6100_GUI_SITE_METHOD = git,X6100_GUI_SITE_METHOD = local,g" AetherX6100Buildroot/br2_external/package/x6100-gui/x6100_gui.mk
sed -i "s,^X6100_GUI_GIT_SUBMODULES,# X6100_GUI_GIT_SUBMODULES,g" AetherX6100Buildroot/br2_external/package/x6100-gui/x6100_gui.mk
- name: Cache ccache
id: cache-ccache
uses: actions/cache@v4
with:
path: ~/.buildroot-ccache
key: ${{ runner.os }}-ccache
# Configure
- name: Configure
run: |
cd AetherX6100Buildroot && bash ./br_config.sh
# Build
- name: Build
run: |
cd AetherX6100Buildroot/build
make lame mpg123
make libsndfile-dirclean
make
# Compress image
- name: Compress image
run: |
cd AetherX6100Buildroot/build/images
zip sdcard.img.zip sdcard.img
# Upload image
- name: 'Upload image'
uses: actions/upload-artifact@v4
with:
name: sdcard.img
path: AetherX6100Buildroot/build/images/sdcard.img
# Create release
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: AetherX6100Buildroot/build/images/sdcard.img.zip