forked from JMPZ11/openpilot
-
Notifications
You must be signed in to change notification settings - Fork 0
132 lines (114 loc) · 5.69 KB
/
buildable-test.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
# This is a basic workflow to help you get started with Actions
name: Lint and Build
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the 075-kegman-lqr branch
on:
push:
branches:
- develop # Support wildcard matching
- feature/* # Support wildcard matching
- release
- comma2_Eon-final
pull_request:
types:
- synchronize
- opened
- edited
- reopened
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
lint:
# This workflow contains a single job called "build"
name: Lint
if: github.repository == 'jc01rho-openpilot-BoltEV2019-KoKr/boltpilot'
runs-on: ubuntu-20.04
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v3
- name: Python Linter
uses: ricardochaves/python-lint@v1.4.0
with:
python-root-list: selfdrive/car/gm/** selfdrive/car/*.py selfdrive/controls/*.py
use-pylint: true
use-pycodestyle: false
use-flake8: true
use-black: false
use-mypy: false
use-isort: false
extra-pylint-options: --disable=C,R,E0401,W0612,W0101,W0611,W0613,W0511,W0311,W0954,W0703,W0621,W0201,W0109,W0235,W0603
extra-flake8-options: --select=F21,F822,F823,F831,F811,F812,E999
- name: Python Linter
uses: ricardochaves/python-lint@v1.4.0
with:
python-root-list: selfdrive/controls/lib/*.py
use-pylint: true
use-pycodestyle: false
use-flake8: true
use-black: false
use-mypy: false
use-isort: false
extra-pylint-options: --disable=C,R,E0401,W0612,W0101,W0611,W0613,W0511,W0311,W0954,W0703,W0621,W0201,W0109,W0235,W0603,W0106
extra-flake8-options: --select=F21,F822,F823,F831,F811,F812,E999
build:
name: Build
# The type of runner that the job will run on
runs-on: ubuntu-20.04
needs: lint
if: github.repository == 'jc01rho-openpilot-BoltEV2019-KoKr/boltpilot'
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Get number of CPU cores
uses: SimenB/github-actions-cpu-cores@v1
id: cpu-cores
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Get current date
id: date
run: echo "::set-output name=date::$(expr $(date +'%d') % 5 )"
- uses: actions/checkout@v3
- name: Set outputs
id: vars
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
- name: Cache apt binaries
uses: actions/cache@v3
with:
path: |
/home/runner/.cache/apt
# !/var/cache/apt/archives/partial
# !/var/cache/apt/archives/lock
# !/var/lib/apt/lists
# !/var/lib/apt/lists/lock
key: ${{ runner.os }}-apt-cache-${{ steps.vars.outputs.sha_short }}
restore-keys: |
${{ runner.os }}-apt-cache
- name: Cache scons binaries
uses: actions/cache@v3
with:
path: |
/tmp/scons_cache
key: ${{ runner.os }}-scons-cache-${{ steps.vars.outputs.sha_short }}
restore-keys: |
${{ runner.os }}-scons-cache
- uses: actions/cache@v3
name: Cache pip binaries
with:
path: /home/runner/.cache/pip
key: ${{ runner.os }}-pip-cache-${{ steps.vars.outputs.sha_short }}
restore-keys: |
${{ runner.os }}-pip-cache
- name: disable-man-db
run : |
sudo mv /usr/bin/mandb /usr/bin/mandb-OFF
sudo cp -p /bin/true /usr/bin/mandb
sudo rm -r /var/cache/man
- name: apt-update
run : sudo apt update -y ;
- name: mkdir
run : mkdir -p /home/runner/.cache/apt/archives/partial
- name: apt-install #libyuv-dev cythonize 누락함
run : sudo apt install -y -o=dir::cache=/home/runner/.cache/apt python3-testresources pip capnproto clang libcapnp-dev libzmq3-dev opencl-headers libeigen3-dev ocl-icd-opencl-dev gcc-arm-none-eabi binutils-arm-none-eabi libnewlib-arm-none-eabi libusb-1.0-0* qtchooser qt5ct sudo apt qt5-qmake qt5-assistant qt5-qmake-bin qt5-gtk2-platformtheme qt5-qmltooling-plugins qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools libcurl4-openssl-dev libavcodec-dev openssl libavformat-dev sudo apt libjpeg-dev libssl-dev libbz2-dev libsystemd-dev libswscale-dev unzip libqt5multimedia5 libqt5multimedia5-plugins qt5-qmltooling-plugins libqt5multimedia* libqt53dcore5 libqt53dcore5 sudo apt libqt53dextras5 libqt53dinput5 qtbase5-private-dev qtmultimedia5-dev qtpositioning5-dev libqt5location5 libgsl-dev libqt5location5* ffmpeg libqt5widgets5 libqt5gui5 libqt5dbus5 sudo apt libqt5network5 libqt5core5a qtlocation5-dev qtlocation5-dev qtpositioning5-dev qml-module-qtquick2 qml-module-qtpositioning qml-module-qtgraphicaleffects qml-module-qtquick-layouts sudo apt qml-module-qtquick-controls libffmpeg-nvenc-dev cmake libomxil-bellagio0 libomxil-bellagio-dev autoconf automake build-essential libass-dev libfreetype6-dev libgpac-dev libsdl1.2-dev libtheora-dev libtool libva-dev libvdpau-dev libvorbis-dev libx11-dev libxext-dev libxfixes-dev pkg-config texi2html zlib1g-dev
- name: apt-chmod #libyuv-dev cythonize 누락함
run : sudo chmod 777 -R /home/runner/.cache/apt/
- name: pip-install
run : pip install --upgrade setuptools pip & pip install scons sympy cython numpy pycapnp cffi zmq smbus2 casadi pycryptodome future-fstrings
- name: scons-build
run : scons -j${{ steps.cpu-cores.outputs.count }}