name: Build CI on: [push, pull_request, release] jobs: test: runs-on: ubuntu-16.04 steps: - name: Dump GitHub context env: GITHUB_CONTEXT: ${{ toJson(github) }} run: echo "$GITHUB_CONTEXT" - name: Fail if not a release publish # workaround has `on` doesn't have this filter run: exit 1 if: github.event_name == 'release' && (github.event.action != 'published' && github.event.action != 'rerequested') - name: Set up Python 3.5 uses: actions/setup-python@v1 with: python-version: 3.5 - name: Install deps run: | sudo apt-get install -y gettext librsvg2-bin pip install requests sh click setuptools cpp-coveralls Sphinx sphinx-rtd-theme recommonmark sphinxcontrib-svg2pdfconverter polib pyyaml - name: Versions run: | gcc --version python3 --version - uses: actions/checkout@v1 with: submodules: true - name: CircuitPython version run: git describe --dirty --always --tags - name: Build mpy-cross run: make -C mpy-cross -j2 - name: Build unix port run: | make -C ports/unix deplibs -j2 make -C ports/unix -j2 make -C ports/unix coverage -j2 - name: Test all run: MICROPY_CPYTHON3=python3.5 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 working-directory: 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 working-directory: tests if: failure() - name: Test threads run: MICROPY_CPYTHON3=python3.5 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 -d thread working-directory: tests - name: Native Tests run: MICROPY_CPYTHON3=python3.5 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 --emit native working-directory: tests - name: mpy Tests run: MICROPY_CPYTHON3=python3.5 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 --via-mpy -d basics float working-directory: tests - name: Docs run: sphinx-build -E -W -b html . _build/html - name: Translations run: make check-translate - name: New boards check run: python3 -u ci_new_boards_check.py working-directory: tools build-arm: runs-on: ubuntu-16.04 needs: test strategy: fail-fast: false matrix: board: - "arduino_mkr1300" - "arduino_mkrzero" - "arduino_zero" - "bast_pro_mini_m0" - "capablerobot_usbhub" - "catwan_usbstick" - "circuitplayground_bluefruit" - "circuitplayground_express" - "circuitplayground_express_crickit" - "cp32-m4" - "datalore_ip_m4" - "datum_distance" - "datum_imu" - "datum_light" - "datum_weather" - "electronut_labs_blip" - "electronut_labs_papyr" - "escornabot_makech" - "feather_m0_adalogger" - "feather_m0_basic" - "feather_m0_express" - "feather_m0_express_crickit" - "feather_m0_rfm69" - "feather_m0_rfm9x" - "feather_m0_supersized" - "feather_m4_express" - "feather_nrf52840_express" - "feather_radiofruit_zigbee" - "gemma_m0" - "grandcentral_m4_express" - "hallowing_m0_express" - "hallowing_m4_express" - "itsybitsy_m0_express" - "itsybitsy_m4_express" - "kicksat-sprite" - "makerdiary_nrf52840_mdk" - "makerdiary_nrf52840_mdk_usb_dongle" - "meowmeow" - "metro_m0_express" - "metro_m4_airlift_lite" - "metro_m4_express" - "metro_nrf52840_express" - "mini_sam_m4" - "monster_m4sk" - "particle_argon" - "particle_boron" - "particle_xenon" - "pca10056" - "pca10059" - "pewpew10" - "pewpew_m4" - "pirkey_m0" - "pybadge" - "pybadge_airlift" - "pygamer" - "pygamer_advance" - "pyportal" - "pyportal_titano" - "pyruler" - "robohatmm1_m0" - "robohatmm1_m4" - "sam32" - "snekboard" - "sparkfun_lumidrive" - "sparkfun_nrf52840_mini" - "sparkfun_redboard_turbo" - "sparkfun_samd21_dev" - "sparkfun_samd21_mini" - "stm32f411ve_discovery" - "stm32f412zg_discovery" - "trellis_m4_express" - "trinket_m0" - "trinket_m0_haxpress" - "uchip" - "ugame10" steps: - name: Set up Python 3.5 uses: actions/setup-python@v1 with: python-version: 3.5 - name: Install deps run: | sudo apt-get install -y gettext pip install requests sh click setuptools awscli wget https://s3.amazonaws.com/adafruit-circuit-python/gcc-arm-embedded_7-2018q2-1~xenial1_amd64.deb && sudo dpkg -i gcc-arm-embedded*_amd64.deb - name: Versions run: | gcc --version arm-none-eabi-gcc --version python3 --version - uses: actions/checkout@v1 with: submodules: true - name: mpy-cross run: make -C mpy-cross -j2 - name: build run: python3 -u build_release_files.py working-directory: tools env: BOARDS: ${{ matrix.board }} - uses: actions/upload-artifact@v1.0.0 with: name: ${{ matrix.board }} path: bin/${{ matrix.board }} - name: Upload to S3 run: aws s3 cp bin/ s3://adafruit-circuit-python/bin/ --recursive --no-progress --region us-east-1 env: 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')) - name: Install upload deps run: | pip install uritemplate - name: Upload to Release run: python3 -u upload_release_files.py working-directory: tools env: UPLOAD_URL: ${{ github.event.release.upload_url }} ADABOT_GITHUB_ACCESS_TOKEN: ${{ secrets.BLINKA_GITHUB_ACCESS_TOKEN }} if: github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested')