diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..7853ae6c8 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,27 @@ +name: CI + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + compiler: [gcc, clang] + arch: [x86_64] + steps: + - uses: actions/checkout@v2 + - name: Install build-essential + run: | + sudo apt-get update + sudo apt-get install -y build-essential debhelper devscripts dpkg-dev quilt + - name: Install multilib + run: | + sudo apt-get install -y gcc-multilib g++-multilib + if: ${{ matrix.arch == 'x86' }} + - name: Build + env: + CC: ${{ matrix.compiler }} + CFLAGS: -Werror ${{ matrix.arch == 'x86' && '-m32' || '' }} + LDFLAGS: ${{ matrix.arch == 'x86' && '-m32' || '' }} + run: make CC=${{matrix.compiler}} dpkg diff --git a/debian/rules b/debian/rules index efd2cf134..53a3f307e 100755 --- a/debian/rules +++ b/debian/rules @@ -13,7 +13,7 @@ export DH_VERBOSE = 1 # package maintainers to append LDFLAGS #export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed -SUBDIRS=scst fcst iscsi-scst qla2x00t/qla2x00-target scst_local scstadmin srpt +SUBDIRS=scst $(shell grep -qw '^CONFIG_LIBFC' /boot/config-$(uname -r) && echo fcst) iscsi-scst qla2x00t/qla2x00-target scst_local scstadmin srpt DESTDIR=$(CURDIR)/debian/tmp VERSION:=$(shell head -n1 debian/changelog | sed 's/.*(\([0-9.]*\).*).*/\1/') diff --git a/iscsi-scst/usr/Makefile b/iscsi-scst/usr/Makefile index c94a9d409..e50aad6f3 100644 --- a/iscsi-scst/usr/Makefile +++ b/iscsi-scst/usr/Makefile @@ -18,7 +18,7 @@ ifndef PREFIX PREFIX=/usr/local endif -cc-option = $(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null \ +cc-option = $(shell if $(CC) $(1) -Werror -S -o /dev/null -xc /dev/null \ > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;) SRCS_D = iscsid.c iscsi_scstd.c conn.c session.c target.c message.c ctldev.c \