ci: Add github workflow, drop travis

Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
This commit is contained in:
Alexander Amelkin 2020-06-30 16:23:59 +03:00 committed by Alexander Amelkin
parent 2158e6ea49
commit 0cd847579f
2 changed files with 82 additions and 37 deletions

82
.github/workflows/ci.yml vendored Normal file
View File

@ -0,0 +1,82 @@
# vi: set et ts=2 sw=2 :
name: C/C++ CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
ubuntu:
strategy:
matrix:
os: [ ubuntu-16.04, ubuntu-18.04 ]
runs-on: ${{ matrix.os }}
steps:
- name: install dependencies
run: |
sudo apt install \
automake \
gcc \
git \
libssl-dev \
libtool \
make \
wget
# TODO: Add ubuntu-20.04 to the matrix.os list and fix the build
# - name: install extra dependencies
# # In Ubuntu 20.04 some crucial development headers/libraries
# # have been moved from libc6-dev to musl-dev
# if: matrix.os == 'ubuntu-20.04'
# run: sudo apt install musl-dev
- name: install extra libraries
# This build job tries to verify as much of ipmitool code
# as possible, hence these libraries. They aren't usually
# needed for normal user builds:
run: |
sudo apt install \
libsystemd-dev \
libreadline-dev \
libfreeipmi-dev \
libusb-dev
- uses: actions/checkout@v2
- name: bootstrap
run: ./bootstrap
- name: configure
run: |
# For Linux, build as many extra interfaces as possible
# to verify the code
./configure --enable-intf-dummy \
--enable-intf-dbus \
--enable-intf-usb \
--enable-intf-bmc \
--enable-intf-free
- name: make
run: make
- name: make check
run: make check
- name: make distcheck
run: make distcheck
macos-catalina:
runs-on: macos-10.15
steps:
- name: install dependencies
run: brew install automake openssl libtool freeipmi wget
- uses: actions/checkout@v2
- name: bootstrap
run: ./bootstrap
- name: configure
run: |
./configure --enable-intf-dummy \
LDFLAGS=-L/usr/local/opt/openssl@1.1/lib \
CFLAGS=-I/usr/local/opt/openssl@1.1/include
- name: make
run: make
- name: make check
run: make check
- name: make distcheck
run: make distcheck

View File

@ -1,37 +0,0 @@
language: C
sudo: enabled
before_script:
- ./bootstrap
addons:
apt:
update: true
packages:
- libssl-dev
homebrew:
packages:
- openssl
matrix:
include:
- os: linux
dist: xenial
addons:
apt:
packages:
- libsystemd-dev
script:
- ./configure --enable-intf-dummy --enable-intf-dbus
- make
- sudo make install
- os: linux
dist: trusty
script:
- ./configure --enable-intf-dummy
- make
- sudo make install
- os: osx
osx_image: xcode10.2
script:
- ./configure --enable-intf-dummy
- make
- sudo make install