Skip to content

Compile the host tools in the different systems #1

Compile the host tools in the different systems

Compile the host tools in the different systems #1

Workflow file for this run

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],
[windows-latest, x86_64, msys2]
]
debug: [all, debug]
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 gcc
- name: Install macOS packages
if: startsWith(matrix.os[0], 'macos')
run: |
brew update
brew install libusb gcc
- name: Install MSYS2 packages
if: matrix.os[0] == 'windows-latest'
uses: msys2/setup-msys2@v2
with:
msystem: MINGW32
install: |
base-devel git make
mingw-w64-i686-libusb
mingw-w64-i686-gcc
update: true
- name: Compile tools
run: |
make --quiet -j $PROC_NR -C usbhostfs_pc ${{ matrix.debug }}
make --quiet -j $PROC_NR -C usbhostfs_pc install
- name: Upload artifacts
if: ${{ success() }}
uses: actions/upload-artifact@v4
with:
name: usbhostfs-tools-${{ matrix.debug }}-${{ matrix.os[0] }}-${{ matrix.os[1] }}
path: usbhostfs_pc/bin/*