|
| 1 | +name: Build |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - main |
| 7 | + pull_request: |
| 8 | + types: |
| 9 | + - opened |
| 10 | + - synchronize |
| 11 | + - closed |
| 12 | + branches: |
| 13 | + - main |
| 14 | + workflow_dispatch: |
| 15 | + |
| 16 | +jobs: |
| 17 | + ubuntu: |
| 18 | + runs-on: ubuntu-latest |
| 19 | + steps: |
| 20 | + - name: Checkout project |
| 21 | + uses: actions/checkout@v2 |
| 22 | + with: |
| 23 | + path: ${{ github.workspace }} |
| 24 | + submodules: 'recursive' |
| 25 | + - name: Install python 3 |
| 26 | + uses: actions/setup-python@v2 |
| 27 | + with: |
| 28 | + architecture: x64 |
| 29 | + env: |
| 30 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 31 | + - name: Install build dependencies |
| 32 | + shell: bash |
| 33 | + run: | |
| 34 | + pip install cmake ninja imgtool cffi intelhex cbor2 cbor jinja2 PyYaml |
| 35 | + - name: Install GNU Arm toolchain |
| 36 | + shell: bash |
| 37 | + run: | |
| 38 | + sudo apt-get -y update |
| 39 | + sudo apt-get -y install gcc-arm-none-eabi |
| 40 | + - name: Generate dummy device credentials |
| 41 | + shell: bash |
| 42 | + run: | |
| 43 | + export IOT_OTA_ENDPOINT="dummy_endpoint" |
| 44 | + export IOT_OTA_CLIENT_CERT="dummy_certificate" |
| 45 | + export IOT_OTA_CLIENT_PRIV="dummy_priv_key" |
| 46 | + export IOT_OTA_CLIENT_PUB="dummy_pub_key" |
| 47 | + ./ci/generate_credentials.sh -f -p Config/aws_configs |
| 48 | + git config --global user.email "[email protected]" |
| 49 | + git config --global user.name "ci" |
| 50 | + - name: Build the project |
| 51 | + shell: bash |
| 52 | + run: | |
| 53 | + ./Tools/scripts/build.sh aws-iot-example --toolchain GNU |
| 54 | + - name: Copy artifacts |
| 55 | + shell: bash |
| 56 | + run: | |
| 57 | + tar -czf gnu_build.tar.gz \ |
| 58 | + build/bootloader/bl2.axf \ |
| 59 | + build/secure_partition/tfm_s_signed.bin \ |
| 60 | + build/Projects/aws-iot-example/aws-iot-example.axf \ |
| 61 | + build/Projects/aws-iot-example/aws-iot-example_signed.bin \ |
| 62 | + build/Projects/aws-iot-example/aws-iot-example-update_signed.bin \ |
| 63 | + build/Projects/aws-iot-example/update-signature.txt |
| 64 | + - name: Upload Build Artifacts |
| 65 | + uses: actions/upload-artifact@v3 |
| 66 | + with: |
| 67 | + name: FRI-build-logs |
| 68 | + path: | |
| 69 | + ${{ github.workspace }}/gnu_build.tar.gz |
| 70 | + retention-days: 5 |
0 commit comments