-
Notifications
You must be signed in to change notification settings - Fork 3
139 lines (117 loc) · 3.84 KB
/
c-cpp.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
133
134
135
136
137
138
139
name: CI/CD
on:
pull_request:
push:
branches:
- main # Change this to the branch you want to trigger the workflow on
jobs:
pi-cross-compile:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: recursive
- name: Build for Raspberry Pi
run: |
./cross_compile_ecs_pi_release.sh
echo "Checking to make sure executable is actually ARM"
file build-pi/ecs_pi | tee log.txt
grep "ARM" log.txt # check to make sure "ARM" appears in output of file command
echo "Build successful!"
echo "Not testing, not possible with Docker"
working-directory: ${{ github.workspace }}
- name: Upload Pi artifacts
uses: actions/upload-artifact@v2
with:
name: pi-artifacts
path: build-pi/ecs_pi
sim-windows:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: recursive
- name: Install CMake on Windows
run: |
choco install -y cmake
$env:Path += ';C:\Program Files\CMake\bin'
- name: Build build-sim for Windows
run: |
cmake -S . -B build
cmake --build build --target ecs_sim
working-directory: ${{ github.workspace }}
- name: Build and run unit tests
run: |
cmake --build build --target all_tests
build/catch_tests/Debug/all_tests # yeah fucking cringe, the random ass Debug folder
working-directory: ${{ github.workspace }}
sim-mac:
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: recursive
- name: Install CMake on Mac
run: |
brew install cmake
export PATH="/usr/local/bin:$PATH"
- name: Build build-sim for Mac
run: |
cmake -S . -B build
cmake --build build --target ecs_sim
working-directory: ${{ github.workspace }}
- name: Build and run unit tests
run: |
cmake --build build --target all_tests
build/catch_tests/all_tests
working-directory: ${{ github.workspace }}
sim-linux-clang:
runs-on: ubuntu-latest
container: silkeh/clang
steps:
- name: Install dependencies and CMake on Linux
run: |
apt-get update -y
apt-get install -y cmake
apt-get install -y git # this moronic container doesnt have git with submodules
working-directory: ${{ github.workspace }}
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: recursive
- name: Build ecs_sim with Clang on Linux
run: |
cmake -S . -B build
cmake --build build --target ecs_sim
working-directory: ${{ github.workspace }}
- name: Build and run unit tests
run: |
cmake --build build --target all_tests
build/catch_tests/all_tests
working-directory: ${{ github.workspace }}
sim-linux-gcc:
runs-on: ubuntu-latest
container: gcc
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: recursive
- name: Install dependencies and CMake on Linux
run: |
apt-get update -y
apt-get install -y cmake
working-directory: ${{ github.workspace }}
- name: Build ecs_sim with GCC on Linux
run: |
cmake -S . -B build
cmake --build build --target ecs_sim
working-directory: ${{ github.workspace }}
- name: Build and run unit tests
run: |
cmake --build build --target all_tests
build/catch_tests/all_tests
working-directory: ${{ github.workspace }}