mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 07:12:54 +08:00
workflow: Move ccache setting from build.yml to cibuild.sh
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
@@ -154,18 +154,15 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
run: |
|
run: |
|
||||||
echo "::add-matcher::sources/nuttx/.github/gcc.json"
|
echo "::add-matcher::sources/nuttx/.github/gcc.json"
|
||||||
export CCACHE_DIR=`pwd`/ccache
|
|
||||||
mkdir $CCACHE_DIR
|
|
||||||
export ARTIFACTDIR=`pwd`/buildartifacts
|
export ARTIFACTDIR=`pwd`/buildartifacts
|
||||||
git config --global --add safe.directory /github/workspace/sources/nuttx
|
git config --global --add safe.directory /github/workspace/sources/nuttx
|
||||||
git config --global --add safe.directory /github/workspace/sources/apps
|
git config --global --add safe.directory /github/workspace/sources/apps
|
||||||
cd sources/nuttx/tools/ci
|
cd sources/nuttx/tools/ci
|
||||||
if [ "X${{matrix.boards}}" = "Xcodechecker" ]; then
|
if [ "X${{matrix.boards}}" = "Xcodechecker" ]; then
|
||||||
./cibuild.sh -A -R -c --codechecker testlist/${{matrix.boards}}.dat
|
./cibuild.sh -c -A -R --codechecker testlist/${{matrix.boards}}.dat
|
||||||
else
|
else
|
||||||
./cibuild.sh -A -R -c testlist/${{matrix.boards}}.dat
|
./cibuild.sh -c -A -R testlist/${{matrix.boards}}.dat
|
||||||
fi
|
fi
|
||||||
ccache -s
|
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
@@ -212,12 +209,9 @@ jobs:
|
|||||||
- name: Run Builds
|
- name: Run Builds
|
||||||
run: |
|
run: |
|
||||||
echo "::add-matcher::sources/nuttx/.github/gcc.json"
|
echo "::add-matcher::sources/nuttx/.github/gcc.json"
|
||||||
export CCACHE_DIR=`pwd`/ccache
|
|
||||||
mkdir $CCACHE_DIR
|
|
||||||
export ARTIFACTDIR=`pwd`/buildartifacts
|
export ARTIFACTDIR=`pwd`/buildartifacts
|
||||||
cd sources/nuttx/tools/ci
|
cd sources/nuttx/tools/ci
|
||||||
./cibuild.sh -i -A -R -c testlist/${{matrix.boards}}.dat
|
./cibuild.sh -i -c -A -R testlist/${{matrix.boards}}.dat
|
||||||
ccache -s
|
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
|
|||||||
+5
-4
@@ -420,10 +420,7 @@ function usage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function enable_ccache {
|
function enable_ccache {
|
||||||
export USE_CCACHE=1;
|
export CCACHE_DIR="${tools}"/ccache
|
||||||
ccache -z
|
|
||||||
ccache -M 5G;
|
|
||||||
ccache -s
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function setup_links {
|
function setup_links {
|
||||||
@@ -515,6 +512,10 @@ function run_builds {
|
|||||||
for build in "${builds[@]}"; do
|
for build in "${builds[@]}"; do
|
||||||
"${nuttx}"/tools/testbuild.sh ${options} -e "-Wno-cpp -Werror" "${build}"
|
"${nuttx}"/tools/testbuild.sh ${options} -e "-Wno-cpp -Werror" "${build}"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if [ -d "${CCACHE_DIR}" ]; then
|
||||||
|
ccache -s
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ -z "$1" ]; then
|
if [ -z "$1" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user