summaryrefslogtreecommitdiff
path: root/.github/workflows/sdl_core_github_ci.yml
blob: dcb9a5af074a32992ab646032d21447280a60de3 (plain)
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
name: GitHub Actions Demo
on: [push]
jobs:
  build:
    runs-on: ubuntu-20.04
    steps:
    - uses: actions/checkout@v2
    - name: submodules
      run: git -C ${{ github.workspace }} submodule update --init --recursive
    # install dependencies
    - name: install-dependencies
      run: sudo apt-get update && sudo apt-get install libssl-dev libbluetooth3 libbluetooth-dev libudev-dev cmake html2text lcov git cmake automake1.11 build-essential libavahi-client-dev sqlite3 libsqlite3-dev libgtest-dev bluez-tools libpulse-dev libusb-1.0.0-dev cppcheck python3-pip python3-setuptools && sudo apt-get install -f clang-format-6.0
    - name: Setup cmake
      uses: jwlawson/actions-setup-cmake@v1.8
      with:
        cmake-version: '3.16.3'
    # build project
    - name: mkdir-and-cd
      run: cd ${{ github.workspace }} &&  mkdir /core_3rd_party && cd ../ && mkdir build && cd build
   - name: Cache 3rd Party
      id: core-3rd-party
      uses: actions/cache@v2
      with:
        path: /core_3rd_party
        key: ${{ runner.os }}-core-3rd-party
    - name: cmake
      run: cmake ../sdl_core -DBUILD_TESTS=ON
    - name: build
      run: make install-3rd_party && make -j `nproc` install && sudo ldconfig
    # run tests
    - name: run test 1
      run: make test