mirror of
https://github.com/apache/nuttx.git
synced 2026-05-31 14:27:37 +08:00
tools/ci: add initial support for MSYS2
removed uname from msys2 job
This commit is contained in:
@@ -219,3 +219,71 @@ jobs:
|
|||||||
name: macos-builds
|
name: macos-builds
|
||||||
path: buildartifacts/
|
path: buildartifacts/
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
|
msys2:
|
||||||
|
needs: Fetch-Source
|
||||||
|
runs-on: windows-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
boards: [msys2]
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: msys2 {0}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: msys2/setup-msys2@v2
|
||||||
|
with:
|
||||||
|
msystem: MSYS
|
||||||
|
update: false
|
||||||
|
install: >-
|
||||||
|
base-devel
|
||||||
|
gcc
|
||||||
|
gperf
|
||||||
|
automake
|
||||||
|
autoconf
|
||||||
|
git
|
||||||
|
python3
|
||||||
|
ncurses-devel
|
||||||
|
unzip
|
||||||
|
zip
|
||||||
|
tio
|
||||||
|
zlib-devel
|
||||||
|
cmake
|
||||||
|
ninja
|
||||||
|
python-pip
|
||||||
|
vim
|
||||||
|
|
||||||
|
- name: pip3 install
|
||||||
|
run: |
|
||||||
|
pip3 install --root-user-action=ignore --no-cache-dir pyelftools cxxfilt kconfiglib
|
||||||
|
|
||||||
|
- run: git config --global core.autocrlf false
|
||||||
|
|
||||||
|
- name: Download Source Artifact
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: source-bundle
|
||||||
|
path: .
|
||||||
|
|
||||||
|
- name: Extract sources
|
||||||
|
run: tar zxf sources.tar.gz
|
||||||
|
|
||||||
|
- name: Export NuttX Repo SHA
|
||||||
|
run: echo "nuttx_sha=`git -C sources/nuttx rev-parse HEAD`" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Run Builds
|
||||||
|
run: |
|
||||||
|
echo "::add-matcher::sources/nuttx/.github/gcc.json"
|
||||||
|
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 -g -i -A -C -R testlist/${{matrix.boards}}.dat
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: msys2-builds
|
||||||
|
path: buildartifacts/
|
||||||
|
continue-on-error: true
|
||||||
|
|||||||
+35
-9
@@ -64,21 +64,35 @@ function arm-gcc-toolchain {
|
|||||||
add_path "${tools}"/gcc-arm-none-eabi/bin
|
add_path "${tools}"/gcc-arm-none-eabi/bin
|
||||||
|
|
||||||
if [ ! -f "${tools}/gcc-arm-none-eabi/bin/arm-none-eabi-gcc" ]; then
|
if [ ! -f "${tools}/gcc-arm-none-eabi/bin/arm-none-eabi-gcc" ]; then
|
||||||
local flavor
|
local archivetool
|
||||||
|
local basefile
|
||||||
case ${os} in
|
case ${os} in
|
||||||
Darwin)
|
Darwin)
|
||||||
flavor=-darwin
|
archivetool=tar
|
||||||
|
basefile=arm-gnu-toolchain-13.2.rel1-darwin-x86_64-arm-none-eabi
|
||||||
;;
|
;;
|
||||||
Linux)
|
Linux)
|
||||||
flavor=
|
archivetool=tar
|
||||||
|
basefile=arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-eabi
|
||||||
|
;;
|
||||||
|
MSYS*)
|
||||||
|
archivetool=unzip
|
||||||
|
basefile=arm-gnu-toolchain-13.2.rel1-mingw-w64-i686-arm-none-eabi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
cd "${tools}"
|
cd "${tools}"
|
||||||
wget --quiet https://developer.arm.com/-/media/Files/downloads/gnu/13.2.Rel1/binrel/arm-gnu-toolchain-13.2.Rel1${flavor}-x86_64-arm-none-eabi.tar.xz
|
if [ "$archivetool" == "tar" ]; then
|
||||||
xz -d arm-gnu-toolchain-13.2.Rel1${flavor}-x86_64-arm-none-eabi.tar.xz
|
wget --quiet https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/${basefile}.tar.xz
|
||||||
tar xf arm-gnu-toolchain-13.2.Rel1${flavor}-x86_64-arm-none-eabi.tar
|
xz -d ${basefile}.tar.xz
|
||||||
mv arm-gnu-toolchain-13.2.Rel1${flavor}-x86_64-arm-none-eabi gcc-arm-none-eabi
|
tar xf ${basefile}.tar
|
||||||
rm arm-gnu-toolchain-13.2.Rel1${flavor}-x86_64-arm-none-eabi.tar
|
mv ${basefile} gcc-arm-none-eabi
|
||||||
|
rm ${basefile}.tar
|
||||||
|
else
|
||||||
|
wget --quiet https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/${basefile}.zip
|
||||||
|
unzip -qo ${basefile}.zip
|
||||||
|
mv ${basefile} gcc-arm-none-eabi
|
||||||
|
rm ${basefile}.zip
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
command arm-none-eabi-gcc --version
|
command arm-none-eabi-gcc --version
|
||||||
@@ -177,6 +191,10 @@ function c-cache {
|
|||||||
cd ccache-3.7.7; ./configure --prefix="${tools}"/ccache; make; make install
|
cd ccache-3.7.7; ./configure --prefix="${tools}"/ccache; make; make install
|
||||||
cd "${tools}"; rm -rf ccache-3.7.7; rm ccache-3.7.7.tar.gz
|
cd "${tools}"; rm -rf ccache-3.7.7; rm ccache-3.7.7.tar.gz
|
||||||
;;
|
;;
|
||||||
|
MSYS*)
|
||||||
|
pacman -S --noconfirm --needed ccache
|
||||||
|
pacman -Q
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -590,6 +608,9 @@ case ${os} in
|
|||||||
Linux)
|
Linux)
|
||||||
install="arm-clang-toolchain arm-gcc-toolchain arm64-gcc-toolchain avr-gcc-toolchain binutils bloaty clang-tidy gen-romfs gperf kconfig-frontends mips-gcc-toolchain python-tools riscv-gcc-toolchain rust rx-gcc-toolchain sparc-gcc-toolchain xtensa-esp32-gcc-toolchain u-boot-tools util-linux wasi-sdk c-cache"
|
install="arm-clang-toolchain arm-gcc-toolchain arm64-gcc-toolchain avr-gcc-toolchain binutils bloaty clang-tidy gen-romfs gperf kconfig-frontends mips-gcc-toolchain python-tools riscv-gcc-toolchain rust rx-gcc-toolchain sparc-gcc-toolchain xtensa-esp32-gcc-toolchain u-boot-tools util-linux wasi-sdk c-cache"
|
||||||
;;
|
;;
|
||||||
|
MSYS*)
|
||||||
|
install="arm-gcc-toolchain kconfig-frontends"
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
pushd .
|
pushd .
|
||||||
@@ -598,7 +619,9 @@ esac
|
|||||||
done
|
done
|
||||||
popd
|
popd
|
||||||
|
|
||||||
setup_links
|
if [ -d "${CCACHE_DIR}" ]; then
|
||||||
|
setup_links
|
||||||
|
fi
|
||||||
echo PATH="${EXTRA_PATH}"/"${PATH}" > "${tools}"/env.sh
|
echo PATH="${EXTRA_PATH}"/"${PATH}" > "${tools}"/env.sh
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -612,6 +635,9 @@ function run_builds {
|
|||||||
Linux)
|
Linux)
|
||||||
ncpus=$(grep -c ^processor /proc/cpuinfo)
|
ncpus=$(grep -c ^processor /proc/cpuinfo)
|
||||||
;;
|
;;
|
||||||
|
MSYS*)
|
||||||
|
ncpus=$(grep -c ^processor /proc/cpuinfo)
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
options+="-j ${ncpus}"
|
options+="-j ${ncpus}"
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
# Chose a minimalistic subset of board/configs due to MSYS2 builds
|
||||||
|
# being extremely slow on GitHub
|
||||||
|
|
||||||
|
# ARM
|
||||||
|
|
||||||
|
/arm/stm32/nucleo-l152re/configs/nsh,CONFIG_ARM_TOOLCHAIN_GNU_EABI
|
||||||
|
|
||||||
|
/arm/stm32/nucleo-f4x1re/configs/f411-nsh,CONFIG_ARM_TOOLCHAIN_GNU_EABI
|
||||||
Reference in New Issue
Block a user