-
Notifications
You must be signed in to change notification settings - Fork 18
94 lines (73 loc) · 2.15 KB
/
Copy pathci.yml
File metadata and controls
94 lines (73 loc) · 2.15 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
82
83
84
85
86
87
88
89
90
91
92
93
94
name: CI
on: [push, pull_request]
jobs:
build:
name: ${{ matrix.toolchain.name }}
runs-on: ${{ matrix.toolchain.os }}
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
toolchain:
- name: Linux Clang
os: ubuntu-24.04
cmake_args: -DCMAKE_C_COMPILER=clang
- name: Linux GCC
os: ubuntu-24.04
- name: macOS ARM
os: macos-14
- name: macOS Intel
os: macos-15-intel
- name: MinGW
os: windows-2022
cmake_args: -G "MinGW Makefiles"
- name: MSVC 32-bit
os: windows-2022
cmake_args: -A Win32
- name: MSVC 64-bit
os: windows-2022
steps:
- uses: actions/checkout@v4
- name: Install Linux Dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update && sudo apt-get install libusb-1.0-0-dev
- name: Install Windows Dependencies
if: runner.os == 'Windows'
run: |
LIBUSB_VERSION=1.0.23
LIBUSB_PACKAGE=libusb-$LIBUSB_VERSION.7z
aria2c -q https://github.com/libusb/libusb/releases/download/v$LIBUSB_VERSION/$LIBUSB_PACKAGE
7z x $LIBUSB_PACKAGE -olibusb
- name: Install MinGW
if: startsWith(matrix.toolchain.name, 'MinGW')
uses: msys2/setup-msys2@v2
- name: Configure
run: |
cmake -B build ${{ matrix.toolchain.cmake_args }} .
- name: Get Number of CPU Cores
uses: SimenB/github-actions-cpu-cores@v2
id: cpu-cores
- name: Build
run: |
export MAKEFLAGS=--keep-going
cmake --build build --config Release --parallel ${{ steps.cpu-cores.outputs.count }}
- name: Install Linux/macOS
if: runner.os != 'Windows'
run: |
sudo cmake --install build
- name: Test POSIX
if: ${{ !startsWith(matrix.toolchain.name, 'MSVC') }}
run: |
build/fobos_devinfo
- name: Test MSVC
if: startsWith(matrix.toolchain.name, 'MSVC')
run: |
build/Release/fobos_devinfo.exe
- name: List Build Directory
if: always()
run: |
git status
ls -lR build