build.yml: Sync with nuttx version
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
80ed2b96d3
commit
e07d8f546a
34
.github/workflows/build.yml
vendored
34
.github/workflows/build.yml
vendored
@ -103,6 +103,7 @@ jobs:
|
||||
|
||||
- name: Tar sources
|
||||
run: tar zcf sources.tar.gz sources
|
||||
|
||||
- name: Archive Source Bundle
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
@ -117,7 +118,7 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
boards: [arm-01, arm-02, arm-03, arm-04, arm-05, arm-06, arm-07, arm-08, arm-09, arm-10, arm-11, arm-12, arm-13, other, risc-v, sim-01, sim-02, xtensa]
|
||||
boards: [arm-01, arm-02, arm-03, arm-04, arm-05, arm-06, arm-07, arm-08, arm-09, arm-10, arm-11, arm-12, arm-13, other, risc-v, sim-01, sim-02, xtensa, codechecker]
|
||||
|
||||
steps:
|
||||
- name: Download Source Artifact
|
||||
@ -125,19 +126,23 @@ jobs:
|
||||
with:
|
||||
name: source-bundle
|
||||
path: .
|
||||
|
||||
- name: Extract sources
|
||||
run: tar zxf sources.tar.gz
|
||||
|
||||
- name: Docker Login
|
||||
uses: azure/docker-login@v1
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
login-server: ghcr.io
|
||||
username: ${GITHUB_ACTOR}
|
||||
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:
|
||||
@ -145,15 +150,18 @@ jobs:
|
||||
with:
|
||||
run: |
|
||||
echo "::add-matcher::sources/nuttx/.github/gcc.json"
|
||||
export CCACHE_DIR=`pwd`/ccache
|
||||
mkdir $CCACHE_DIR
|
||||
export ARTIFACTDIR=`pwd`/buildartifacts
|
||||
git config --global --add safe.directory /github/workspace/sources/nuttx
|
||||
git config --global --add safe.directory /github/workspace/sources/apps
|
||||
cd sources/nuttx/tools/ci
|
||||
./cibuild.sh -A -c testlist/${{matrix.boards}}.dat
|
||||
ccache -s
|
||||
if [ "X${{matrix.boards}}" = "Xcodechecker" ]; then
|
||||
./cibuild.sh -c -A -R --codechecker testlist/${{matrix.boards}}.dat
|
||||
else
|
||||
./cibuild.sh -c -A -R testlist/${{matrix.boards}}.dat
|
||||
fi
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
if: ${{ always() }}
|
||||
with:
|
||||
name: linux-builds
|
||||
path: buildartifacts/
|
||||
@ -173,15 +181,17 @@ jobs:
|
||||
with:
|
||||
name: source-bundle
|
||||
path: .
|
||||
|
||||
- name: Extract sources
|
||||
run: tar zxf sources.tar.gz
|
||||
|
||||
- name: Restore Tools Cache
|
||||
id: cache-tools
|
||||
uses: actions/cache@v3
|
||||
env:
|
||||
cache-name: ${{ runner.os }}-cache-tools
|
||||
with:
|
||||
path: prebuilt
|
||||
path: ./sources/tools
|
||||
key: ${{ runner.os }}-tools-${{ hashFiles('./sources/nuttx/tools/ci/cibuild.sh') }}
|
||||
|
||||
- name: Export NuttX Repo SHA
|
||||
@ -195,12 +205,10 @@ jobs:
|
||||
- name: Run Builds
|
||||
run: |
|
||||
echo "::add-matcher::sources/nuttx/.github/gcc.json"
|
||||
export CCACHE_DIR=`pwd`/ccache
|
||||
mkdir $CCACHE_DIR
|
||||
export ARTIFACTDIR=`pwd`/buildartifacts
|
||||
cd sources/nuttx/tools/ci
|
||||
./cibuild.sh -i -A -c testlist/${{matrix.boards}}.dat
|
||||
ccache -s
|
||||
./cibuild.sh -i -c -A -R testlist/${{matrix.boards}}.dat
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: macos-builds
|
||||
|
Loading…
Reference in New Issue
Block a user