-
Notifications
You must be signed in to change notification settings - Fork 0
123 lines (101 loc) · 2.91 KB
/
build_master_branch.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
name: Linux & Windows & Mac builds check on master branch push event
on:
push:
branches: [ "master" ]
permissions:
issues: write
pull-requests: write
checks: write
jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install packages
run: sudo apt -y install git g++ cmake libsqlite3-dev gcovr libjpeg-dev valgrind lynx
- name: Checkout aquamarine repo
uses: actions/checkout@v3
with:
repository: MaksymT17/aquamarine
ref: ${{ github.head_ref }}
path: aquamarine
- name: Build artifacts with Cmake
run: |
cd aquamarine &&
./build.sh
- name: Run unit test
run: |
cd aquamarine/unit_tests &&
./prepare_build.sh &&
cd build &&
make -j8 &&
./aquamarine_ut --gtest_output="xml" &&
cmake --build . --config Debug --target coverage_aquamarine_ut -- -j 4 &&
lynx -dump ./coverage_aquamarine_ut/index.html
- name: Publish Results
uses: EnricoMi/publish-unit-test-result-action@v1
with:
check_name: Unit test results
files: "**/test_detail.xml"
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: aquamarine_build_Linux
path: aquamarine/build/
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Checkout aquamarine repo
uses: actions/checkout@v3
with:
repository: MaksymT17/aquamarine
ref: ${{ github.head_ref }}
path: aquamarine
- name: Build artifacts with Cmake
run: |
cd aquamarine &&
echo "removing existing build folder..."
rm -rf build/ &&
mkdir build &&
echo "preparing new build with cmake..." &&
cd build/ &&
cmake .. &&
cmake --build . &&
echo "Build complete!"
shell: bash
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: aquamarine_build_Windows
path: aquamarine/build/
build-macos:
runs-on: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install dependencies
run: |
brew install git gcc cmake sqlite3 gcovr jpeg
- name: Checkout aquamarine repo
uses: actions/checkout@v3
with:
repository: MaksymT17/aquamarine
ref: ${{ github.head_ref }}
path: aquamarine
- name: Build artifacts with Cmake
run: |
cd aquamarine &&
./build.sh
- name: Run unit test
run: |
cd aquamarine/unit_tests &&
./prepare_build.sh &&
cd build &&
make -j2 &&
./aquamarine_ut
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: aquamarine_build_MacOS
path: aquamarine/build/