-
Notifications
You must be signed in to change notification settings - Fork 7
76 lines (64 loc) · 2.48 KB
/
main.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
name: Tests
on:
pull_request:
branches: [main]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
run_tests:
name: ${{ matrix.os }}, ${{ matrix.build_type }}, ${{ matrix.file_memory }}, ${{ matrix.config.cxx }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-20.04, ubuntu-22.04]
file_memory: ["Dictionary"]
build_type: ["Debug", "Release"]
config:
- { cc: "gcc", cxx: "g++" }
steps:
- name: Clone repositories
run: |
git clone https://github.com/ostis-ai/ostis-web-platform
cd ostis-web-platform
git checkout feature/component_manager
git submodule update --init --recursive
cd scripts
./prepare.sh no_build_sc_machine
cd ../sc-machine
git checkout component_manager
cd sc-tools/sc-component-manager
git fetch origin pull/${{ github.event.number }}/head:pr
git checkout pr
- name: Install dependencies (MacOS)
if: startswith(matrix.os, 'macos')
run: |
cd ostis-web-platform/sc-machine && scripts/install_deps_macOS.sh
pip3 install --user -r requirements.txt
- name: Install dependencies (Ubuntu)
if: startswith(matrix.os, 'ubuntu')
run: cd ostis-web-platform/sc-machine && scripts/install_deps_ubuntu.sh --dev
- name: Build all
run: cd ostis-web-platform/sc-machine/scripts && ./make_all.sh -m
- name: Restore build caches
uses: hendrikmuhs/ccache-action@v1.2
with:
key: ${{ github.job }}-${{ matrix.os }}-${{ matrix.config.cxx }}-${{ matrix.build_type }}-${{ matrix.file_memory }}
- name: Build
id: run_cmake
env:
CC: ${{ matrix.config.cc }}
CXX: ${{ matrix.config.cxx }}
FILE_MEMORY: ${{ matrix.file_memory }}
BUILD_TYPE: ${{ matrix.build_type }}
COVERAGE: OFF
SANITIZER_TYPE: none
run: cd ostis-web-platform/sc-machine && scripts/ci/make-tests.sh
- name: Run tests
id: run_tests
run: cd ostis-web-platform/sc-machine && scripts/ci/run-tests.sh
- name: Run sc-component-manager
id: run_sc_component_manager
run: |
cd ostis-web-platform/sc-machine/scripts
./run_sc_component_manager.sh -c ../../ostis-web-platform.ini -b ../../repo.path