-
Notifications
You must be signed in to change notification settings - Fork 8
54 lines (47 loc) · 1.65 KB
/
build-on-change-linux.yaml
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
name: Build framework on Linux
on:
# execute on every PR made targeting the branches bellow
pull_request:
branches:
- master
- develop # can be removed on master merge
paths: # we only include paths critical for building to avoid unnecessary runs
- src/**
- include/**
- scripts/cmake/**
- tests/**
- .github/workflows/**
# execute on every push made targeting the branches bellow
push:
branches:
- master
- develop # can be removed on master merge
paths: # we only include paths critical for building to avoid unnecessary runs
- src/**
- include/**
- scripts/cmake/**
- .github/workflows/**
jobs:
build-linux:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Docker Build
run: |
docker build -f docker/Dockerfile.linux --target unit_test -t unit_test .
docker build -f docker/Dockerfile.linux --target runtime_test -t runtime_test .
- name: Unit test execution
if: github.event_name == 'pull_request'
run: |
docker run -v ${{ github.workspace }}:/app/framework --name unit_test unit_test
- name: Archive test results
if: github.event_name == 'pull_request' && (success() || failure())
uses: actions/upload-artifact@v4
with:
name: test-report
path: ${{ github.workspace }}/build/Testing/Temporary/LastTest.log
- name: Runtime test execution
if: github.event_name == 'pull_request'
run: |
docker run --rm --name runtime_test runtime_test