Skip to content

Install dependencies for MacOs #9

Install dependencies for MacOs

Install dependencies for MacOs #9

Workflow file for this run

name: USBSID-Player Build
env:
BUILD_THREADS: 4
BUILD_TYPE: Release
on:
push:
paths:
- "src/**"
- "lib/**"
- ".github/workflows/build.yml"
# Allows you to run this workflow manually from the Actions tab when needed
workflow_dispatch:
jobs:
build:
name: Build
if: ${{ ! startsWith(github.ref, 'refs/tags/') }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- { os: ubuntu-latest, shell: bash, buildname: usbsid }
- { os: macos-14, shell: bash, buildname: usbsid_macos14 }
- { os: macos-15-intel, shell: bash, buildname: usbsid_macos15intel }
- { os: windows-2022, shell: 'msys2 {0}', buildname: usbsid.exe }
defaults:
run:
shell: ${{ matrix.shell }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
# Forces checkout of the branch head instead of a specific commit SHA
ref: ${{ github.ref }}
submodules: true
path: repo
- 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: Install dependencies (MacOs)
if: matrix.os == 'macos-14' || matrix.os == 'macos-15-intel'
run: |
brew update
brew install pkg-config cmake ninja libudev libusb
# - name: Install xa dependency
# if: matrix.os == 'ubuntu-latest'
# run: |
# sudo apt-get update && sudo apt-get install -y xa65
# - name: Checkout bin2h source
# uses: actions/checkout@v4
# with:
# repository: elnormous/bin2h
# path: bin2h-src
# - name: Build and add to PATH
# run: |
# cd bin2h-src
# make
# # Add the current directory containing the built 'bin2h' to the runner's PATH
# echo "$(pwd)" >> $GITHUB_PATH
# - name: Verify installation
# run: bin2h --help
- 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 repo
cmake -S . -B build -DEXECUTABLE=${{ matrix.buildname }} && cmake --build build -j$(nproc)
ls -lhai
popd
- name: Upload
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.buildname }}-${{ matrix.os }}
path: repo/${{ matrix.buildname }}
if-no-files-found: ignore