diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..45de116 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,38 @@ +name: Build Firmware +on: [push, pull_request] + +jobs: + build: + strategy: + matrix: + teensy: ['32', '40'] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - run: | + git fetch --prune --unshallow --tags + git describe --dirty --tags + - name: Set up Python + uses: actions/setup-python@v2 + - name: Install PlatformIO + run: | + pip install platformio + - name: Build firmware + run: | + platformio run --environment teensy${{ matrix.teensy }} + cp .pio/build/teensy${{ matrix.teensy }}/firmware.hex firmware_teensy${{ matrix.teensy }}.hex + - name: Upload artifact + if: always() + uses: actions/upload-artifact@v3 + with: + path: | + firmware_teensy${{ matrix.teenxy }}.hex + - name: Upload firmware to release + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: ./firmware_teensy${{ matrix.teenxy }}.hex + tag: ${{ github.ref }} + overwrite: true + file_glob: true + if: startsWith(github.ref, 'refs/tags/') diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 1fd0518..0000000 --- a/.travis.yml +++ /dev/null @@ -1,35 +0,0 @@ -language: python -python: -- '3.9' -sudo: false -cache: - directories: - - "~/.platformio" -install: -- pip install -U platformio -- platformio update -script: -- platformio run --verbose --environment $PLATOFORMIO_ENVIRONMENT -- mv .pio/build/${PLATOFORMIO_ENVIRONMENT}/firmware.elf teensytoany-${PLATOFORMIO_ENVIRONMENT}.elf -- mv .pio/build/${PLATOFORMIO_ENVIRONMENT}/firmware.hex teensytoany-${PLATOFORMIO_ENVIRONMENT}.hex -- cp teensytoany-${PLATOFORMIO_ENVIRONMENT}.elf teensytoany-${PLATOFORMIO_ENVIRONMENT}-${TRAVIS_BRANCH}.elf -- cp teensytoany-${PLATOFORMIO_ENVIRONMENT}.hex teensytoany-${PLATOFORMIO_ENVIRONMENT}-${TRAVIS_BRANCH}.hex - -job: - include: - - env: PLATOFORMIO_ENVIRONMENT=teensy32 - - env: PLATOFORMIO_ENVIRONMENT=teensy40 - -deploy: - provider: releases - skip_cleanup: true - api_key: - secure: td0ptfzJgEazdP2pgp2S+0BbVr5j/cFvK6z7qpz8Uy92qzF2phARInFYhIwKwz1cW1dfjXgaKRb81s1M7hlTRtTs7hNE8dJF4pgpWNn5tGJH94P4cJPPXGR7/FxyuXHGM16Mj0eu8FoY+NKkwJDpJClCrpdF1CZWMM2qMIN7ESDcB4WUHoOA8MXnWUsneGVu7qx20lJ0rfuyVOqbvq5SD7zhIJtSuDsHq1JnqQKKrphzcUoPbi71enjvOi3nof6VbMDMvjp0U4NamPk0VjDJRAxjp0LQUerjLw4kfCUjiX/0h5PiipGCo/8xMgvQjEl2hXBSDmjDTBAnDCZS8RXXSG2fspe3g5PAQIBsVwYPHC7VLA20L+RofWtjzqXHpU3/KRvwA0dtWg8s/7OUimx4XGTysZfqXGc0UC295hb36y30BYdj/GGwhx1jV7NiArtzuBY9HZIYgENWu+rjViYQMoCJVWguSkPDLzhS5tAoonHSONxwzwfCwRo7ARTt8Ra/b66ll1fVsAAoLvAhXUF4OWAmRZa0wpC68VN28HgwkpPfoiYN0VAZAxDJTeF4JIAVg1HThhBd4g13DaILUdd6NyIzSbltLBktLguppTIi9qJDG87/Z3zV1qHC2NFYl4HECV3qMbdWHkoyE2qMPJ7RNh8S3tSl3y8Oc3rKnMc+zbE= - file: - - teensytoany-${PLATOFORMIO_ENVIRONMENT}.elf - - teensytoany-${PLATOFORMIO_ENVIRONMENT}.hex - - teensytoany-${PLATOFORMIO_ENVIRONMENT}-${TRAVIS_TAG}.elf - - teensytoany-${PLATOFORMIO_ENVIRONMENT}-${TRAVIS_TAG}.hex - on: - repo: ramonaoptics/teensy-to-any - tags: true