Skip to content

Commit dfebe37

Browse files
committed
Compile the host tools in the different systems
1 parent d54dcd5 commit dfebe37

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed

.github/workflows/host_tools.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Host Tools
2+
3+
on:
4+
push:
5+
paths:
6+
- 'usbhostfs_pc/**'
7+
- '.github/workflows/host_tools.yml'
8+
pull_request:
9+
paths:
10+
- 'usbhostfs_pc/**'
11+
- '.github/workflows/host_tools.yml'
12+
repository_dispatch:
13+
types: [run_build]
14+
workflow_dispatch: {}
15+
16+
jobs:
17+
build:
18+
runs-on: ${{ matrix.os[0] }}
19+
strategy:
20+
matrix:
21+
os: [
22+
[macos-latest, arm64, bash],
23+
[macos-13, x86_64, bash],
24+
[ubuntu-latest, x86_64, bash],
25+
[windows-latest, x86_64, msys2]
26+
]
27+
debug: [all, debug]
28+
fail-fast: false
29+
defaults:
30+
run:
31+
shell: ${{ matrix.os[2] }} {0}
32+
33+
steps:
34+
- uses: actions/checkout@v4
35+
36+
- name: Install Ubuntu packages
37+
if: matrix.os[0] == 'ubuntu-latest'
38+
run: |
39+
sudo apt-get update
40+
sudo apt-get -y install libusb-1.0-0-dev gcc
41+
42+
- name: Install macOS packages
43+
if: startsWith(matrix.os[0], 'macos')
44+
run: |
45+
brew update
46+
brew install libusb gcc
47+
48+
- name: Install MSYS2 packages
49+
if: matrix.os[0] == 'windows-latest'
50+
uses: msys2/setup-msys2@v2
51+
with:
52+
msystem: MINGW32
53+
install: |
54+
base-devel git make
55+
mingw-w64-i686-libusb
56+
mingw-w64-i686-gcc
57+
update: true
58+
59+
- name: Compile tools
60+
run: |
61+
make --quiet -j $PROC_NR -C usbhostfs_pc ${{ matrix.debug }}

0 commit comments

Comments
 (0)