Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move Github action for keyword to the root #7

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 79 additions & 0 deletions .github/workflows/avh.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# This is a basic workflow to help you get started with Actions on CMSIS projects

name: ATS keyword workflow

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main, test-actions ]
pull_request:
branches: [ main, test-actions ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "ci_build_and_test_ats_keyword"
ci_build_and_test_ats_keyword:
# The type of runner that the job will run on
#runs-on: ubuntu-latest
runs-on: self-hosted

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v2

# Cleanup of previous environment
- name: Cleanup of self hosted runner environment
run : |
rm -rf build
rm -rf venv
rm -rf lib/*
git clean -xfd
git reset --hard

# Boostrap the environment
- name: Bootstrap environment
run : |
./bootstrap.sh

# Setup python environment
- name: Setup Python environment
run: |
python3 -m venv venv
source venv/bin/activate
pip3 install click imgtool pytest

# Execute CMSIS Build command to build the executable for a Cortex-M55 using Arm Compiler
- name: Build kws application
run : |
source venv/bin/activate
./build.sh kws

# Execute CMSIS Build command to build the executable for a Cortex-M55 using Arm Compiler
- name: Build blinky application
run : |
source venv/bin/activate
./build.sh blinky

- name: Archive artifacts
uses: actions/upload-artifact@v2
with:
name: binaries
path: |
${{ github.workspace }}/build/bootloader/bl2.axf
${{ github.workspace }}/build/secure_partition/tfm_s.axf
${{ github.workspace }}/build/blinky/tfm_ns.axf
${{ github.workspace }}/build/kws/tfm_ns.axf

- name: Run blinky integration test
run : |
source venv/bin/activate
pytest -s blinky/tests

- name: Run kws integration test
run : |
source venv/bin/activate
pytest -s kws/tests