name: Build on: [push, pull_request] jobs: linux: name: Linux runs-on: ubuntu-latest strategy: fail-fast: false matrix: compiler: [gcc, clang] env: CC: ${{ matrix.compiler }} steps: - uses: actions/checkout@v2 - name: Install dependencies run: sudo apt-get install libbluetooth-dev libusb-1.0-0-dev - run: autoreconf --install --force - run: ./configure --prefix=/usr - run: make - run: make distcheck - name: Package artifacts run: | make install DESTDIR=$PWD/artifacts tar -czf ${{ github.job }}-${{ matrix.compiler }}.tar.gz -C artifacts usr - uses: actions/upload-artifact@v2 with: name: ${{ github.job }}-${{ matrix.compiler }} path: ${{ github.job }}-${{ matrix.compiler }}.tar.gz mac: name: Mac runs-on: macos-latest strategy: fail-fast: false matrix: compiler: [gcc, clang] env: CC: ${{ matrix.compiler }} steps: - uses: actions/checkout@v2 - name: Install dependencies run: brew install autoconf automake libtool hidapi libusb - run: autoreconf --install --force - run: ./configure --prefix=/usr - run: make - run: make distcheck - name: Package artifacts run: | make install DESTDIR=$PWD/artifacts tar -czf ${{ github.job }}-${{ matrix.compiler }}.tar.gz -C artifacts usr - uses: actions/upload-artifact@v2 with: name: ${{ github.job }}-${{ matrix.compiler }} path: ${{ github.job }}-${{ matrix.compiler }}.tar.gz windows: name: Windows runs-on: ubuntu-latest strategy: fail-fast: false matrix: arch: [i686, x86_64] steps: - uses: actions/checkout@v2 - name: Install dependencies run: sudo apt-get install gcc-mingw-w64 binutils-mingw-w64 mingw-w64-tools - run: autoreconf --install --force - run: ./configure --host=${{ matrix.arch }}-w64-mingw32 --prefix=/usr - run: make - run: make distcheck - name: Package artifacts run: | make install DESTDIR=$PWD/artifacts tar -czf ${{ github.job }}-${{ matrix.arch }}.tar.gz -C artifacts usr - uses: actions/upload-artifact@v2 with: name: ${{ github.job }}-${{ matrix.arch }} path: ${{ github.job }}-${{ matrix.arch }}.tar.gz