-
Notifications
You must be signed in to change notification settings - Fork 0
132 lines (110 loc) · 3.57 KB
/
build-and-test-ubuntu.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
124
125
126
127
128
129
130
131
132
name: build and test ubuntu
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build-demos:
runs-on: ubuntu-latest
steps:
# Step 1: Checkout the repository
- name: Checkout repository
uses: actions/checkout@v3
# Step 2: Move to the parent directory and fetch dependencies
- name: Fetch dependencies
run: |
cd ..
git clone https://github.com/razterizer/Core.git
git clone https://github.com/razterizer/Termin8or.git
git clone https://github.com/razterizer/AudioLibSwitcher_OpenAL.git --recurse-submodules
git clone https://github.com/razterizer/TrainOfThought.git
# Step 3: Install OpenAL
- name: Install OpenAL
run: sudo apt install libopenal-dev
# Step 4: Install libsndfile
- name: Install libsndfile
run: sudo apt install libsndfile-dev
# run: sudo apt install libsndfile1-dev
# Step 5: Change to the correct directory and build
- name: Build project
run: |
cd demos
./build_demo_1.sh
# ./build_demo_2.sh
./build_demo_3.sh
./build_demo_4.sh
./build_demo_5.sh
./build_demo_6.sh
./build_demo_7.sh
./build_demo_8.sh
./build_demo_9.sh
./build_demo_10.sh
continue-on-error: false # Ensure errors are not bypassed
build-unit-tests:
runs-on: ubuntu-latest
steps:
# Step 1: Checkout the repository
- name: Checkout repository
uses: actions/checkout@v3
# Step 2: Move to the parent directory and fetch dependencies
- name: Fetch dependencies
run: |
cd ..
git clone https://github.com/razterizer/Core.git
git clone https://github.com/razterizer/TrainOfThought.git
# Step 3: Change to the correct directory and build
- name: Build
run: |
cd Tests
./build_unit_tests.sh
continue-on-error: false # Ensure errors are not bypassed
# Step 4: Upload the built unit test binaries as artifacts
- name: Upload unit test binaries
uses: actions/upload-artifact@v3
with:
name: unit-test-artifacts
path: Tests/bin
run-unit-tests:
needs: build-unit-tests
runs-on: ubuntu-latest
steps:
# Step 1: Checkout the repository
- name: Checkout repository
uses: actions/checkout@v3
- name: List files
run: |
pwd
ls
# Step 2: Create the bin folder if it doesn't exist
- name: Create bin folder
run: mkdir -p Tests/bin
# Step 3: Download the artifacts from the previous job
- name: Download unit test binaries
uses: actions/download-artifact@v3
with:
name: unit-test-artifacts
path: Tests/bin
# Step 4: Run the unit tests
- name: Run unit tests
run: |
cd Tests
chmod ugo+x bin/unit_tests
./bin/unit_tests
continue-on-error: false # Ensure errors are not bypassed
static-analysis:
runs-on: ubuntu-latest
if: false # turn off for now.
steps:
# Checkout the 8Beat repository
- name: Checkout 8Beat repository
uses: actions/checkout@v3
# Install cppcheck
- name: Install cppcheck
run: sudo apt-get install cppcheck
# Run cppcheck on 8Beat headers
- name: Run cppcheck
run: |
cppcheck --enable=all --inconclusive --error-exitcode=1 .