-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (69 loc) · 2.25 KB
/
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
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
name: Linux
on:
push:
branches:
- main
paths:
- "uvio/**"
- "tests/**"
- ".github/workflows/linux.yaml"
pull_request:
branches:
- main
paths:
- "uvio/**"
jobs:
build_linux:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
config:
- { compiler: gcc, version: 13, build_type: release, cxx: g++ }
- { compiler: clang, version: 17, build_type: release, cxx: clang++ }
container:
image: ${{ matrix.config.compiler == 'clang' && 'teeks99/clang-ubuntu' || matrix.config.compiler }}:${{ matrix.config.version }}
name: "${{ matrix.config.compiler }} ${{ matrix.config.version }} (C++20, ${{ matrix.config.build_type }})"
steps:
- name: Checkout
uses: actions/checkout@main
- name: Setup dependencies
run: |
apt-get update
apt-get install -y curl git pkg-config ccache
apt-get install -y libuv1-dev binutils-dev
- name: Setup Python
if: matrix.config.compiler == 'clang'
uses: actions/setup-python@main
with:
python-version: '3.12'
- name: Install Meson/Ninja(apt)
if: matrix.config.compiler == 'gcc'
run: |
apt-get install -y ninja-build meson
- name: Install Meson/Ninja(pip)
if: matrix.config.compiler == 'clang'
run: |
python3 -m pip install meson ninja
# - name: Install
# run: |
# CMAKE_VERSION="3.24.2"
# curl -sSL https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-x86_64.sh -o install-cmake.sh
# chmod +x install-cmake.sh
# ./install-cmake.sh --prefix=/usr/local --skip-license
- name: Build(clang)
if: matrix.config.compiler == 'clang'
run: |
meson setup build -Dbuildtype=${{ matrix.config.build_type }} --cross-file cross-clang.ini
meson compile -C build
- name: Build(gcc)
if: matrix.config.compiler == 'gcc'
run: |
meson setup build -Dbuildtype=${{ matrix.config.build_type }}
meson compile -C build
- name: Install
run: |
meson install -C build