Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 76 additions & 0 deletions .github/workflows/host_tools.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Host Tools

on:
push:
paths:
- 'usbhostfs_pc/**'
- '.github/workflows/host_tools.yml'
pull_request:
paths:
- 'usbhostfs_pc/**'
- '.github/workflows/host_tools.yml'
repository_dispatch:
types: [run_build]
workflow_dispatch: {}

jobs:
build:
runs-on: ${{ matrix.os[0] }}
strategy:
matrix:
os: [
[macos-latest, arm64, bash],
[macos-13, x86_64, bash],
[ubuntu-latest, x86_64, bash]
]
fail-fast: false
defaults:
run:
shell: ${{ matrix.os[2] }} {0}

steps:
- uses: actions/checkout@v4

- name: Install Ubuntu packages
if: matrix.os[0] == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get -y install libusb-1.0-0-dev libusb-dev gcc

- name: Install macOS packages
if: startsWith(matrix.os[0], 'macos')
run: |
brew update
brew install libusb gcc

- name: Compile tools
run: |
make --quiet -j $PROC_NR -C usbhostfs_pc

build-docker:
runs-on: ubuntu-latest
container: ${{ matrix.os[0] }}:latest
strategy:
matrix:
os: [
[ubuntu, bash],
[fedora, bash],
]
fail-fast: false
steps:
- uses: actions/checkout@v2

- name: Install dependencies Ubuntu
if: matrix.os[0] == 'ubuntu'
run: |
apt-get -y update
DEBIAN_FRONTEND="noninteractive" TZ="Europe/London" apt-get -y install libusb-1.0-0-dev libusb-dev gcc make pkg-config

- name: Install dependencies Fedora
if: matrix.os[0] == 'fedora'
run: |
dnf -y install gcc make libusb1-devel libusb-compat-0.1-devel

- name: Compile tools
run: |
make --quiet -j $PROC_NR -C usbhostfs_pc
2 changes: 1 addition & 1 deletion usbhostfs_pc/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include <unistd.h>
#include <ctype.h>
#include <inttypes.h>
#include <libusb-1.0/libusb.h>
#include <libusb.h>
#include <limits.h>
#include <fcntl.h>
#include <usbhostfs.h>
Expand Down
Loading