From e9da86aa3bc84822826852cce0ccb47460b50268 Mon Sep 17 00:00:00 2001
From: Chase Qi <chase.qi@linaro.org>
Date: Wed, 16 Jun 2021 14:10:51 +0800
Subject: [PATCH] ci/av96: setup build, test and report CI pipeline

Signed-off-by: Chase Qi <chase.qi@linaro.org>
---
 .ostc-ci/gitlab-ci.yml              | 16 ++++++++++++++++
 .ostc-ci/machines-and-flavours.yaml |  4 +++-
 2 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/.ostc-ci/gitlab-ci.yml b/.ostc-ci/gitlab-ci.yml
index 658e59a8..7d71cb8c 100644
--- a/.ostc-ci/gitlab-ci.yml
+++ b/.ostc-ci/gitlab-ci.yml
@@ -18,6 +18,7 @@ stages:
   - compliance
   - build
   - test
+  - report
   - deploy
 
 include:
@@ -27,6 +28,8 @@ include:
     - 'reuse.yaml'
  - project: 'OSTC/OHOS/manifest'
    file: '.ostc-ci/build-generic.yaml'
+ - project: 'OSTC/OHOS/manifest'
+   file: '.ostc-ci/test-generic.yaml'
 # By default, the CI pipeline is invoked using an explicit git ref (branch
 # name) in the manifest. This include is a HACK to allow the CI pipeline to get
 # changes to the machine-and-flavours.yaml picked up directly from the incoming
@@ -74,3 +77,16 @@ aggregate-docs:
         - meta-*/**/*
         - .ostc-ci/*.yml
     - if: '$CI_COMMIT_TAG'
+
+lava-linux-avenger96:
+  needs: [linux-stm32mp1-av96]
+  stage: test
+  extends: .lava-test
+  variables:
+    CI_LAVA_JOB_DEFINITION: "https://git.ostc-eu.org/OSTC/infrastructure/lava/lava-config/-/raw/master/lava.ostc-eu.org/job-definitions/ci/avenger96-acts.yaml"
+    CI_BUILD_JOB_NAME: linux-stm32mp1-av96
+    CI_REPORT_JOB_NAME: lava-report
+
+lava-report:
+  needs: [lava-linux-avenger96]
+  extends: .lava-report
diff --git a/.ostc-ci/machines-and-flavours.yaml b/.ostc-ci/machines-and-flavours.yaml
index 7fcf9925..9bb3cbd2 100644
--- a/.ostc-ci/machines-and-flavours.yaml
+++ b/.ostc-ci/machines-and-flavours.yaml
@@ -47,8 +47,10 @@ linux-seco-imx8mm-c61:
     OHOS_BB_LOCAL_CONF_ACCEPT_FSL_EULA: 1
 
 linux-stm32mp1-av96:
-  extends: .build-linux
+  extends: .build-image
   variables:
+    OHOS_BUILD_FLAVOUR: linux
+    OHOS_RECIPE_NAME: allscenarios-image-base-tests
     MACHINE: stm32mp1-av96
 
 linux-raspberrypi4-64:
-- 
GitLab