-
Notifications
You must be signed in to change notification settings - Fork 0
188 lines (163 loc) · 5.22 KB
/
Alpine_Nucleo_L152re_nsh.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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
## Build Mainline NuttX every day for Alpine Action Nucleo-L152re:nsh
name: Daily Build of NuttX for Alpine Nucleo-L152re:nsh
permissions:
## Allow publishing of GitHub Release
contents: write
on:
## Run every day at 0:30 UTC
schedule:
- cron: '30 0 * * *'
workflow_dispatch:
push:
paths:
- '.github/workflows/Alpine_Nucleo_L152re_nsh.yml'
jobs:
# Label of the container job
nucleo-l152re-nsh-job:
# Containers must run in Linux based operating systems
runs-on: ubuntu-latest
# Docker Hub image that `container-job` executes in
container: alpine:latest
steps:
- name: Install Build Tools
run: |
apk --no-cache add \
bash \
coreutils \
findutils \
gawk \
git
- name: Install and Upgrade Base Packages
run: |
apk --no-cache --update add \
bison \
flex \
gettext \
texinfo \
gperf \
automake \
libtool \
binutils-dev \
picocom \
u-boot-tools \
util-linux \
patch \
autoconf \
build-base \
bash \
bash-completion \
shadow \
git \
curl \
rsync \
nano \
tar \
gzip \
bzip2 \
xz \
zip
- name: Install and Upgrade ARM Compiler Packages
run : |
apk --no-cache --update add \
gcc-arm-none-eabi \
newlib-arm-none-eabi \
g++-arm-none-eabi
- name: Install and Upgrade Packages for Nuttx
run: |
apk --no-cache --update add \
bsd-compat-headers \
zlib-dev \
ncurses-dev \
linux-headers \
libx11-dev \
libxft-dev \
libxext-dev \
libusb-dev
- name: Install Development Tools Packages
run: |
apk --no-cache --update add \
cmake \
xxd \
python3 \
py3-pip
## WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager.
## It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
## ignore warning message
## Container -> ENV PIP_ROOT_USER_ACTION=ignore
## Action -> pip install --root-user-action=ignore
## WARNING: The directory '/github/home/.cache/pip' or its parent directory is not owned or is not writable by the current user.
## The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag.
## Container -> ENV PIP_NO_CACHE_DIR=false
## Action -> pip3 install --no-cache-dir
- name: Install Python 3 option
run: |
pip3 install --break-system-packages --user --root-user-action=ignore --no-cache-dir \
pyelftools \
cxxfilt
- name: Install kconfig-frontends
run: |
cd /tmp \
&& git clone https://bitbucket.org/nuttx/tools.git \
&& cd tools \
&& cd kconfig-frontends \
&& ./configure --enable-mconf --disable-nconf --disable-gconf --disable-qconf \
&& ln -s /usr/bin/aclocal /usr/local/bin/aclocal-1.15 \
&& ln -s /usr/bin/automake /usr/local/bin/automake-1.15 \
&& make \
&& make install \
&& cd /
- name: Install genromfs
run: |
cd /tmp \
&& git clone https://github.com/chexum/genromfs.git \
&& cd genromfs \
&& make \
&& make install \
&& cd /
- name: Checkout Source Files
run: |
mkdir nuttxspace
cd nuttxspace
git clone --depth 1 https://github.com/apache/incubator-nuttx nuttx
git clone --depth 1 https://github.com/apache/incubator-nuttx-apps apps
## git clone --single-branch --branch simbit18-alpine https://github.com/simbit18/nuttx.git nuttx
## git clone --single-branch --branch simbit18-alpine https://github.com/simbit18/nuttx-apps.git apps
- name: Build
run: |
## Move to nuttx
cd nuttxspace/nuttx
ls
## Show the GCC version
arm-none-eabi-gcc --version
arm-none-eabi-c++ --version
## Configure the build
tools/configure.sh -l nucleo-l152re:nsh
## Preserve the build config
cp .config nuttx.config
## Run the build
make
## Show the size
arm-none-eabi-size nuttx
## Dump the disassembly to nuttx.S
arm-none-eabi-objdump \
-t -S --demangle --line-numbers --wide \
nuttx \
>nuttx.S \
2>&1
- name: Get Current Date
id: date
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
- name: Publish the GitHub Release
uses: softprops/action-gh-release@v1
with:
tag_name: alpine-nucleo-L152re-nsh-${{ steps.date.outputs.date }}
draft: false
prerelease: false
generate_release_notes: false
files: |
nuttxspace/nuttx/nuttx
nuttxspace/nuttx/nuttx.bin
nuttxspace/nuttx/nuttx.S
nuttxspace/nuttx/nuttx.hex
nuttxspace/nuttx/nuttx.config
nuttxspace/nuttx/nuttx.manifest