diff --git a/.github/actions/initbuild/action.yml b/.github/actions/initbuild/action.yml new file mode 100644 index 000000000..db49b31ad --- /dev/null +++ b/.github/actions/initbuild/action.yml @@ -0,0 +1,38 @@ +name: 'Common init' + +# WARNING due to https://github.com/actions/runner/issues/646 +# this code can't work - must copy and paste into workflows for now because 'uses' is not supported +runs: + using: "composite" + steps: + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: 3.x + + - name: Cache python libs + uses: actions/cache@v1 + id: cache-pip # needed in if test + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip + + - name: Upgrade python tools + # We actually want to run this every time + # if: steps.cache-pip.outputs.cache-hit != 'true' + run: | + python -m pip install --upgrade pip + pip install -U platformio meshtastic adafruit-nrfutil + + - name: Cache platformio + uses: actions/cache@v1 + id: cache-platformio # needed in if test + with: + path: ~/.platformio + key: ${{ runner.os }}-platformio + + - name: Upgrade platformio + run: | + pio upgrade + + diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 896d5ccad..e316c291a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -54,18 +54,29 @@ jobs: run: | pio upgrade - - name: Build for tbeam - run: platformio run -e tbeam - - name: Build for heltec - run: platformio run -e heltec - - name: Build for wisblock RAK4631 - run: platformio run -e rak4631 + # We now run integration test before other build steps (to quickly see runtime failures) - name: Build for native run: platformio run -e native - name: Integration test run: | .pio/build/native/program & - sleep 30 # 5 seconds was not enough + sleep 20 # 5 seconds was not enough echo "Simulator started, launching python test..." python3 -c 'from meshtastic.test import testSimulator; testSimulator()' + # - name: Build for tbeam + # run: platformio run -e tbeam + # - name: Build for heltec + # run: platformio run -e heltec + # - name: Build for wisblock RAK4631 + # run: platformio run -e rak4631 + + - name: Build everything + run: bin/build-all.sh + + - name: Store release zip as an artifact + uses: actions/upload-artifact@v2 + with: + name: built + path: release/archive/firmware-*.zip + retention-days: 30 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000..671d88ce9 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,75 @@ +name: Make Release +on: + # Can optionally take parameters from the github UI, more info here https://github.blog/changelog/2020-07-06-github-actions-manual-triggers-with-workflow_dispatch/#:~:text=You%20can%20now%20create%20workflows,the%20workflow%20is%20run%20on. + workflow_dispatch: + inputs: + +jobs: + build: + runs-on: ubuntu-latest + steps: + + - name: Checkout code + uses: actions/checkout@v2 + with: + submodules: 'recursive' + + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: 3.x + + - name: Cache python libs + uses: actions/cache@v1 + id: cache-pip # needed in if test + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip + + - name: Upgrade python tools + # We actually want to run this every time + # if: steps.cache-pip.outputs.cache-hit != 'true' + run: | + python -m pip install --upgrade pip + pip install -U platformio meshtastic adafruit-nrfutil + + - name: Cache platformio + uses: actions/cache@v1 + id: cache-platformio # needed in if test + with: + path: ~/.platformio + key: ${{ runner.os }}-platformio + + - name: Upgrade platformio + run: | + pio upgrade + + # Will be available in steps.version.outputs.version + - name: Get version string + run: echo "::set-output name=version::$(./bin/buildinfo.py)" + id: version + + - name: Build everything + run: bin/build-all.sh + + - name: release + uses: actions/create-release@v1 + id: create_release + with: + draft: true + prerelease: true + release_name: ${{ steps.version.outputs.version }} + tag_name: ${{ github.ref }} + body: Text to be filled in by human + env: + GITHUB_TOKEN: ${{ github.token }} + + - name: upload artifact + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ github.token }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: release/archive/firmware-${{ steps.version.outputs.version }}.zip + asset_name: firmware-${{ steps.version.outputs.version }}.zip + asset_content_type: application/zip \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 982b81300..826eaac58 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -14,10 +14,7 @@ - - - diff --git a/bin/build-all.sh b/bin/build-all.sh index 9ad4d58d0..110b3c915 100755 --- a/bin/build-all.sh +++ b/bin/build-all.sh @@ -18,7 +18,7 @@ ARCHIVEDIR=release/archive rm -f $OUTDIR/firmware* mkdir -p $OUTDIR/bins $ARCHIVEDIR -rm -r $OUTDIR/bins/* +rm -r $OUTDIR/bins/* || true mkdir -p $OUTDIR/bins/universal $OUTDIR/elfs/universal # build the named environment and copy the bins to the release directory diff --git a/boards/wiscore_rak4600.json b/boards/wiscore_rak4600.json new file mode 100644 index 000000000..56f73f4b5 --- /dev/null +++ b/boards/wiscore_rak4600.json @@ -0,0 +1,71 @@ +{ + "build": { + "arduino": { + "ldscript": "nrf52832_s132_v6.ld" + }, + "core": "nRF5", + "cpu": "cortex-m4", + "extra_flags": "-DNRF52832_XXAA -DNRF52", + "f_cpu": "64000000L", + "hwids": [ + [ + "0x239A", + "0x8029" + ], + [ + "0x239A", + "0x0029" + ], + [ + "0x239A", + "0x002A" + ], + [ + "0x239A", + "0x802A" + ] + ], + "usb_product": "Feather nRF52832 Express", + "mcu": "nrf52832", + "variant": "WisCore_RAK4600_Board", + "bsp": { + "name": "adafruit" + }, + "softdevice": { + "sd_flags": "-DS132", + "sd_name": "s132", + "sd_version": "6.1.1", + "sd_fwid": "0x00B7" + }, + "zephyr": { + "variant": "nrf52_adafruit_feather" + } + }, + "connectivity": [ + "bluetooth" + ], + "debug": { + "jlink_device": "nRF52832_xxAA", + "svd_path": "nrf52.svd" + }, + "frameworks": [ + "arduino", + "zephyr" + ], + "name": "Adafruit Bluefruit nRF52832 Feather", + "upload": { + "maximum_ram_size": 65536, + "maximum_size": 524288, + "require_upload_port": true, + "speed": 115200, + "protocol": "nrfutil", + "protocols": [ + "jlink", + "nrfjprog", + "nrfutil", + "stlink" + ] + }, + "url": "https://www.adafruit.com/product/3406", + "vendor": "Adafruit" +} \ No newline at end of file diff --git a/data/static/index.html b/data/static/index.html new file mode 100644 index 000000000..9297288c7 --- /dev/null +++ b/data/static/index.html @@ -0,0 +1 @@ +not yet supported - soon will be included in build