Skip to content

Commit bf1ab5b

Browse files
committed
Create nuttx_103_pr.yml
1 parent 7a50616 commit bf1ab5b

File tree

1 file changed

+135
-0
lines changed

1 file changed

+135
-0
lines changed

.github/workflows/nuttx_103_pr.yml

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
name: Nuttx-10.3.0 MSYS2 PR
2+
3+
permissions:
4+
## Allow publishing of GitHub Release
5+
contents: write
6+
on:
7+
workflow_dispatch:
8+
push:
9+
paths:
10+
- '.github/workflows/nuttx_103_pr.yml'
11+
12+
jobs:
13+
nuttx-msys2:
14+
runs-on: windows-latest
15+
defaults:
16+
run:
17+
shell: msys2 {0}
18+
steps:
19+
- uses: actions/checkout@v4
20+
- uses: msys2/setup-msys2@v2
21+
with:
22+
msystem: MSYS
23+
update: false
24+
install: >-
25+
base-devel
26+
gcc
27+
gperf
28+
git
29+
python3
30+
ncurses-devel
31+
unzip
32+
zip
33+
tio
34+
zlib-devel
35+
cmake
36+
ninja
37+
python-pip
38+
vim
39+
curl
40+
41+
- name: pip3 install
42+
run: |
43+
echo 'pip3 install'
44+
uname
45+
pip3 install --root-user-action=ignore --no-cache-dir pyelftools cxxfilt kconfiglib
46+
47+
- name: Install kconfig-frontends
48+
run: |
49+
echo 'Install kconfig-frontends'
50+
curl -L https://bitbucket.org/nuttx/tools/get/master.tar.gz -o nuttx-tools.tar.gz
51+
mkdir nuttx-tools
52+
tar xvzf nuttx-tools.tar.gz --strip-components=1 -C nuttx-tools
53+
cd nuttx-tools/kconfig-frontends
54+
./configure --prefix=/opt/nuttxenv/usr --enable-mconf --disable-gconf --disable-qconf --disable-shared --disable-nconf
55+
make install
56+
57+
- name: Install genromfs
58+
run: |
59+
echo 'Install genromfs'
60+
cd nuttx-tools
61+
tar xzf genromfs-0.5.2.tar.gz
62+
cd genromfs-0.5.2
63+
make install PREFIX=/opt/nuttxenv
64+
65+
- name: Copy NXTOOL GENROMFS and clean source files
66+
run: |
67+
echo 'Copy NXTOOL GENROMFS and clean source files'
68+
cp /opt/nuttxenv/usr/bin/kconfig-conf.exe /usr/bin
69+
cp /opt/nuttxenv/usr/bin/kconfig-mconf.exe /usr/bin
70+
cp /opt/nuttxenv/usr/bin/kconfig-tweak /usr/bin
71+
cp /opt/nuttxenv/usr/bin/genromfs.exe /usr/bin
72+
rm -rf nuttx-tools genromfs-0.5.2
73+
ls -a
74+
75+
- name: Checkout Source Files
76+
run: |
77+
echo 'Checkout Source Files'
78+
mkdir nuttxspace
79+
ls -a
80+
cd nuttxspace
81+
# curl -L https://www.apache.org/dyn/closer.lua/incubator/nuttx/10.3.0/apache-nuttx-10.3.0-incubating.tar.gz?action=download -o nuttx.tar.gz
82+
# curl -L https://www.apache.org/dyn/closer.lua/incubator/nuttx/10.3.0/apache-nuttx-apps-10.3.0-incubating.tar.gz?action=download -o apps.tar.gz
83+
# tar zxf nuttx.tar.gz --one-top-level=nuttx --strip-components 1
84+
# tar zxf apps.tar.gz --one-top-level=apps --strip-components 1
85+
git clone --depth 1 --single-branch --branch simbit18-103-8a2c480 https://github.com/simbit18/nuttx.git nuttx
86+
git clone --depth 1 --single-branch --branch nuttx-10.3.0 https://github.com/apache/nuttx-apps.git apps
87+
ls -a
88+
cd nuttx
89+
ls -a
90+
91+
- name: Build
92+
run: |
93+
echo 'Build'
94+
95+
## Move to nuttx
96+
cd nuttxspace/nuttx
97+
ls -a
98+
99+
## Show the GCC version
100+
gcc -v
101+
ls -a ../../
102+
cp -f ../../fix/1030/Config.mk tools/Config.mk
103+
cp -f ../../fix/1030/Make.defs boards/sim/sim/sim/scripts/Make.defs
104+
cp -f ../../fix/1030/defconfig boards/sim/sim/sim/configs/nsh/defconfig
105+
cp -f ../../fix/1030/up_hostmisc.c arch/sim/src/sim/up_hostmisc.c
106+
107+
## Configure the build
108+
./tools/configure.sh -g sim:sensor
109+
110+
mkdir nuttxmsys2
111+
112+
## Preserve the build config
113+
cp .config nuttxmsys2/nuttx.config
114+
make
115+
ls -a
116+
cp nuttx.exe nuttxmsys2/nuttx.exe
117+
cp System.map nuttxmsys2/System.map
118+
cp /usr/bin/msys-2.0.dll nuttxmsys2/msys-2.0.dll
119+
cp /usr/bin/msys-z.dll nuttxmsys2/msys-z.dll
120+
zip -r nuttxmsys2.zip nuttxmsys2
121+
122+
- name: Get Current Date
123+
id: date
124+
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
125+
126+
- name: Publish the GitHub Release
127+
uses: softprops/action-gh-release@v1
128+
with:
129+
tag_name: nuttx103-sim-nsh-${{ steps.date.outputs.date }}
130+
draft: false
131+
prerelease: false
132+
generate_release_notes: false
133+
files: |
134+
nuttxspace/nuttx/nuttxmsys2.zip
135+

0 commit comments

Comments
 (0)