Skip to content

Merge pull request #84 from onthegrid007/master #547

Merge pull request #84 from onthegrid007/master

Merge pull request #84 from onthegrid007/master #547

Workflow file for this run

name: Dev Workflow
on:
push:
branches-ignore:
- xlink_upstream
pull_request:
branches-ignore:
- xlink_upstream
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
compiler: [default, clang]
libusb: [ON, OFF]
include:
- os: windows-latest
compiler: mingw
libusb: ON
- os: windows-latest
compiler: mingw
libusb: OFF
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Install libusb
if: matrix.os == 'macos-latest' && matrix.libusb == 'ON'
run: |
brew install libusb
- name: Install libusb
if: matrix.os == 'ubuntu-latest' && matrix.libusb == 'ON'
run: |
sudo apt-get install libusb-1.0-0-dev libusb-1.0-0
- name: Setup MinGW compiler
if: matrix.compiler == 'mingw'
run: |
choco install mingw
choco upgrade mingw
- name: Install Clang on macOS
if: matrix.os == 'macos-latest' && matrix.compiler == 'clang'
run: |
brew install llvm
echo "/usr/local/opt/llvm/bin" >> $GITHUB_PATH
- name: Install Clang on Ubuntu
if: matrix.os == 'ubuntu-latest' && matrix.compiler == 'clang'
run: |
sudo apt-get install clang
- name: Install Clang on Windows
if: matrix.os == 'windows-latest' && matrix.compiler == 'clang'
run: |
choco install llvm
echo "C:\Program Files\LLVM\bin" >> $env:GITHUB_PATH
- name: Install Ninja on macOS
if: matrix.os == 'macos-latest'
run: |
brew install ninja
- name: Install Ninja on Ubuntu
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get install ninja-build
- name: Install Ninja on Windows
if: matrix.os == 'windows-latest'
run: |
choco install ninja
- name: configure
if: matrix.compiler == 'default'
run: cmake . -Bbuild -DXLINK_BUILD_EXAMPLES=ON -DXLINK_BUILD_TESTS=ON -DXLINK_ENABLE_LIBUSB=${{ matrix.libusb }}
- name: configure
if: matrix.compiler == 'mingw'
run: cmake . -Bbuild -DXLINK_BUILD_EXAMPLES=ON -DXLINK_BUILD_TESTS=ON -DXLINK_ENABLE_LIBUSB=${{ matrix.libusb }} -G"MinGW Makefiles"
- name: configure
if: matrix.compiler == 'clang'
run: cmake . -Bbuild -DXLINK_BUILD_EXAMPLES=ON -DXLINK_BUILD_TESTS=ON -DXLINK_ENABLE_LIBUSB=${{ matrix.libusb }} -G"Ninja" -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
- name: build
run: cmake --build build --parallel