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
name: CI
on: [pull_request]
jobs:
build:
runs-on: self-hosted
steps:
- name: build
run: echo "Placeholder for old CI scripts"
check_copyright_and_style:
name: check copyright and style
runs-on: self-hosted
steps:
- name: clone repository
uses: actions/checkout@v2
with:
token: ${{ secrets.GitHub_PAT }}
fetch-depth: 0
submodules: recursive
- name: Copyright notice check
run: config/license_header_check.sh --ci --check-only
- name: Style checking
run: ./config/style_check_hook.sh --last
build_rt1051_binary:
name: build rt1051 binary
needs:
- check_copyright_and_style
runs-on: self-hosted
steps:
- name: clone repository
uses: actions/checkout@v2
with:
token: ${{ secrets.GitHub_PAT }}
submodules: recursive
- name: Build for RT1051
run: |
./configure.sh rt1051 Release && \
pushd build-rt1051-Release && \
export JOBS=${JOBS:-`nproc`} && \
echo "JOBS=${JOBS}" && \
make -j ${JOBS} && \
popd && \
uptime
build_linux_binary_and_run_tests:
name: build linux binary and run tests
needs:
- check_copyright_and_style
runs-on: self-hosted
steps:
- name: clone repository
uses: actions/checkout@v2
with:
token: ${{ secrets.GitHub_PAT }}
submodules: recursive
- name: build linux binary
run: |
./configure.sh linux Debug && \
pushd build-linux-Debug && \
export JOBS=${JOBS:-`nproc`} && \
echo "JOBS=${JOBS}" && \
make -j ${JOBS} && \
popd
- name: Check for statics
run: ./tools/find_global_data.py build-linux-Debug/PurePhone.elf
- name: run unit tests
run: |
pushd build-linux-Debug && \
export JOBS=${JOBS:-`nproc`} && \
echo "JOBS=${JOBS}" && \
make -j ${JOBS} check && \
popd
- name: start emulator
run: |
./run_emulator_on_filesystem_image.sh 2>&1 > emulator.log &
echo $! > emulator.pid
- name: run tests
run: pytest ./pytest -rP --port=simulator --timeout=20 -m 'not rt1051'
working-directory: test
- name: kill emulator
run: |
kill $(cat emulator.pid)
rm emulator.pid
if: always()
- name: print emulator logs
run: cat emulator.log
if: always()