2020-01-03 05:09:59 +00:00
|
|
|
name: Build
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
pull_request:
|
|
|
|
release:
|
|
|
|
types: [published]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Setup Python
|
|
|
|
uses: actions/setup-python@v1
|
|
|
|
|
|
|
|
- name: Setup Node.js
|
|
|
|
uses: actions/setup-node@v1.1.0
|
|
|
|
|
|
|
|
- name: Checkout Code
|
|
|
|
uses: actions/checkout@v1
|
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
|
|
|
|
- name: Install Toolchains
|
|
|
|
run: |
|
2020-01-03 09:23:37 +00:00
|
|
|
pip3 install adafruit-nrfutil uritemplate requests
|
2020-01-03 05:09:59 +00:00
|
|
|
wget https://www.nordicsemi.com/api/sitecore/Products/DownloadPlatform --post-data=fileid=8F19D314130548209E75EFFADD9348DB -O cli-tools.tar
|
|
|
|
tar -xv -f cli-tools.tar
|
|
|
|
echo "::add-path::$GITHUB_WORKSPACE/mergehex"
|
|
|
|
npm install --global xpm
|
|
|
|
xpm install --global @xpack-dev-tools/arm-none-eabi-gcc@latest
|
|
|
|
echo "::add-path::`echo $HOME/opt/xPacks/@xpack-dev-tools/arm-none-eabi-gcc/*/.content/bin`"
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: python3 tools/build_all.py
|
|
|
|
|
2020-01-03 09:23:37 +00:00
|
|
|
- name: Upload Release Asset
|
2020-01-03 05:09:59 +00:00
|
|
|
if: github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested')
|
2020-01-03 09:23:37 +00:00
|
|
|
working-directory: tools
|
|
|
|
env:
|
|
|
|
UPLOAD_URL: ${{ github.event.release.upload_url }}
|
|
|
|
ADABOT_GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
run: "[ -z \"$ADABOT_GITHUB_ACCESS_TOKEN\" ] || python3 -u upload_release_files.py"
|
|
|
|
|