Repository navigation
62 lines (54 loc) · 1.39 KB
/
Copy pathlinux.yml
File metadata and controls
62 lines (54 loc) · 1.39 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: linux
on:
push:
branches:
- master
tags:
- '**'
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
build:
name: ${{ matrix.arch }} | ${{ matrix.compiler }}
runs-on: ${{ matrix.runner }}
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
compiler:
- gcc
- clang
arch:
- x64
- arm64
include:
- arch: x64
runner: ubuntu-latest
- arch: arm64
runner: ubuntu-24.04-arm
env:
CC: ${{ matrix.compiler }}
steps:
- uses: actions/checkout@v6
- name: setup prerequisites
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends libusb-1.0-0-dev pkg-config
- name: build
run: make -j"$(nproc)"
- name: build example
run: make example
- name: run listdevs
run: ./listdevs
- name: Upload artifacts
uses: actions/upload-artifact@v7
with:
name: libusbgetdev-linux-${{ matrix.arch }}-${{ matrix.compiler }}
if-no-files-found: error
path: |
build/libusbgetdev.so
build/libusbgetdev.a
build/libusbgetdev.pc
listdevs