Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
115 changes: 115 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ branches:
- amd
- /r[0-9]+.x/

orbs:
win: circleci/[email protected]

executors:
linux: # Docker using the Base Convenience Image
docker:
Expand All @@ -24,6 +27,26 @@ executors:
workflows:
build:
jobs:
# Default:
# - win-build:
# CC: gcc
# TEST: FAST
# THR: none
# CONF: auto
# LIB_TYPE: shared

- win-build:
CC: gcc
THR: openmp,pthreads
LIB_TYPE: static
CONF: x86_64

- win-build:
CC: clang
THR: openmp,pthreads
LIB_TYPE: shared
CONF: x86_64

# Default:
# - build:
# os: linux
Expand Down Expand Up @@ -140,6 +163,95 @@ workflows:
LDFLAGS: -static

jobs:
win-build:
parameters:
CC:
type: string
default: gcc
CXX:
type: string
default: g++
TEST:
type: string
default: FAST
THR:
type: string
default: none
CONF:
type: string
default: auto
LIB_TYPE:
type: string
default: shared
executor:
name: win/default
steps:
- run: git config --global core.autocrlf input

- checkout

- run:
name: Installing Dependencies
command: |
choco install mingw llvm
- run:
name: Configuring, Building, Testing
command: |
$env:DIST_PATH = "."
$env:CC = "<< parameters.CC >>"
$env:CXX = "<< parameters.CXX >>"
$CONF = "<< parameters.CONF >>"
$TEST = "<< parameters.TEST >>"
$THR = "<< parameters.THR >>"
$LIB_TYPE = "<< parameters.LIB_TYPE >>"
$CBLAS = "no"
$SANDBOX = "no"

echo "DIST_PATH = $env:DIST_PATH"
echo "CC = $env:CC"
echo "CXX = $env:CXX"
echo "CONF = $CONF"
echo "TEST = $TEST"
echo "THR = $THR"
echo "LIB_TYPE = $LIB_TYPE"

if ($CC -eq "clang") { $AR = "llvm-ar" }
if ($CC -eq "clang") { $AS = "llvm-as" }
if ($LIB_TYPE -eq "shared") { $CONFIGURE_OPTS = "$CONFIGURE_OPTS --enable-shared --disable-static" }
if ($LIB_TYPE -eq "static") { $CONFIGURE_OPTS = "$CONFIGURE_OPTS --disable-shared --enable-static" }
if ($CBLAS -ne "no") { $CONFIGURE_OPTS = "$CONFIGURE_OPTS --enable-cblas" }
if ($SANDBOX -eq "yes") { $CONFIGURE_OPTS = "$CONFIGURE_OPTS -s gemmlike" }
$env:RANLIB = "echo"
$env:LIBPTHREAD = ""

$CONFIGURE_OPTS = "$CONFIGURE_OPTS --enable-threading=$THR --enable-arg-max-hack --prefix=/c/Users/circleci/project/blis $CONF"
echo "Configuring with: $CONFIGURE_OPTS"
bash -lc "./configure $CONFIGURE_OPTS"
bash -lc "mingw32-make -j4 V=1"
bash -lc "mingw32-make install"

if ($LIB_TYPE -eq "shared") { $TEST_TARGET = "checkblis-fast" }
if ($LIB_TYPE -eq "static") { $TEST_TARGET = "check" }
echo "Test target: $TEST_TARGET"
if ($TEST -eq "FAST") { bash -lc "mingw32-make $TEST_TARGET -j4 V=1" }

tar zcvf blis-x86_64-win-$LIB_TYPE.tar.gz blis

Select-String -Path output.testsuite -Pattern "Exiting normally" -SimpleMatch
Select-String -Path output.testsuite -Pattern "FAILURE" -CaseSensitive -SimpleMatch

if ((-not (Select-String -Path output.testsuite -Pattern "Exiting normally" -SimpleMatch -Quiet)) -or
(Select-String -Path output.testsuite -Pattern "FAILURE" -SimpleMatch -CaseSensitive -Quiet))
{
throw "Build and/or tests failed."
}

- store_artifacts:
path: blis-x86_64-win-<< parameters.LIB_TYPE >>.tar.gz

- store_artifacts:
path: output.testsuite

