-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Github actions to test apps and for the doc
- Loading branch information
1 parent
5b39c13
commit f52f761
Showing
2 changed files
with
87 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,27 @@ | ||
name: Build all apps | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'rel_**' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: wirepas/sdk-builder:v1.5 | ||
options: --user 0 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Accept license | ||
run: touch .license_accepted | ||
- name: Create dummy key file | ||
run: | | ||
touch custom_bootloader_keys.ini | ||
echo "[key:default]" >> custom_bootloader_keys.ini | ||
echo "keytype = ES256_AES128CTR" >> custom_bootloader_keys.ini | ||
echo "authprivate = 30 81 87 02 01 00 30 13 06 07 2A 86 48 CE 3D 02 01 06 08 2A 86 48 CE 3D 03 01 07 04 6D 30 6B 02 01 01 04 20 DB CA EB 07 95 D1 42 56 02 67 AC 4F 54 5F 81 28 6F 53 2E 7F 7B B7 36 23 56 A4 C4 4A 8A 30 0E 10 A1 44 03 42 00 04 4F 0F DD 10 BC 9F 88 5E 4A 7C 07 68 CC 5F 0D 95 61 07 02 D4 72 06 1D B9 05 79 43 BA 39 DB A2 10 7F 00 FD 74 27 EF BF FE 81 50 24 DE A3 F5 ED D3 89 47 36 8E 34 91 6E 1F AB 23 92 C3 9F 32 25 04" >> custom_bootloader_keys.ini | ||
echo "encrypt = C0 BB 0F 86 BB CB F7 7A DD 46 0E CA 63 54 BC 50" >> custom_bootloader_keys.ini | ||
- name: Build all apps | ||
run: ./tools/sdk_builder.py --app_only |
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,60 @@ | ||
name: Build and deploy doc | ||
|
||
on: | ||
release: | ||
types: [created] | ||
workflow_dispatch: | ||
inputs: | ||
version_name: | ||
description: 'Version that will be used in version selector' | ||
required: true | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
container: | ||
image: wirepas/sdk-builder:v1.5 | ||
options: --user 0 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
- name: Generate doc | ||
run: make doxygen target_board=pca10056 | ||
- name: Set folder for release | ||
if: ${{ github.event_name == 'release' }} | ||
run: echo "FOLDER=${{ github.event.release.tag_name }}" >> $GITHUB_ENV | ||
- name: Set folder for manual triggering | ||
if: ${{ github.event_name == 'workflow_dispatch' }} | ||
run: echo "FOLDER=${{ github.event.inputs.version_name }}" >> $GITHUB_ENV | ||
- name: Deploy doc | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./build/html | ||
destination_dir: ${{ env.FOLDER }} | ||
- name: Duplicate to latest folder too | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./build/html | ||
destination_dir: 'latest' | ||
- name: Checkout gh-pages branch | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: 'gh-pages' | ||
path: 'gh-pages' | ||
- name: Add new version | ||
run: sed -i "/^'latest'/i '${{ env.FOLDER }}'," gh-pages/select_version.js | ||
- name: Publish change | ||
uses: EndBug/add-and-commit@v5 | ||
with: | ||
add: select_version.js | ||
author_name: GH Action build_doc | ||
author_email: [email protected] | ||
branch: gh-pages | ||
cwd: 'gh-pages' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |