Skip to content

Update defconfig_pr.yml #68

Update defconfig_pr.yml

Update defconfig_pr.yml #68

Workflow file for this run

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
name: Build docker make and cmake PR
on:
workflow_dispatch:
push:
paths:
- '.github/workflows/defconfig_pr.yml'
env:
# REPO_NUTTX_NAME: trns1997/nuttx
# REPO_NUTTX_NAME: Barto22/nuttx
REPO_NUTTX_NAME: arjav1528/nuttx
REF_NUTTX_NAME: dev-issue-16695
# REPO_NUTTX_NAME: wangchdo/nuttx
# REF_NUTTX_NAME: fix_clock_init
# REF_NUTTX_NAME: add-missing-libcxxtoolchain-support
# REF_NUTTX_NAME: feature/fix-protected-build
# REPO_NUTTX_NAME: apache/nuttx
# REF_NUTTX_NAME: simbit18-rp2040
REPO_APPS_NAME: apache/nuttx-apps
REF_APPS_NAME: master
BOARD_CONFIG_NAME: stm32h745i-disco:nsh
#BOARD_CONFIG_NAME: sim:nsh
# BOARD_CONFIG_NAME: pimoroni-pico-2-plus:audiopack
# BOARD_CONFIG_NAME: xmc4800-relax:nsh
# BOARD_CONFIG_NAME: nucleo-f302r8:ihm07m1_b16
# COMMIT_HASH: 898b6a9bb9ea6fef0a3746b1c9f3d3d6143fdb5e
permissions:
contents: read
concurrency:
group: build-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
Fetch-Source:
runs-on: ubuntu-latest
steps:
- name: Determine Target Branches
id: gittargets
shell: bash
run: |
OS_REF=""
APPS_REF=""
REF="refs/heads/master"
echo "Working with ref: $REF"
- name: Checkout nuttx repo
uses: actions/checkout@v6
with:
repository: ${{ env.REPO_NUTTX_NAME }}
ref: ${{ env.REF_NUTTX_NAME }}
path: sources/nuttx
fetch-depth: 1
- name: Checkout nuttx repo tags
run: git -C sources/nuttx fetch --tags
- name: Checkout apps repo
uses: actions/checkout@v6
with:
repository: ${{ env.REPO_APPS_NAME }}
ref: ${{ env.REF_APPS_NAME }}
path: sources/apps
fetch-depth: 1
- name: Tar sources
run: tar zcf sources.tar.gz sources
- name: Archive Source Bundle
uses: actions/upload-artifact@v6
with:
name: source-bundle
path: sources.tar.gz
LinuxMake:
needs: Fetch-Source
runs-on: ubuntu-latest
env:
DOCKER_BUILDKIT: 1
GH_JOB_NAME: ${{ github.job }}
steps:
- name: Download Source Artifact
uses: actions/download-artifact@v7
with:
name: source-bundle
path: .
- name: Extract sources
run: tar zxf sources.tar.gz
- name: Docker Login
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker Pull
run: docker pull ghcr.io/apache/nuttx/apache-nuttx-ci-linux
- name: Export NuttX Repo SHA
run: echo "nuttx_sha=`git -C sources/nuttx rev-parse HEAD`" >> $GITHUB_ENV
- name: Run builds
uses: ./sources/nuttx/.github/actions/ci-container
env:
BLOBDIR: /tools/blobs
with:
run: |
echo "Job: ${{ env.GH_JOB_NAME }}"
echo "::add-matcher::sources/nuttx/.github/gcc.json"
export ARTIFACTDIR=`pwd`/buildartifacts
echo "ARTIFACTDIR: $ARTIFACTDIR"
git config --global --add safe.directory /github/workspace/sources/nuttx
git config --global --add safe.directory /github/workspace/sources/apps
cd sources/nuttx
# commit hash
# git checkout ${{ env.COMMIT_HASH }}
./tools/configure.sh -l ${{ env.BOARD_CONFIG_NAME }}
# make -j
make V=1
artifactconfigdir=$ARTIFACTDIR/$(echo ${{ env.BOARD_CONFIG_NAME }} | sed "s/:/\//")/
echo "artifactconfigdir: $artifactconfigdir"
mkdir -p $artifactconfigdir
xargs -I "{}" cp "{}" $artifactconfigdir < nuttx.manifest
- uses: actions/upload-artifact@v6
if: ${{ always() }}
with:
name: linux-${{ github.job }}-builds
path: buildartifacts/
continue-on-error: true
LinuxCMake:
needs: Fetch-Source
runs-on: ubuntu-latest
env:
DOCKER_BUILDKIT: 1
GH_JOB_NAME: ${{ github.job }}
steps:
- name: Download Source Artifact
uses: actions/download-artifact@v7
with:
name: source-bundle
path: .
- name: Extract sources
run: tar zxf sources.tar.gz
- name: Docker Login
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker Pull
run: docker pull ghcr.io/apache/nuttx/apache-nuttx-ci-linux
- name: Export NuttX Repo SHA
run: echo "nuttx_sha=`git -C sources/nuttx rev-parse HEAD`" >> $GITHUB_ENV
- name: Run builds
uses: ./sources/nuttx/.github/actions/ci-container
env:
BLOBDIR: /tools/blobs
with:
run: |
echo "Job: ${{ env.GH_JOB_NAME }}"
echo "Job2: ${{ github.job }}"
echo "::add-matcher::sources/nuttx/.github/gcc.json"
export ARTIFACTDIR=`pwd`/buildartifacts
sourceworkspace=/github/workspace/sources
git config --global --add safe.directory /github/workspace/sources/nuttx
git config --global --add safe.directory /github/workspace/sources/apps
cd sources/nuttx
# cmake -B build -DBOARD_CONFIG=at32f437-mini:systemview -GNinja
# cmake -B build -DBOARD_CONFIG=thingy91/nsh_rtt -GNinja
cmake -B build -DBOARD_CONFIG=${{ env.BOARD_CONFIG_NAME }} -GNinja
cmake --build build
artifactconfigdir=$ARTIFACTDIR/$(echo ${{ env.BOARD_CONFIG_NAME }} | sed "s/:/\//")/
echo "artifactconfigdir: $artifactconfigdir"
mkdir -p $artifactconfigdir
cd build
xargs -I "{}" cp "{}" $artifactconfigdir < $sourceworkspace/nuttx/build/nuttx.manifest
- uses: actions/upload-artifact@v6
if: ${{ always() }}
with:
name: linux-${{ github.job }}-builds
path: buildartifacts/
continue-on-error: true