summaryrefslogtreecommitdiff
path: root/.github/workflows/main.yml
blob: d77c8b276491745bb9d70245187e60ee04640896 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Build and Test

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  build-linux:
    runs-on: ubuntu-latest

    strategy:
      matrix:
        distro:
          - fedora
          - debian
      fail-fast: false

    steps:
      - uses: actions/checkout@v2
      - run: docker build -t libgusb-${{ matrix.distro }} -f contrib/ci/Dockerfile-${{ matrix.distro }} .
      - run: docker run -t -v `pwd`:/build libgusb-${{ matrix.distro }} ./contrib/ci/build_and_test.sh -Dtests=false

  build-freebsd:
    runs-on: macos-latest

    steps:
    - name: Checkout
      uses: actions/checkout@v2
    - name: Build
      id: test
      uses: vmactions/freebsd-vm@v0.1.4
      with:
        usesh: true
        mem: 8192
        prepare: |
          pkg install -y git python3 glib meson pkgconf gobject-introspection usbids
        sync: rsync
        run: ./contrib/ci/build_and_test.sh -Dvapi=false -Ddocs=false -Dusb_ids=/usr/local/share/usbids/usb.ids