-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Setup GitHub workflow to build examples
The workflow has two jobs, one for each example. Please refer to comments in the file for more information.
- Loading branch information
1 parent
c6a919d
commit 72480c9
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Build Examples | ||
on: | ||
# Trigger the workflow on push, but only for main | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
pull_request: | ||
jobs: | ||
build-mock: | ||
runs-on: ubuntu-latest | ||
container: mbedos/mbed-os-env:latest | ||
steps: | ||
# Checkout the repo and download it to the runner | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
# Run the fota build tool with mock as the option | ||
- name: Build example | ||
run: ./scripts/fota.sh -e=mock | ||
|
||
build-mcuboot: | ||
runs-on: ubuntu-latest | ||
container: mbedos/mbed-os-env:latest | ||
steps: | ||
# Checkout the repo and download it to the runner | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
# jq is a command-line JSON processor | ||
- name: Install jq | ||
run: sudo apt-get install jq | ||
# Pipe "yes" into the script to select the appropriate option | ||
# More information about this in the documentation | ||
# Run the fota build tool with mcuboot as the option | ||
- name: Build example | ||
run: yes | ./scripts/fota.sh -e=mcuboot |