-
Notifications
You must be signed in to change notification settings - Fork 25
81 lines (76 loc) · 2.29 KB
/
Copy pathubuntu.yml
File metadata and controls
81 lines (76 loc) · 2.29 KB
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
name: Ubuntu
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
PYTHON_VERSION: '3.12'
jobs:
build-ubuntu:
strategy:
matrix:
include:
# Ubuntu 24.04 + gcc-14
- name: "Ubuntu 24.04 + gcc-14"
os: ubuntu-24.04
compiler: gcc
version: "14"
# Ubuntu 24.04 + gcc-13
- name: "Ubuntu 24.04 + gcc-13"
os: ubuntu-24.04
compiler: gcc
version: "13"
# Ubuntu 24.04 + gcc-10
- name: "Ubuntu 24.04 + gcc-12"
os: ubuntu-24.04
compiler: gcc
version: "12"
# Ubuntu 24.04 + clang-18
- name: "Ubuntu 24.04 + clang-18"
os: ubuntu-24.04
compiler: clang
version: "18"
# Ubuntu 24.04 + clang-17
- name: "Ubuntu 24.04 + clang-17"
os: ubuntu-24.04
compiler: clang
version: "17"
# Ubuntu 24.04 + clang-16
- name: "Ubuntu 24.04 + clang-16"
os: ubuntu-24.04
compiler: clang
version: "16"
runs-on: ${{ matrix.os }}
name: 🐧 Build - ${{ matrix.name }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install packages
run: sudo apt-get install -yq python3-setuptools
- name: Configure Compiler
run: |
if [ "${{ matrix.compiler }}" = "gcc" ]; then
echo "CC=gcc-${{ matrix.version }}" >> $GITHUB_ENV
echo "CXX=g++-${{ matrix.version }}" >> $GITHUB_ENV
else
echo "CC=clang-${{ matrix.version }}" >> $GITHUB_ENV
echo "CXX=clang++-${{ matrix.version }}" >> $GITHUB_ENV
fi
- name: Configure Build
run: mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release ..
- name: Build
run: cd build && make
- name: Run Unit Test
run: /home/runner/work/baba-is-auto/baba-is-auto/build/bin/UnitTests
- name: Run Python Test
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install .
python -m pytest Tests/PythonTests/