Skip to content

Fix buildscript

Fix buildscript #2

Workflow file for this run

name: USBSID-Pico Build Tools
env:
BUILD_THREADS: 4
BUILD_TYPE: Release
on:
push:
paths:
- "src/examples/config-tool/**"
- "src/examples/send_sid/**"
- ".github/workflows/buildtools.yml"
# Only run on dev branch
branches: [dev]
# Allows you to run this workflow manually from the Actions tab when needed
workflow_dispatch:
jobs:
build-tools:
name: Build config-tool and send_sid
if: ${{ ! startsWith(github.ref, 'refs/tags/') }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- { os: ubuntu-latest, shell: bash,
directory: config-tool, buildname: cfg_tool }
- { os: ubuntu-latest, shell: bash,
directory: send_sid, buildname: send_sid }
- { os: windows-2022, shell: 'msys2 {0}',
directory: config-tool, buildname: cfg_tool }
- { os: windows-2022, shell: 'msys2 {0}',
directory: config-tool, buildname: cfg_tool }
defaults:
run:
shell: ${{ matrix.shell }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: true
path: master
- name: Install dependencies (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y pkg-config cmake build-essential libusb-1.0-0 libusb-1.0-0-dev
- name: Set up MSYS2 (Windows)
if: matrix.os == 'windows-2022'
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: >-
mingw-w64-x86_64-gcc
mingw-w64-x86_64-libusb
mingw-w64-x86_64-cmake
mingw-w64-x86_64-pkg-config
mingw-w64-x86_64-ninja
- name: Configure and build ${{ matrix.buildname }}
run: |
pushd master/examples/${{ matrix.directory }}
cmake -S . -B build && cmake --build build -j$(nproc)
pwd
ls -lhai
popd
- name: Upload
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.buildname }}-${{ matrix.os }}
path: |
master/examples/${{ matrix.directory }}/${{ matrix.buildname }}
master/examples/${{ matrix.directory }}/${{ matrix.buildname }}.exe
if-no-files-found: ignore