diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d91df7b1049af..1ee7c9a1e6766 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -43,6 +43,10 @@ jobs: run: | gcc --version python3 --version + - name: Check For setup.py + id: need-pypi + run: | + echo ::set-output name=setup-py::$( find . -wholename './setup.py' ) - name: New boards check run: python3 -u ci_new_boards_check.py working-directory: tools @@ -54,6 +58,11 @@ jobs: with: name: stubs path: circuitpython-stubs* + - name: Install pypi dependencies + if: contains(steps.need-pypi.outputs.setup-py, 'setup.py') + run: | + python -m pip install --upgrade pip + pip install setuptools wheel twine - name: Test Documentation Build (HTML) run: sphinx-build -E -W -b html -D version=${{ env.CP_VERSION }} -D release=${{ env.CP_VERSION }} . _build/html - uses: actions/upload-artifact@v2 @@ -109,6 +118,13 @@ jobs: name: mpy-cross.static-x64-windows path: mpy-cross/mpy-cross.static.exe - name: Upload stubs and mpy-cross builds to S3 + if: github.event_name == 'push' || (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested')) + env: + AWS_PAGER: '' + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + TWINE_USERNAME: ${{ secrets.pypi_username }} + TWINE_PASSWORD: ${{ secrets.pypi_password }} run: | [ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross.static-aarch64 s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross.static-aarch64-${{ env.CP_VERSION }} --no-progress --region us-east-1 [ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross.static-raspbian s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross.static-raspbian-${{ env.CP_VERSION }} --no-progress --region us-east-1 @@ -116,12 +132,29 @@ jobs: [ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross.static.exe s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross.static-x64-windows-${{ env.CP_VERSION }}.exe --no-progress --region us-east-1 zip -9r circuitpython-stubs.zip circuitpython-stubs [ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp circuitpython-stubs.zip s3://adafruit-circuit-python/bin/stubs/circuitpython-stubs-${{ env.CP_VERSION }}.zip --no-progress --region us-east-1 + if [[ -z "${{steps.need-pypi.outputs.setup-py}}" && -z "$TWINE_PASSWORD" ]]; then + python setup.py sdist + twine upload dist/* + fi + - name: Upload stable stubs to PyPi + if: github.event_name == 'release' && (github.event.action== 'published' || github.event.action == 'rerequested') env: - AWS_PAGER: '' - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - if: github.event_name == 'push' || (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested')) + TWINE_USERNAME: ${{ secrets.pypi_username }} + TWINE_PASSWORD: ${{ secrets.pypi_password }} + run: | + echo "Uploading stable release to PyPi" + python setup.py sdist + twine upload dist/* + - name: Upload dev stubs to PyPi + if: github.event_name == 'push' + env: + TWINE_USERNAME: ${{ secrets.pypi_username }} + TWINE_PASSWORD: ${{ secrets.pypi_password }} + run: | + echo "Uploading dev release to PyPi" + python setup.py sdist + twine upload dist/* mpy-cross-mac: runs-on: macos-10.15 @@ -180,400 +213,398 @@ jobs: if: github.event_name == 'push' || (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested')) - build-arm: - runs-on: ubuntu-20.04 - needs: test - strategy: - fail-fast: false - matrix: - board: - - "8086_commander" - - "ADM_B_NRF52840_1" - - "TG-Watch" - - "adafruit_feather_rp2040" - - "adafruit_itsybitsy_rp2040" - - "adafruit_macropad_rp2040" - - "adafruit_neokey_trinkey_m0" - - "adafruit_proxlight_trinkey_m0" - - "adafruit_qt2040_trinkey" - - "adafruit_qtpy_rp2040" - - "adafruit_rotary_trinkey_m0" - - "adafruit_slide_trinkey_m0" - - "aloriumtech_evo_m51" - - "aramcon2_badge" - - "aramcon_badge_2019" - - "arduino_mkr1300" - - "arduino_mkrzero" - - "arduino_nano_33_ble" - - "arduino_nano_33_iot" - - "arduino_nano_rp2040_connect" - - "arduino_zero" - - "bast_pro_mini_m0" - - "bastble" - - "bdmicro_vina_d21" - - "bdmicro_vina_d51" - - "bdmicro_vina_d51_pcb7" - - "bless_dev_board_multi_sensor" - - "blm_badge" - - "capablerobot_usbhub" - - "catwan_usbstick" - - "circuitbrains_basic_m0" - - "circuitbrains_deluxe_m4" - - "circuitplayground_bluefruit" - - "circuitplayground_express" - - "circuitplayground_express_crickit" - - "circuitplayground_express_displayio" - - "clue_nrf52840_express" - - "cp32-m4" - - "cp_sapling_m0" - - "cp_sapling_m0_revb" - - "cp_sapling_m0_spiflash" - - "cytron_maker_pi_rp2040" - - "datalore_ip_m4" - - "datum_distance" - - "datum_imu" - - "datum_light" - - "datum_weather" - - "dynalora_usb" - - "dynossat_edu_eps" - - "dynossat_edu_obc" - - "electronut_labs_blip" - - "electronut_labs_papyr" - - "escornabot_makech" - - "espruino_pico" - - "espruino_wifi" - - "feather_bluefruit_sense" - - "feather_m0_adalogger" - - "feather_m0_basic" - - "feather_m0_express" - - "feather_m0_express_crickit" - - "feather_m0_rfm69" - - "feather_m0_rfm9x" - - "feather_m0_supersized" - - "feather_m4_can" - - "feather_m4_express" - - "feather_m7_1011" - - "feather_mimxrt1011" - - "feather_mimxrt1062" - - "feather_nrf52840_express" - - "feather_stm32f405_express" - - "fluff_m0" - - "gemma_m0" - - "grandcentral_m4_express" - - "hallowing_m0_express" - - "hallowing_m4_express" - - "hiibot_bluefi" - - "huntercat_nfc" - - "ikigaisense_vita" - - "imxrt1010_evk" - - "imxrt1020_evk" - - "imxrt1060_evk" - - "itsybitsy_m0_express" - - "itsybitsy_m4_express" - - "itsybitsy_nrf52840_express" - - "kicksat-sprite" - - "loc_ber_m4_base_board" - - "makerdiary_m60_keyboard" - - "makerdiary_nrf52840_m2_devkit" - - "makerdiary_nrf52840_mdk" - - "makerdiary_nrf52840_mdk_usb_dongle" - - "matrixportal_m4" - - "meowbit_v121" - - "meowmeow" - - "metro_m0_express" - - "metro_m4_airlift_lite" - - "metro_m4_express" - - "metro_m7_1011" - - "metro_nrf52840_express" - - "mini_sam_m4" - - "monster_m4sk" - - "ndgarage_ndbit6" - - "ndgarage_ndbit6_v2" - - "neopixel_trinkey_m0" - - "nfc_copy_cat" - - "nice_nano" - - "nucleo_f746zg" - - "nucleo_f767zi" - - "nucleo_h743zi_2" - - "ohs2020_badge" - - "openbook_m4" - - "openmv_h7" - - "particle_argon" - - "particle_boron" - - "particle_xenon" - - "pca10056" - - "pca10059" - - "pca10100" - - "pewpew10" - - "pewpew_m4" - - "picoplanet" - - "pimoroni_keybow2040" - - "pimoroni_pga2040" - - "pimoroni_picolipo_16mb" - - "pimoroni_picolipo_4mb" - - "pimoroni_picosystem" - - "pimoroni_tiny2040" - - "pitaya_go" - - "pyb_nano_v2" - - "pybadge" - - "pyboard_v11" - - "pycubed" - - "pycubed_mram" - - "pygamer" - - "pyportal" - - "pyportal_titano" - - "pyruler" - - "qtpy_m0" - - "qtpy_m0_haxpress" - - "raspberry_pi_pico" - - "raytac_mdbt50q-db-40" - - "robohatmm1_m4" - - "sam32" - - "same54_xplained" - - "seeeduino_wio_terminal" - - "seeeduino_xiao" - - "sensebox_mcu" - - "serpente" - - "shirtty" - - "silicognition-m4-shim" - - "simmel" - - "snekboard" - - "sparkfun_lumidrive" - - "sparkfun_micromod_rp2040" - - "sparkfun_nrf52840_micromod" - - "sparkfun_nrf52840_mini" - - "sparkfun_pro_micro_rp2040" - - "sparkfun_qwiic_micro_no_flash" - - "sparkfun_qwiic_micro_with_flash" - - "sparkfun_redboard_turbo" - - "sparkfun_samd21_dev" - - "sparkfun_samd21_mini" - - "sparkfun_samd51_micromod" - - "sparkfun_samd51_thing_plus" - - "sparkfun_thing_plus_rp2040" - - "spresense" - - "stackrduino_m0_pro" - - "stm32f411ce_blackpill" - - "stm32f411ce_blackpill_with_flash" - - "stm32f411ve_discovery" - - "stm32f412zg_discovery" - - "stm32f4_discovery" - - "stm32f746g_discovery" - - "stringcar_m0_express" - - "teensy40" - - "teensy41" - - "teknikio_bluebird" - - "thunderpack_v11" - - "thunderpack_v12" - - "tinkeringtech_scoutmakes_azul" - - "trellis_m4_express" - - "trinket_m0" - - "trinket_m0_haxpress" - - "uartlogger2" - - "uchip" - - "ugame10" - - "winterbloom_big_honking_button" - - "winterbloom_sol" - - "xinabox_cc03" - - "xinabox_cs11" - - steps: - - name: Set up Python 3.8 - uses: actions/setup-python@v1 - with: - python-version: 3.8 - - uses: actions/checkout@v2.2.0 - with: - submodules: true - fetch-depth: 0 - - run: git fetch --recurse-submodules=no https://github.com/adafruit/circuitpython refs/tags/*:refs/tags/* - - name: Install deps - run: | - sudo apt-get install -y gettext - pip install -r requirements-dev.txt - wget --no-verbose https://adafruit-circuit-python.s3.amazonaws.com/gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2 - sudo tar -C /usr --strip-components=1 -xaf gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2 - - name: Versions - run: | - gcc --version - arm-none-eabi-gcc --version - python3 --version - - name: mpy-cross - run: make -C mpy-cross -j2 - - name: Setup build failure matcher - run: echo "::add-matcher::$GITHUB_WORKSPACE/.github/workflows/match-build-fail.json" - - name: build - run: python3 -u build_release_files.py - working-directory: tools - env: - BOARDS: ${{ matrix.board }} - - uses: actions/upload-artifact@v2 - with: - name: ${{ matrix.board }} - path: bin/${{ matrix.board }} - - name: Upload to S3 - run: "[ -z \"$AWS_ACCESS_KEY_ID\" ] || aws s3 cp bin/ s3://adafruit-circuit-python/bin/ --recursive --no-progress --region us-east-1" - env: - AWS_PAGER: '' - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - if: github.event_name == 'push' || (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested')) - - build-riscv: - runs-on: ubuntu-20.04 - needs: test - strategy: - fail-fast: false - matrix: - board: - - "fomu" - - steps: - - name: Set up Python 3.8 - uses: actions/setup-python@v1 - with: - python-version: 3.8 - - uses: actions/checkout@v2.2.0 - with: - submodules: true - fetch-depth: 0 - - run: git fetch --recurse-submodules=no https://github.com/adafruit/circuitpython refs/tags/*:refs/tags/* - - name: Install deps - run: | - sudo apt-get install -y gettext - pip install requests sh click setuptools awscli - wget https://static.dev.sifive.com/dev-tools/riscv64-unknown-elf-gcc-8.3.0-2019.08.0-x86_64-linux-centos6.tar.gz - sudo tar -C /usr --strip-components=1 -xaf riscv64-unknown-elf-gcc-8.3.0-2019.08.0-x86_64-linux-centos6.tar.gz - - name: Versions - run: | - gcc --version - riscv64-unknown-elf-gcc --version - python3 --version - - name: mpy-cross - run: make -C mpy-cross -j2 - - name: Setup build failure matcher - run: echo "::add-matcher::$GITHUB_WORKSPACE/.github/workflows/match-build-fail.json" - - name: build - run: python3 -u build_release_files.py - working-directory: tools - env: - BOARDS: ${{ matrix.board }} - - uses: actions/upload-artifact@v2 - with: - name: ${{ matrix.board }} - path: bin/${{ matrix.board }} - - name: Upload to S3 - run: "[ -z \"$AWS_ACCESS_KEY_ID\" ] || aws s3 cp bin/ s3://adafruit-circuit-python/bin/ --recursive --no-progress --region us-east-1" - env: - AWS_PAGER: '' - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - if: github.event_name == 'push' || (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested')) - build-xtensa: - runs-on: ubuntu-20.04 - needs: test - strategy: - fail-fast: false - matrix: - board: - - "adafruit_feather_esp32s2_nopsram" - - "adafruit_feather_esp32s2_tftback_nopsram" - - "adafruit_funhouse" - - "adafruit_magtag_2.9_grayscale" - - "adafruit_metro_esp32s2" - - "artisense_rd00" - - "atmegazero_esp32s2" - - "electroniccats_bastwifi" - - "espressif_kaluga_1" - - "espressif_kaluga_1.3" - - "espressif_saola_1_wroom" - - "espressif_saola_1_wrover" - - "franzininho_wifi_wroom" - - "franzininho_wifi_wrover" - - "lilygo_ttgo_t8_s2_st7789" - - "microdev_micro_s2" - - "muselab_nanoesp32_s2_wroom" - - "muselab_nanoesp32_s2_wrover" - - "targett_module_clip_wroom" - - "targett_module_clip_wrover" - - "unexpectedmaker_feathers2" - - "unexpectedmaker_feathers2_prerelease" - - "unexpectedmaker_tinys2" - - steps: - - name: Set up Python 3.8 - uses: actions/setup-python@v1 - with: - python-version: 3.8 - - uses: actions/checkout@v2.2.0 - with: - submodules: true - fetch-depth: 0 - - run: git fetch --recurse-submodules=no https://github.com/adafruit/circuitpython refs/tags/*:refs/tags/* - - name: CircuitPython version - run: git describe --dirty --tags - - uses: actions/cache@v2 - name: Fetch IDF tool cache - id: idf-cache - with: - path: ${{ github.workspace }}/.idf_tools - key: ${{ runner.os }}-idf-tools-${{ hashFiles('.git/modules/ports/esp32s2/esp-idf/HEAD') }}-20210506 - - name: Clone IDF submodules - run: | - (cd $IDF_PATH && git submodule update --init) - env: - IDF_PATH: ${{ github.workspace }}/ports/esp32s2/esp-idf - - name: Install IDF tools - run: | - $IDF_PATH/tools/idf_tools.py --non-interactive install required - $IDF_PATH/tools/idf_tools.py --non-interactive install cmake - $IDF_PATH/tools/idf_tools.py --non-interactive install-python-env - rm -rf $IDF_TOOLS_PATH/dist - env: - IDF_PATH: ${{ github.workspace }}/ports/esp32s2/esp-idf - IDF_TOOLS_PATH: ${{ github.workspace }}/.idf_tools - - name: Install CircuitPython deps - run: | - source $IDF_PATH/export.sh - pip install -r requirements-dev.txt - sudo apt-get install -y gettext ninja-build - env: - IDF_PATH: ${{ github.workspace }}/ports/esp32s2/esp-idf - IDF_TOOLS_PATH: ${{ github.workspace }}/.idf_tools - - name: Versions - run: | - source $IDF_PATH/export.sh - gcc --version - xtensa-esp32s2-elf-gcc --version - python3 --version - ninja --version - cmake --version - shell: bash - env: - IDF_PATH: ${{ github.workspace }}/ports/esp32s2/esp-idf - IDF_TOOLS_PATH: ${{ github.workspace }}/.idf_tools - - name: mpy-cross - run: make -C mpy-cross -j2 - - name: Setup build failure matcher - run: echo "::add-matcher::$GITHUB_WORKSPACE/.github/workflows/match-build-fail.json" - - name: build - run: | - source $IDF_PATH/export.sh - python3 -u build_release_files.py - working-directory: tools - shell: bash - env: - IDF_PATH: ${{ github.workspace }}/ports/esp32s2/esp-idf - IDF_TOOLS_PATH: ${{ github.workspace }}/.idf_tools - BOARDS: ${{ matrix.board }} - - uses: actions/upload-artifact@v2 - with: - name: ${{ matrix.board }} - path: bin/${{ matrix.board }} - - name: Upload to S3 - run: "[ -z \"$AWS_ACCESS_KEY_ID\" ] || aws s3 cp bin/ s3://adafruit-circuit-python/bin/ --recursive --no-progress --region us-east-1" - env: - AWS_PAGER: '' - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - if: github.event_name == 'push' || (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested')) +# build-arm: +# runs-on: ubuntu-20.04 +# needs: test +# strategy: +# fail-fast: false +# matrix: +# board: +# - "8086_commander" +# - "ADM_B_NRF52840_1" +# - "TG-Watch" +# - "adafruit_feather_rp2040" +# - "adafruit_itsybitsy_rp2040" +# - "adafruit_macropad_rp2040" +# - "adafruit_neokey_trinkey_m0" +# - "adafruit_proxlight_trinkey_m0" +# - "adafruit_qt2040_trinkey" +# - "adafruit_qtpy_rp2040" +# - "adafruit_rotary_trinkey_m0" +# - "adafruit_slide_trinkey_m0" +# - "aloriumtech_evo_m51" +# - "aramcon2_badge" +# - "aramcon_badge_2019" +# - "arduino_mkr1300" +# - "arduino_mkrzero" +# - "arduino_nano_33_ble" +# - "arduino_nano_33_iot" +# - "arduino_nano_rp2040_connect" +# - "arduino_zero" +# - "bast_pro_mini_m0" +# - "bastble" +# - "bdmicro_vina_d21" +# - "bdmicro_vina_d51" +# - "bdmicro_vina_d51_pcb7" +# - "bless_dev_board_multi_sensor" +# - "blm_badge" +# - "capablerobot_usbhub" +# - "catwan_usbstick" +# - "circuitbrains_basic_m0" +# - "circuitbrains_deluxe_m4" +# - "circuitplayground_bluefruit" +# - "circuitplayground_express" +# - "circuitplayground_express_crickit" +# - "circuitplayground_express_displayio" +# - "clue_nrf52840_express" +# - "cp32-m4" +# - "cp_sapling_m0" +# - "cp_sapling_m0_revb" +# - "cp_sapling_m0_spiflash" +# - "cytron_maker_pi_rp2040" +# - "datalore_ip_m4" +# - "datum_distance" +# - "datum_imu" +# - "datum_light" +# - "datum_weather" +# - "dynalora_usb" +# - "dynossat_edu_eps" +# - "dynossat_edu_obc" +# - "electronut_labs_blip" +# - "electronut_labs_papyr" +# - "escornabot_makech" +# - "espruino_pico" +# - "espruino_wifi" +# - "feather_bluefruit_sense" +# - "feather_m0_adalogger" +# - "feather_m0_basic" +# - "feather_m0_express" +# - "feather_m0_express_crickit" +# - "feather_m0_rfm69" +# - "feather_m0_rfm9x" +# - "feather_m0_supersized" +# - "feather_m4_can" +# - "feather_m4_express" +# - "feather_m7_1011" +# - "feather_mimxrt1011" +# - "feather_mimxrt1062" +# - "feather_nrf52840_express" +# - "feather_stm32f405_express" +# - "fluff_m0" +# - "gemma_m0" +# - "grandcentral_m4_express" +# - "hallowing_m0_express" +# - "hallowing_m4_express" +# - "hiibot_bluefi" +# - "huntercat_nfc" +# - "ikigaisense_vita" +# - "imxrt1010_evk" +# - "imxrt1020_evk" +# - "imxrt1060_evk" +# - "itsybitsy_m0_express" +# - "itsybitsy_m4_express" +# - "itsybitsy_nrf52840_express" +# - "kicksat-sprite" +# - "loc_ber_m4_base_board" +# - "makerdiary_m60_keyboard" +# - "makerdiary_nrf52840_m2_devkit" +# - "makerdiary_nrf52840_mdk" +# - "makerdiary_nrf52840_mdk_usb_dongle" +# - "matrixportal_m4" +# - "meowbit_v121" +# - "meowmeow" +# - "metro_m0_express" +# - "metro_m4_airlift_lite" +# - "metro_m4_express" +# - "metro_m7_1011" +# - "metro_nrf52840_express" +# - "mini_sam_m4" +# - "monster_m4sk" +# - "ndgarage_ndbit6" +# - "ndgarage_ndbit6_v2" +# - "neopixel_trinkey_m0" +# - "nfc_copy_cat" +# - "nice_nano" +# - "nucleo_f746zg" +# - "nucleo_f767zi" +# - "nucleo_h743zi_2" +# - "ohs2020_badge" +# - "openbook_m4" +# - "openmv_h7" +# - "particle_argon" +# - "particle_boron" +# - "particle_xenon" +# - "pca10056" +# - "pca10059" +# - "pca10100" +# - "pewpew10" +# - "pewpew_m4" +# - "picoplanet" +# - "pimoroni_keybow2040" +# - "pimoroni_picolipo_16mb" +# - "pimoroni_picolipo_4mb" +# - "pimoroni_picosystem" +# - "pimoroni_tiny2040" +# - "pitaya_go" +# - "pyb_nano_v2" +# - "pybadge" +# - "pyboard_v11" +# - "pycubed" +# - "pycubed_mram" +# - "pygamer" +# - "pyportal" +# - "pyportal_titano" +# - "pyruler" +# - "qtpy_m0" +# - "qtpy_m0_haxpress" +# - "raspberry_pi_pico" +# - "raytac_mdbt50q-db-40" +# - "robohatmm1_m4" +# - "sam32" +# - "same54_xplained" +# - "seeeduino_wio_terminal" +# - "seeeduino_xiao" +# - "sensebox_mcu" +# - "serpente" +# - "shirtty" +# - "silicognition-m4-shim" +# - "simmel" +# - "snekboard" +# - "sparkfun_lumidrive" +# - "sparkfun_micromod_rp2040" +# - "sparkfun_nrf52840_micromod" +# - "sparkfun_nrf52840_mini" +# - "sparkfun_pro_micro_rp2040" +# - "sparkfun_qwiic_micro_no_flash" +# - "sparkfun_qwiic_micro_with_flash" +# - "sparkfun_redboard_turbo" +# - "sparkfun_samd21_dev" +# - "sparkfun_samd21_mini" +# - "sparkfun_samd51_micromod" +# - "sparkfun_samd51_thing_plus" +# - "sparkfun_thing_plus_rp2040" +# - "spresense" +# - "stackrduino_m0_pro" +# - "stm32f411ce_blackpill" +# - "stm32f411ce_blackpill_with_flash" +# - "stm32f411ve_discovery" +# - "stm32f412zg_discovery" +# - "stm32f4_discovery" +# - "stm32f746g_discovery" +# - "stringcar_m0_express" +# - "teensy40" +# - "teensy41" +# - "teknikio_bluebird" +# - "thunderpack_v11" +# - "thunderpack_v12" +# - "tinkeringtech_scoutmakes_azul" +# - "trellis_m4_express" +# - "trinket_m0" +# - "trinket_m0_haxpress" +# - "uartlogger2" +# - "uchip" +# - "ugame10" +# - "winterbloom_big_honking_button" +# - "winterbloom_sol" +# - "xinabox_cc03" +# - "xinabox_cs11" +# +# steps: +# - name: Set up Python 3.8 +# uses: actions/setup-python@v1 +# with: +# python-version: 3.8 +# - uses: actions/checkout@v2.2.0 +# with: +# submodules: true +# fetch-depth: 0 +# - run: git fetch --recurse-submodules=no https://github.com/adafruit/circuitpython refs/tags/*:refs/tags/* +# - name: Install deps +# run: | +# sudo apt-get install -y gettext +# pip install -r requirements-dev.txt +# wget --no-verbose https://adafruit-circuit-python.s3.amazonaws.com/gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2 +# sudo tar -C /usr --strip-components=1 -xaf gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2 +# - name: Versions +# run: | +# gcc --version +# arm-none-eabi-gcc --version +# python3 --version +# - name: mpy-cross +# run: make -C mpy-cross -j2 +# - name: Setup build failure matcher +# run: echo "::add-matcher::$GITHUB_WORKSPACE/.github/workflows/match-build-fail.json" +# - name: build +# run: python3 -u build_release_files.py +# working-directory: tools +# env: +# BOARDS: ${{ matrix.board }} +# - uses: actions/upload-artifact@v2 +# with: +# name: ${{ matrix.board }} +# path: bin/${{ matrix.board }} +# - name: Upload to S3 +# run: "[ -z \"$AWS_ACCESS_KEY_ID\" ] || aws s3 cp bin/ s3://adafruit-circuit-python/bin/ --recursive --no-progress --region us-east-1" +# env: +# AWS_PAGER: '' +# AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} +# AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} +# if: github.event_name == 'push' || (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested')) +# +# build-riscv: +# runs-on: ubuntu-20.04 +# needs: test +# strategy: +# fail-fast: false +# matrix: +# board: +# - "fomu" +# +# steps: +# - name: Set up Python 3.8 +# uses: actions/setup-python@v1 +# with: +# python-version: 3.8 +# - uses: actions/checkout@v2.2.0 +# with: +# submodules: true +# fetch-depth: 0 +# - run: git fetch --recurse-submodules=no https://github.com/adafruit/circuitpython refs/tags/*:refs/tags/* +# - name: Install deps +# run: | +# sudo apt-get install -y gettext +# pip install requests sh click setuptools awscli +# wget https://static.dev.sifive.com/dev-tools/riscv64-unknown-elf-gcc-8.3.0-2019.08.0-x86_64-linux-centos6.tar.gz +# sudo tar -C /usr --strip-components=1 -xaf riscv64-unknown-elf-gcc-8.3.0-2019.08.0-x86_64-linux-centos6.tar.gz +# - name: Versions +# run: | +# gcc --version +# riscv64-unknown-elf-gcc --version +# python3 --version +# - name: mpy-cross +# run: make -C mpy-cross -j2 +# - name: Setup build failure matcher +# run: echo "::add-matcher::$GITHUB_WORKSPACE/.github/workflows/match-build-fail.json" +# - name: build +# run: python3 -u build_release_files.py +# working-directory: tools +# env: +# BOARDS: ${{ matrix.board }} +# - uses: actions/upload-artifact@v2 +# with: +# name: ${{ matrix.board }} +# path: bin/${{ matrix.board }} +# - name: Upload to S3 +# run: "[ -z \"$AWS_ACCESS_KEY_ID\" ] || aws s3 cp bin/ s3://adafruit-circuit-python/bin/ --recursive --no-progress --region us-east-1" +# env: +# AWS_PAGER: '' +# AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} +# AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} +# if: github.event_name == 'push' || (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested')) +# build-xtensa: +# runs-on: ubuntu-20.04 +# needs: test +# strategy: +# fail-fast: false +# matrix: +# board: +# - "adafruit_feather_esp32s2_nopsram" +# - "adafruit_feather_esp32s2_tftback_nopsram" +# - "adafruit_funhouse" +# - "adafruit_magtag_2.9_grayscale" +# - "adafruit_metro_esp32s2" +# - "artisense_rd00" +# - "atmegazero_esp32s2" +# - "electroniccats_bastwifi" +# - "espressif_kaluga_1" +# - "espressif_saola_1_wroom" +# - "espressif_saola_1_wrover" +# - "franzininho_wifi_wroom" +# - "franzininho_wifi_wrover" +# - "lilygo_ttgo_t8_s2_st7789" +# - "microdev_micro_s2" +# - "muselab_nanoesp32_s2_wroom" +# - "muselab_nanoesp32_s2_wrover" +# - "targett_module_clip_wroom" +# - "targett_module_clip_wrover" +# - "unexpectedmaker_feathers2" +# - "unexpectedmaker_feathers2_prerelease" +# - "unexpectedmaker_tinys2" +# +# steps: +# - name: Set up Python 3.8 +# uses: actions/setup-python@v1 +# with: +# python-version: 3.8 +# - uses: actions/checkout@v2.2.0 +# with: +# submodules: true +# fetch-depth: 0 +# - run: git fetch --recurse-submodules=no https://github.com/adafruit/circuitpython refs/tags/*:refs/tags/* +# - name: CircuitPython version +# run: git describe --dirty --tags +# - uses: actions/cache@v2 +# name: Fetch IDF tool cache +# id: idf-cache +# with: +# path: ${{ github.workspace }}/.idf_tools +# key: ${{ runner.os }}-idf-tools-${{ hashFiles('.git/modules/ports/esp32s2/esp-idf/HEAD') }}-20210506 +# - name: Clone IDF submodules +# run: | +# (cd $IDF_PATH && git submodule update --init) +# env: +# IDF_PATH: ${{ github.workspace }}/ports/esp32s2/esp-idf +# - name: Install IDF tools +# run: | +# $IDF_PATH/tools/idf_tools.py --non-interactive install required +# $IDF_PATH/tools/idf_tools.py --non-interactive install cmake +# $IDF_PATH/tools/idf_tools.py --non-interactive install-python-env +# rm -rf $IDF_TOOLS_PATH/dist +# env: +# IDF_PATH: ${{ github.workspace }}/ports/esp32s2/esp-idf +# IDF_TOOLS_PATH: ${{ github.workspace }}/.idf_tools +# - name: Install CircuitPython deps +# run: | +# source $IDF_PATH/export.sh +# pip install -r requirements-dev.txt +# sudo apt-get install -y gettext ninja-build +# env: +# IDF_PATH: ${{ github.workspace }}/ports/esp32s2/esp-idf +# IDF_TOOLS_PATH: ${{ github.workspace }}/.idf_tools +# - name: Versions +# run: | +# source $IDF_PATH/export.sh +# gcc --version +# xtensa-esp32s2-elf-gcc --version +# python3 --version +# ninja --version +# cmake --version +# shell: bash +# env: +# IDF_PATH: ${{ github.workspace }}/ports/esp32s2/esp-idf +# IDF_TOOLS_PATH: ${{ github.workspace }}/.idf_tools +# - name: mpy-cross +# run: make -C mpy-cross -j2 +# - name: Setup build failure matcher +# run: echo "::add-matcher::$GITHUB_WORKSPACE/.github/workflows/match-build-fail.json" +# - name: build +# run: | +# source $IDF_PATH/export.sh +# python3 -u build_release_files.py +# working-directory: tools +# shell: bash +# env: +# IDF_PATH: ${{ github.workspace }}/ports/esp32s2/esp-idf +# IDF_TOOLS_PATH: ${{ github.workspace }}/.idf_tools +# BOARDS: ${{ matrix.board }} +# - uses: actions/upload-artifact@v2 +# with: +# name: ${{ matrix.board }} +# path: bin/${{ matrix.board }} +# - name: Upload to S3 +# run: "[ -z \"$AWS_ACCESS_KEY_ID\" ] || aws s3 cp bin/ s3://adafruit-circuit-python/bin/ --recursive --no-progress --region us-east-1" +# env: +# AWS_PAGER: '' +# AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} +# AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} +# if: github.event_name == 'push' || (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested')) diff --git a/ports/esp32s2/esp-idf b/ports/esp32s2/esp-idf index f30a865fd1a44..4b17d725e03d0 160000 --- a/ports/esp32s2/esp-idf +++ b/ports/esp32s2/esp-idf @@ -1 +1 @@ -Subproject commit f30a865fd1a44d880b909b84112f74741412c2ce +Subproject commit 4b17d725e03d0fff37f4be24765130ce69436ebf diff --git a/setup.py b/setup.py index 930d6b79058fb..df64e8b3aa405 100644 --- a/setup.py +++ b/setup.py @@ -8,27 +8,14 @@ from setuptools import setup from pathlib import Path -import subprocess -import re STD_PACKAGES = set(('array', 'math', 'os', 'random', 'struct', 'sys', 'ssl', 'time')) stub_root = Path("circuitpython-stubs") stubs = [p.relative_to(stub_root).as_posix() for p in stub_root.glob("*.pyi")] -git_out = subprocess.check_output(["git", "describe", "--tags"]) -version = git_out.strip().decode("utf-8") - -# Detect a development build and mutate it to be valid semver and valid python version. -pieces = version.split("-") -if len(pieces) > 2: - # Merge the commit portion onto the commit count since the tag. - pieces[-2] += "+" + pieces[-1] - pieces.pop() - # Merge the commit count and build to the pre-release identifier. - pieces[-2] += ".dev." + pieces[-1] - pieces.pop() -version = "-".join(pieces) +def local_scheme(version): + return "" packages = set(os.listdir("circuitpython-stubs")) - STD_PACKAGES package_dir = dict((f"{package}-stubs", f"circuitpython-stubs/{package}") @@ -43,13 +30,13 @@ def build_package_data() -> Dict[str, List[str]]: package_data=build_package_data() setup( - name="circuitpython-stubs", + name="circuitpython-stubs-foamyguy-1", description="PEP 561 type stubs for CircuitPython", url="https://github.com/adafruit/circuitpython", maintainer="CircuitPythonistas", maintainer_email="circuitpython@adafruit.com", author_email="circuitpython@adafruit.com", - version=version, + use_scm_version={"local_scheme": local_scheme}, license="MIT", packages=list(package_data.keys()), package_data=package_data,