forked from sensestage/hidapi
-
Notifications
You must be signed in to change notification settings - Fork 15
62 lines (53 loc) · 1.77 KB
/
Copy pathbuild_linux.yml
File metadata and controls
62 lines (53 loc) · 1.77 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
name: Build Linux
on:
workflow_call:
jobs:
build-linux:
runs-on: ubuntu-${{ matrix.os-version }}
strategy:
fail-fast: false
matrix:
include:
- job-name: ""
os-version: "22.04"
c-compiler: "gcc-11"
cxx-compiler: "g++-11"
- job-name: ""
os-version: "24.04"
c-compiler: "gcc-13"
cxx-compiler: "g++-13"
- job-name: ""
os-version: "22.04"
c-compiler: "clang-14"
cxx-compiler: "clang++-14"
- job-name: ""
os-version: "24.04"
c-compiler: "clang-18"
cxx-compiler: "clang++-18"
name: Ubuntu ${{ matrix.os-version }} ${{ matrix.c-compiler }} ${{ matrix.job-name }}
env:
BUILD_PATH: ${{ github.workspace }}/build
CC: ${{ matrix.c-compiler }}
CXX: ${{ matrix.cxx-compiler }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: install dependencies
run: |
sudo apt-get update
sudo apt-get install --yes build-essential cmake libudev-dev
# install appropriate clang/gcc compilers
if [[ "$CC" =~ clang-[1-9] ]]; then
sudo apt-get install -y $CC # package names are clang-X
sudo apt-get install -y libc++-${CC##clang-}-dev libc++abi-${CC##clang-}-dev # install additional libraries; package names are libc++-X-dev and libc++abi-X-dev
elif [[ "$CC" =~ gcc-[1-9] ]]; then
sudo apt-get install -y $CXX # package names are g++-X
fi
- name: configure
run: |
mkdir $BUILD_PATH && cd $BUILD_PATH
cmake ..
- name: build
run: |
cmake --build $BUILD_PATH --target hidapi