This repository has been archived by the owner on Jul 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 51
60 lines (60 loc) · 1.72 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: CI
on: [push, pull_request]
jobs:
check-style:
runs-on: ubuntu-latest
#environment: development
steps:
- uses: actions/checkout@v2
- name: Run clang-format style check.
uses: jidicula/[email protected]
with:
clang-format-version: '13'
check-path: 'nn-hal'
fetch-code:
needs: check-style
runs-on: self-hosted
env:
ROOT_DIR: /srv/workspace
REPO_NAME: intel-nnhal-dev
steps:
- name: Clone repo.
run: |
echo ${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}
cd ${ROOT_DIR}/src/third_party/
rm -rf ${REPO_NAME}
git clone ${{ github.server_url }}/${{ github.repository }} ${REPO_NAME}
cd ${REPO_NAME}
- name: Fetch push code.
if: github.event_name == 'push'
run: |
cd ${ROOT_DIR}/src/third_party/${REPO_NAME}/
git checkout ${{ github.sha }}
cp -r ci/* ${ROOT_DIR}/src/
- name: Fetch pull request code.
if: github.event_name == 'pull_request'
run: |
cd ${ROOT_DIR}/src/third_party/${REPO_NAME}/
git fetch origin pull/${{ github.event.number }}/head:${{ github.head_ref }}
git checkout ${{ github.head_ref }}
cp -r ci/* ${ROOT_DIR}/src/
build-package:
needs: fetch-code
runs-on: self-hosted
env:
ROOT_DIR: /srv/workspace
steps:
- name: Build and deploy nn-hal.
run: |
cd ${ROOT_DIR}/src/
sh build-test.sh "build"
test-functional:
needs: build-package
runs-on: self-hosted
env:
ROOT_DIR: /srv/workspace
steps:
- name: Run functional tests for nn-hal.
run: |
cd ${ROOT_DIR}/src/
sh build-test.sh "functional"