-
Notifications
You must be signed in to change notification settings - Fork 14
137 lines (113 loc) · 3.83 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# YAML schema for GitHub Actions:
# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions
#
# Helpful YAML parser to clarify YAML syntax:
# https://yaml-online-parser.appspot.com/
#
# This workflow uses actions that are not certified by GitHub. They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support documentation.
#
# This file contains the workflows that are run prior to merging a pull request.
name: CI
on:
push:
branches:
- 'develop'
- 'master'
pull_request:
branches:
- 'develop'
- 'master'
# Allow manually triggering of the workflow.
workflow_dispatch: {}
jobs:
build_tests_xcore:
name: Build tests (XCore)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: recursive
- name: Pull builder container
run: |
docker pull ghcr.io/xmos/xcore_builder:latest
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install numpy
- name: Build
run: |
mkdir ~/artifacts
docker run --rm -u $(id -u):$(id -g) -w /lib_xcore_math -v ${{ github.workspace }}:/lib_xcore_math -v ~/artifacts:/artifacts ghcr.io/xmos/xcore_builder:latest bash -l .github/scripts/build_tests_xcore.sh
- name: Save Unit Test Artifacts
uses: actions/upload-artifact@v2
with:
name: unit_tests
path: ~/artifacts
retention-days: 5
build_tests_x86:
name: Build & Run Tests (x86)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install numpy
- name: Build Tests
working-directory: ~
run: |
cmake -B build.x86 ${{ github.workspace }}
cmake --build build.x86
- name: "Run Tests: scalar_tests"
working-directory: ~
run: ./build.x86/test/scalar_tests/scalar_tests -v
- name: "Run Tests: vect_tests"
working-directory: ~
run: ./build.x86/test/vect_tests/vect_tests -v
- name: "Run Tests: bfp_tests"
working-directory: ~
run: ./build.x86/test/bfp_tests/bfp_tests -v
- name: "Run Tests: fft_tests"
working-directory: ~
run: ./build.x86/test/fft_tests/fft_tests -v
- name: "Run Tests: filter_tests"
working-directory: ~
run: ./build.x86/test/filter_tests/filter_tests -v
- name: "Run Tests: dct_tests"
working-directory: ~
run: ./build.x86/test/dct_tests/dct_tests -v
# Ultimately checks that module_build_info is correct enough to build (with xmake) a trivial app
# which uses this library.
build_legacy_app:
name: Build App (xmake)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: recursive
- name: Pull builder container
run: |
docker pull ghcr.io/xmos/xcore_builder:latest
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install numpy
- name: Build
run: |
docker run --rm -u $(id -u):$(id -g) -w /lib_xcore_math -v ${{ github.workspace }}:/lib_xcore_math ghcr.io/xmos/xcore_builder:latest bash -l .github/scripts/build_legacy.sh