From 237910043bffc4ac23c61cf6d803d5d3be22025c Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sat, 29 May 2021 01:15:57 +0000 Subject: [PATCH 1/3] debian/rules: Only build fcst if libfc has been enabled in the kernel git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9429 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- debian/rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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/') From af9504a0f57e43fb502321025e95bea576fd5e7e Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sat, 29 May 2021 01:16:42 +0000 Subject: [PATCH 2/3] iscsi-scst/usr/Makefile: Use -Werror when testing a compiler option This is necessary for clang. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9430 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- iscsi-scst/usr/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 \ From 7381de4fb947a3750ddd1dc136d9f7f8105fa097 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sat, 29 May 2021 01:17:50 +0000 Subject: [PATCH 3/3] Add a github action for building SCST upon push and upon a pull request git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9431 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- .github/workflows/ci.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/ci.yml 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