build:
parameters:
os:
Expand Down Expand Up @@ -283,3 +395,6 @@ jobs:
if [ "$TEST" != "0" ]; then $DIST_PATH/ci/do_testsuite.sh; fi
if [ "$SDE" = "1" ]; then $DIST_PATH/ci/do_sde.sh; fi
if [ "$LEVEL0" = "1" ]; then $DIST_PATH/ci/do_level0.sh; fi

- store_artifacts:
path: output.testsuite
29 changes: 21 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,9 @@ ifeq ($(INSTALL_HH),yes)
HEADERS_TO_INSTALL += $(wildcard $(VEND_CPP_PATH)/*.hh)
endif

# Determine that paths of the installed header files
HEADERS_INSTALLED := $(foreach hdr,$(HEADERS_TO_INSTALL),$(MK_INCL_DIR_INST)/$(notdir $(hdr)))

# Define a list of so-called helper headers to install. These helper headers
# are very simple headers that go one directory up from INCDIR/blis (which
# by default is PREFIX/include/blis, where PREFIX is the install prefix). The
Expand Down Expand Up @@ -491,7 +494,7 @@ UNINSTALL_OLD_SYML += $(wildcard $(INSTALL_LIBDIR)/$(LIBBLIS)-*.$(SHLIB_EXT))
# This shell command grabs all files named "*.h" that are not blis.h or cblas.h
# in the installation directory. We consider this set of headers to be "old" and
# eligible for removal upon running of the uninstall-old-headers target.
UNINSTALL_OLD_HEADERS := $(filter-out $(BLIS_H),$(filter-out $(CBLAS_H),$(wildcard $(INSTALL_INCDIR)/blis/*.h)))
UNINSTALL_OLD_HEADERS := $(filter-out %/$(BLIS_H),$(filter-out %/$(CBLAS_H),$(wildcard $(INSTALL_INCDIR)/blis/*.h)))

endif # IS_CONFIGURED

Expand Down Expand Up @@ -1079,17 +1082,27 @@ endif

# --- Install header rules ---

install-headers: check-env $(MK_INCL_DIR_INST) install-helper-headers
install-headers: check-env $(HEADERS_INSTALLED) install-helper-headers

# Rule for installing main headers.
$(MK_INCL_DIR_INST): $(HEADERS_TO_INSTALL) $(CONFIG_MK_FILE)
$(MK_INCL_DIR_INST)/%.h: $(BASE_INC_PATH)/%.h $(CONFIG_MK_FILE)
ifeq ($(ENABLE_VERBOSE),yes)
$(MKDIR) $(@)
$(INSTALL) -m 0644 $(HEADERS_TO_INSTALL) $(@)
$(MKDIR) $(dir $(@))
$(INSTALL) -m 0644 $(<) $(dir $(@))
else
@$(MKDIR) $(@)
@echo "Installing $(notdir $(HEADERS_TO_INSTALL)) into $(@)/"
@$(INSTALL) -m 0644 $(HEADERS_TO_INSTALL) $(@)
@$(MKDIR) $(dir $(@))
@echo "Installing $(notdir $(<)) into $(dir $(@))/"
@$(INSTALL) -m 0644 $(<) $(dir $(@))
endif

$(MK_INCL_DIR_INST)/%.hh: $(VEND_CPP_PATH)/%.hh $(CONFIG_MK_FILE)
ifeq ($(ENABLE_VERBOSE),yes)
$(MKDIR) $(dir $(@))
$(INSTALL) -m 0644 $(<) $(dir $(@))
else
@$(MKDIR) $(dir $(@))
@echo "Installing $(notdir $(<)) into $(dir $(@))/"
@$(INSTALL) -m 0644 $(<) $(dir $(@))
endif

install-helper-headers: check-env $(HELP_HEADERS_INSTALLED)
Expand Down
5 changes: 4 additions & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -1818,7 +1818,7 @@ check_compiler()
if [[ ${cc_vendor} = NVIDIA ]]; then
blacklistcc_add "knl"
fi

# gcc
if [[ ${cc_vendor} = gcc ]]; then

Expand Down Expand Up @@ -1917,6 +1917,9 @@ check_compiler()
if [[ ${cc_major} -lt 11 ]]; then
blacklistcc_add "armsve"
fi
if [[ ${cc_major} -ge 19 ]]; then
blacklistcc_add "knl"
fi
fi
fi
}
Expand Down