pulled in workflow files from master
This commit is contained in:
parent
206b3668e4
commit
b26c3754c5
4 changed files with 107 additions and 40 deletions
45
.github/workflows/build.yml
vendored
45
.github/workflows/build.yml
vendored
|
|
@ -14,7 +14,12 @@ on:
|
|||
|
||||
jobs:
|
||||
micropython:
|
||||
runs-on: ubuntu-16.04
|
||||
strategy:
|
||||
matrix:
|
||||
os:
|
||||
- ubuntu-16.04
|
||||
- macos-10.14
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Dump GitHub context
|
||||
env:
|
||||
|
|
@ -38,30 +43,16 @@ jobs:
|
|||
repository: micropython/micropython
|
||||
path: micropython
|
||||
|
||||
- name: Checkout micropython submodules
|
||||
run: (cd micropython && git submodule update --init)
|
||||
|
||||
- name: Build mpy-cross
|
||||
run: make -C micropython/mpy-cross -j2
|
||||
|
||||
- name: Build micropython unix port
|
||||
run: |
|
||||
make -C micropython/ports/unix -j2 deplibs
|
||||
make -C micropython/ports/unix -j2 USER_C_MODULES=$(readlink -f .)
|
||||
|
||||
- name: Run tests
|
||||
run: env MICROPYTHON_CPYTHON3=python3.5 MICROPY_MICROPYTHON=micropython/ports/unix/micropython micropython/tests/run-tests -d tests
|
||||
- name: Print failure info
|
||||
run: |
|
||||
for exp in *.exp;
|
||||
do testbase=$(basename $exp .exp);
|
||||
echo -e "\nFAILURE $testbase";
|
||||
diff -u $testbase.exp $testbase.out;
|
||||
done
|
||||
if: failure()
|
||||
- name: Run build.sh
|
||||
run: ./build.sh
|
||||
|
||||
circuitpython:
|
||||
runs-on: ubuntu-16.04
|
||||
strategy:
|
||||
matrix:
|
||||
os:
|
||||
- ubuntu-16.04
|
||||
- macos-10.14
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Dump GitHub context
|
||||
env:
|
||||
|
|
@ -82,8 +73,12 @@ jobs:
|
|||
|
||||
- name: Install requirements
|
||||
run: |
|
||||
sudo apt install librsvg2-bin gettext
|
||||
pip install "Sphinx<4" sphinx-rtd-theme recommonmark sphinx-autoapi sphinxcontrib-svg2pdfconverter astroid isort polib black
|
||||
if type -path apt-get; then
|
||||
sudo apt-get install gettext
|
||||
else
|
||||
brew install gettext
|
||||
echo >>$GITHUB_PATH /usr/local/opt/gettext/bin
|
||||
fi
|
||||
|
||||
- name: Run build-cp.sh
|
||||
run: ./build-cp.sh
|
||||
|
|
|
|||
49
build-cp.sh
49
build-cp.sh
|
|
@ -1,12 +1,49 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
nproc=$(python -c 'import multiprocessing; print(multiprocessing.cpu_count())')
|
||||
HERE="$(dirname -- "$(readlink -f -- "${0}")" )"
|
||||
[ -e circuitpython/py/py.mk ] || (git clone --depth 100 --branch 6.0.x https://github.com/adafruit/circuitpython && cd circuitpython && git submodule update --init)
|
||||
# POSIX compliant version
|
||||
readlinkf_posix() {
|
||||
[ "${1:-}" ] || return 1
|
||||
max_symlinks=40
|
||||
CDPATH='' # to avoid changing to an unexpected directory
|
||||
|
||||
target=$1
|
||||
[ -e "${target%/}" ] || target=${1%"${1##*[!/]}"} # trim trailing slashes
|
||||
[ -d "${target:-/}" ] && target="$target/"
|
||||
|
||||
cd -P . 2>/dev/null || return 1
|
||||
while [ "$max_symlinks" -ge 0 ] && max_symlinks=$((max_symlinks - 1)); do
|
||||
if [ ! "$target" = "${target%/*}" ]; then
|
||||
case $target in
|
||||
/*) cd -P "${target%/*}/" 2>/dev/null || break ;;
|
||||
*) cd -P "./${target%/*}" 2>/dev/null || break ;;
|
||||
esac
|
||||
target=${target##*/}
|
||||
fi
|
||||
|
||||
if [ ! -L "$target" ]; then
|
||||
target="${PWD%/}${target:+/}${target}"
|
||||
printf '%s\n' "${target:-/}"
|
||||
return 0
|
||||
fi
|
||||
|
||||
# `ls -dl` format: "%s %u %s %s %u %s %s -> %s\n",
|
||||
# <file mode>, <number of links>, <owner name>, <group name>,
|
||||
# <size>, <date and time>, <pathname of link>, <contents of link>
|
||||
# https://pubs.opengroup.org/onlinepubs/9699919799/utilities/ls.html
|
||||
link=$(ls -dl -- "$target" 2>/dev/null) || break
|
||||
target=${link#*" $target -> "}
|
||||
done
|
||||
return 1
|
||||
}
|
||||
NPROC=$(python -c 'import multiprocessing; print(multiprocessing.cpu_count())')
|
||||
HERE="$(dirname -- "$(readlinkf_posix -- "${0}")" )"
|
||||
[ -e circuitpython/py/py.mk ] || (git clone --no-recurse-submodules --depth 100 --branch 6.0.x https://github.com/adafruit/circuitpython && cd circuitpython && git submodule update --init lib/uzlib tools)
|
||||
rm -rf circuitpython/extmod/ulab; ln -s "$HERE" circuitpython/extmod/ulab
|
||||
make -C circuitpython/mpy-cross -j$nproc
|
||||
make -C circuitpython/ports/unix -j$nproc deplibs
|
||||
make -C circuitpython/ports/unix -j$nproc
|
||||
make -C circuitpython/mpy-cross -j$NPROC
|
||||
sed -e '/MICROPY_PY_UHASHLIB/s/1/0/' < circuitpython/ports/unix/mpconfigport.h > circuitpython/ports/unix/mpconfigport_ulab.h
|
||||
# Work around circuitpython#3990
|
||||
make -C circuitpython/ports/unix -j$NPROC DEBUG=1 MICROPY_PY_FFI=0 MICROPY_PY_BTREE=0 MICROPY_SSL_AXTLS=0 MICROPY_PY_USSL=0 CFLAGS_EXTRA='-DMP_CONFIGFILE="<mpconfigport_ulab.h>" -Wno-tautological-constant-out-of-range-compare' build/genhdr/qstrdefs.generated.h
|
||||
make -k -C circuitpython/ports/unix -j$NPROC DEBUG=1 MICROPY_PY_FFI=0 MICROPY_PY_BTREE=0 MICROPY_SSL_AXTLS=0 MICROPY_PY_USSL=0 CFLAGS_EXTRA='-DMP_CONFIGFILE="<mpconfigport_ulab.h>" -Wno-tautological-constant-out-of-range-compare'
|
||||
|
||||
for dir in "circuitpy" "common"
|
||||
do
|
||||
|
|
|
|||
49
build.sh
49
build.sh
|
|
@ -1,12 +1,47 @@
|
|||
#!/bin/sh
|
||||
# POSIX compliant version
|
||||
readlinkf_posix() {
|
||||
[ "${1:-}" ] || return 1
|
||||
max_symlinks=40
|
||||
CDPATH='' # to avoid changing to an unexpected directory
|
||||
|
||||
target=$1
|
||||
[ -e "${target%/}" ] || target=${1%"${1##*[!/]}"} # trim trailing slashes
|
||||
[ -d "${target:-/}" ] && target="$target/"
|
||||
|
||||
cd -P . 2>/dev/null || return 1
|
||||
while [ "$max_symlinks" -ge 0 ] && max_symlinks=$((max_symlinks - 1)); do
|
||||
if [ ! "$target" = "${target%/*}" ]; then
|
||||
case $target in
|
||||
/*) cd -P "${target%/*}/" 2>/dev/null || break ;;
|
||||
*) cd -P "./${target%/*}" 2>/dev/null || break ;;
|
||||
esac
|
||||
target=${target##*/}
|
||||
fi
|
||||
|
||||
if [ ! -L "$target" ]; then
|
||||
target="${PWD%/}${target:+/}${target}"
|
||||
printf '%s\n' "${target:-/}"
|
||||
return 0
|
||||
fi
|
||||
|
||||
# `ls -dl` format: "%s %u %s %s %u %s %s -> %s\n",
|
||||
# <file mode>, <number of links>, <owner name>, <group name>,
|
||||
# <size>, <date and time>, <pathname of link>, <contents of link>
|
||||
# https://pubs.opengroup.org/onlinepubs/9699919799/utilities/ls.html
|
||||
link=$(ls -dl -- "$target" 2>/dev/null) || break
|
||||
target=${link#*" $target -> "}
|
||||
done
|
||||
return 1
|
||||
}
|
||||
NPROC=`python3 -c 'import multiprocessing; print(multiprocessing.cpu_count())'`
|
||||
set -e
|
||||
HERE="$(dirname -- "$(readlink -f -- "${0}")" )"
|
||||
[ -e micropython/py/py.mk ] || git clone https://github.com/micropython/micropython
|
||||
[ -e micropython/lib/libffi/autogen.sh ] || (cd micropython && git submodule update --init lib/libffi )
|
||||
#git clone https://github.com/micropython/micropython
|
||||
make -C micropython/mpy-cross -j$(nproc)
|
||||
make -C micropython/ports/unix -j$(nproc) deplibs
|
||||
make -C micropython/ports/unix -j$(nproc) USER_C_MODULES="${HERE}" DEBUG=1 STRIP=:
|
||||
HERE="$(dirname -- "$(readlinkf_posix -- "${0}")" )"
|
||||
[ -e micropython/py/py.mk ] || git clone --no-recurse-submodules https://github.com/micropython/micropython
|
||||
[ -e micropython/lib/axtls/README ] || (cd micropython && git submodule update --init lib/axtls )
|
||||
make -C micropython/mpy-cross -j${NPROC}
|
||||
make -C micropython/ports/unix -j${NPROC} axtls
|
||||
make -C micropython/ports/unix -j${NPROC} USER_C_MODULES="${HERE}" DEBUG=1 STRIP=: MICROPY_PY_FFI=0 MICROPY_PY_BTREE=0
|
||||
|
||||
|
||||
for dir in "numpy" "common"
|
||||
|
|
|
|||
|
|
@ -33,11 +33,11 @@ mp_obj_float_t ulab_const_float_e_obj = {{&mp_type_float}, MP_E};
|
|||
#endif
|
||||
|
||||
#if ULAB_NUMPY_HAS_INF
|
||||
mp_obj_float_t numpy_const_float_inf_obj = {{&mp_type_float}, INFINITY};
|
||||
mp_obj_float_t numpy_const_float_inf_obj = {{&mp_type_float}, (mp_float_t)INFINITY};
|
||||
#endif
|
||||
|
||||
#if ULAB_NUMPY_HAS_NAN
|
||||
mp_obj_float_t numpy_const_float_nan_obj = {{&mp_type_float}, NAN};
|
||||
mp_obj_float_t numpy_const_float_nan_obj = {{&mp_type_float}, (mp_float_t)NAN};
|
||||
#endif
|
||||
|
||||
#if ULAB_NUMPY_HAS_PI
|
||||
|
|
|
|||
Loading…
Reference in a new issue