Skip to content

Commit 4f5d25e

Browse files
trns1997xiaoxiang781216
authored andcommitted
ci: Sync build.yml workflow with NuttX repository.
Update the workflow in nuttx-apps to match the corresponding workflow in the main NuttX repository, ensuring consistency across both CI configurations. This synchronization follows the guidance from: https://lupyuen.org/articles/ci3\#sync-to-nuttx-apps * Aligns CI triggers, job structure, and naming conventions. * Maintains consistency between NuttX and nuttx-apps CI setups. Signed-off-by: trns1997 <trns1997@gmail.com>
1 parent 847f862 commit 4f5d25e

File tree

1 file changed

+47
-2
lines changed

1 file changed

+47
-2
lines changed

.github/workflows/build.yml

Lines changed: 47 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,51 @@ jobs:
190190
path: buildartifacts/
191191
continue-on-error: true
192192

193+
# Test the out-of-tree build
194+
OOT-Build:
195+
needs: Linux
196+
runs-on: ubuntu-latest
197+
env:
198+
DOCKER_BUILDKIT: 1
199+
steps:
200+
- name: Download Source Artifact
201+
uses: actions/download-artifact@v5
202+
with:
203+
name: source-bundle
204+
path: .
205+
206+
- name: Extract sources
207+
run: tar zxf sources.tar.gz
208+
209+
- name: Docker Login
210+
uses: docker/login-action@v3
211+
with:
212+
registry: ghcr.io
213+
username: ${{ github.actor }}
214+
password: ${{ secrets.GITHUB_TOKEN }}
215+
216+
- name: Export NuttX Repo SHA
217+
run: echo "nuttx_sha=`git -C sources/nuttx rev-parse HEAD`" >> $GITHUB_ENV
218+
219+
- name: Run Out-of-Tree Build Test
220+
uses: ./sources/nuttx/.github/actions/ci-container
221+
env:
222+
BLOBDIR: /tools/blobs
223+
with:
224+
run: |
225+
echo "::add-matcher::sources/nuttx/.github/gcc.json"
226+
git config --global --add safe.directory /github/workspace/sources/nuttx
227+
git config --global --add safe.directory /github/workspace/sources/apps
228+
cd sources/nuttx
229+
./tools/ci/cibuild-oot.sh
230+
231+
- uses: actions/upload-artifact@v4
232+
if: ${{ always() }}
233+
with:
234+
name: oot-build-artifacts
235+
path: sources/apps/testing/cxx-oot-build
236+
continue-on-error: true
237+
193238
# Select the macOS Builds based on PR Arch Label
194239
macOS-Arch:
195240
uses: apache/nuttx-apps/.github/workflows/arch.yml@master
@@ -295,7 +340,7 @@ jobs:
295340
zlib-devel
296341
cmake
297342
ninja
298-
python-pip
343+
python-pip
299344
vim
300345
301346
- name: pip3 install
@@ -382,4 +427,4 @@ jobs:
382427
with:
383428
name: msvc-builds
384429
path: ./sources/buildartifacts/
385-
continue-on-error: true
430+
continue-on-error: true

0 commit comments

Comments
 (0)