-
Notifications
You must be signed in to change notification settings - Fork 1
68 lines (64 loc) · 2.04 KB
/
pull_request.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
name: Pull Request
on:
pull_request:
branches: [ main ]
types: [ opened, synchronize, reopened ]
env:
PHASE_VERSION: v0.3.0
PHASE_REPO: i3drobotics/phase
jobs:
# Build / test
build-ubuntu:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04]
python-version: ['3.10']
steps:
- uses: actions/checkout@v2
# Setup python
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
# Install Phase
- name: Download Phase
shell: bash
run: |
curl --output phase-${{ env.PHASE_VERSION }}-${{ matrix.os }}-x86_64.tar.gz -L https://github.com/i3drobotics/phase/releases/download/${{ env.PHASE_VERSION }}/phase-${{ env.PHASE_VERSION }}-${{ matrix.os }}-x86_64.tar.gz
- name: Install Phase
shell: bash
run: |
mkdir phase_install
tar -xf phase-${{ env.PHASE_VERSION }}-${{ matrix.os }}-x86_64.tar.gz -C ./phase_install
sudo apt update
sudo apt install -y libavcodec-dev libavformat-dev libswscale-dev
sudo apt install -y libgl-dev liblapack-dev libblas-dev libgtk2.0-dev
sudo apt install -y libgstreamer1.0-0 libgstreamer-plugins-base1.0-0
sudo apt install -y zlib1g libstdc++6
sudo apt install -y libc6 libgcc1
sudo apt install -y patchelf
# Install python packages
- name: Python requirements
shell: bash
run: |
pip install -r requirements.txt
# Build
- name: Build
shell: bash
run: |
mkdir -p build && cd build
sudo apt-get update && cmake -DPhase_DIR="./phase_install/lib/cmake" ..
make -j$(nproc)
# Unit Test
- name: Unit Test
shell: bash
run: |
cd build/lib
python3 -m pytest ../../test/unit/
# Performance Test
- name: Perf Test
shell: bash
run: |
cd build/lib
python3 -m pytest ../../test/perf/