commit
276c1791ea
|
@ -0,0 +1,78 @@
|
||||||
|
# Only the "head" branch of the OpenBLAS package is tested
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- '**/nightly-Homebrew-build.yml'
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- develop
|
||||||
|
paths:
|
||||||
|
- '**/nightly-Homebrew-build.yml'
|
||||||
|
schedule:
|
||||||
|
- cron: 45 7 * * *
|
||||||
|
# This is 7:45 AM UTC daily, late at night in the USA
|
||||||
|
|
||||||
|
# Since push and pull_request will still always be building and testing the `develop` branch,
|
||||||
|
# it only makes sense to test if this file has been changed
|
||||||
|
|
||||||
|
name: Nightly-Homebrew-Build
|
||||||
|
jobs:
|
||||||
|
build-OpenBLAS-with-Homebrew:
|
||||||
|
runs-on: macos-latest
|
||||||
|
env:
|
||||||
|
HOMEBREW_DEVELOPER: "ON"
|
||||||
|
HOMEBREW_DISPLAY_INSTALL_TIMES: "ON"
|
||||||
|
HOMEBREW_NO_ANALYTICS: "ON"
|
||||||
|
HOMEBREW_NO_AUTO_UPDATE: "ON"
|
||||||
|
HOMEBREW_NO_BOTTLE_SOURCE_FALLBACK: "ON"
|
||||||
|
HOMEBREW_NO_INSTALL_CLEANUP: "ON"
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Random delay for cron job
|
||||||
|
run: |
|
||||||
|
delay=$(( RANDOM % 600 ))
|
||||||
|
printf 'Delaying for %s seconds on event %s' ${delay} "${{ github.event_name }}"
|
||||||
|
sleep ${delay}
|
||||||
|
if: github.event_name == 'schedule'
|
||||||
|
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
# This isn't even needed, technically. Homebrew will get `develop` via git
|
||||||
|
|
||||||
|
- name: Update Homebrew
|
||||||
|
if: github.event_name != 'pull_request'
|
||||||
|
run: brew update || true
|
||||||
|
|
||||||
|
- name: Install prerequisites
|
||||||
|
run: brew install --fetch-HEAD --HEAD --only-dependencies --keep-tmp openblas
|
||||||
|
|
||||||
|
- name: Install and bottle OpenBLAS
|
||||||
|
run: brew install --fetch-HEAD --HEAD --build-bottle --keep-tmp openblas
|
||||||
|
# the HEAD flags tell Homebrew to build the develop branch fetch via git
|
||||||
|
|
||||||
|
- name: Create bottle
|
||||||
|
run: |
|
||||||
|
brew bottle -v openblas
|
||||||
|
mkdir bottles
|
||||||
|
mv *.bottle.tar.gz bottles
|
||||||
|
|
||||||
|
- name: Upload bottle
|
||||||
|
uses: actions/upload-artifact@v1
|
||||||
|
with:
|
||||||
|
name: openblas--HEAD.catalina.bottle.tar.gz
|
||||||
|
path: bottles
|
||||||
|
|
||||||
|
- name: Show linkage
|
||||||
|
run: brew linkage -v openblas
|
||||||
|
|
||||||
|
- name: Test openblas
|
||||||
|
run: brew test --HEAD --verbose openblas
|
||||||
|
|
||||||
|
- name: Audit openblas formula
|
||||||
|
run: |
|
||||||
|
brew audit --strict openblas
|
||||||
|
brew cat openblas
|
||||||
|
|
||||||
|
- name: Post logs on failure
|
||||||
|
if: failure()
|
||||||
|
run: brew gist-logs --with-hostname -v openblas
|
|
@ -176,7 +176,7 @@ matrix:
|
||||||
- <<: *test-macos
|
- <<: *test-macos
|
||||||
osx_image: xcode10.1
|
osx_image: xcode10.1
|
||||||
env:
|
env:
|
||||||
- CC="/Applications/Xcode-10.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -isysroot /Applications/Xcode-10.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk"
|
- CC="/Applications/Xcode-10.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang"
|
||||||
- CFLAGS="-O2 -Wno-macro-redefined -isysroot /Applications/Xcode-10.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk -arch arm64 -miphoneos-version-min=10.0"
|
- CFLAGS="-O2 -Wno-macro-redefined -isysroot /Applications/Xcode-10.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk -arch arm64 -miphoneos-version-min=10.0"
|
||||||
- BTYPE="TARGET=ARMV8 BINARY=64 HOSTCC=clang NOFORTRAN=1"
|
- BTYPE="TARGET=ARMV8 BINARY=64 HOSTCC=clang NOFORTRAN=1"
|
||||||
|
|
||||||
|
|
|
@ -82,7 +82,7 @@ ifeq ($(OSNAME), $(filter $(OSNAME),FreeBSD OpenBSD NetBSD DragonFly))
|
||||||
endif
|
endif
|
||||||
ifeq ($(OSNAME), Darwin)
|
ifeq ($(OSNAME), Darwin)
|
||||||
@-cp $(LIBDYNNAME) "$(DESTDIR)$(OPENBLAS_LIBRARY_DIR)"
|
@-cp $(LIBDYNNAME) "$(DESTDIR)$(OPENBLAS_LIBRARY_DIR)"
|
||||||
@-install_name_tool -id "$(DESTDIR)$(OPENBLAS_LIBRARY_DIR)/$(LIBDYNNAME)" "$(DESTDIR)$(OPENBLAS_LIBRARY_DIR)/$(LIBDYNNAME)"
|
@-install_name_tool -id "$(OPENBLAS_LIBRARY_DIR)/$(LIBPREFIX).$(MAJOR_VERSION).dylib" "$(DESTDIR)$(OPENBLAS_LIBRARY_DIR)/$(LIBDYNNAME)"
|
||||||
@cd "$(DESTDIR)$(OPENBLAS_LIBRARY_DIR)" ; \
|
@cd "$(DESTDIR)$(OPENBLAS_LIBRARY_DIR)" ; \
|
||||||
ln -fs $(LIBDYNNAME) $(LIBPREFIX).dylib ; \
|
ln -fs $(LIBDYNNAME) $(LIBPREFIX).dylib ; \
|
||||||
ln -fs $(LIBDYNNAME) $(LIBPREFIX).$(MAJOR_VERSION).dylib
|
ln -fs $(LIBDYNNAME) $(LIBPREFIX).$(MAJOR_VERSION).dylib
|
||||||
|
|
|
@ -42,7 +42,7 @@ all: getarch_2nd
|
||||||
./getarch_2nd 1 >> $(TARGET_CONF)
|
./getarch_2nd 1 >> $(TARGET_CONF)
|
||||||
|
|
||||||
config.h : c_check f_check getarch
|
config.h : c_check f_check getarch
|
||||||
perl ./c_check $(TARGET_MAKE) $(TARGET_CONF) $(CC) $(TARGET_FLAGS)
|
perl ./c_check $(TARGET_MAKE) $(TARGET_CONF) $(CC) $(TARGET_FLAGS) $(CFLAGS)
|
||||||
ifneq ($(ONLY_CBLAS), 1)
|
ifneq ($(ONLY_CBLAS), 1)
|
||||||
perl ./f_check $(TARGET_MAKE) $(TARGET_CONF) $(FC) $(TARGET_FLAGS)
|
perl ./f_check $(TARGET_MAKE) $(TARGET_CONF) $(FC) $(TARGET_FLAGS)
|
||||||
else
|
else
|
||||||
|
@ -59,13 +59,13 @@ endif
|
||||||
|
|
||||||
|
|
||||||
getarch : getarch.c cpuid.S dummy $(CPUIDEMU)
|
getarch : getarch.c cpuid.S dummy $(CPUIDEMU)
|
||||||
$(HOSTCC) $(CFLAGS) $(EXFLAGS) -o $(@F) getarch.c cpuid.S $(CPUIDEMU)
|
$(HOSTCC) $(HOST_CFLAGS) $(EXFLAGS) -o $(@F) getarch.c cpuid.S $(CPUIDEMU)
|
||||||
|
|
||||||
getarch_2nd : getarch_2nd.c config.h dummy
|
getarch_2nd : getarch_2nd.c config.h dummy
|
||||||
ifndef TARGET_CORE
|
ifndef TARGET_CORE
|
||||||
$(HOSTCC) -I. $(CFLAGS) -o $(@F) getarch_2nd.c
|
$(HOSTCC) -I. $(HOST_CFLAGS) -o $(@F) getarch_2nd.c
|
||||||
else
|
else
|
||||||
$(HOSTCC) -I. $(CFLAGS) -DBUILD_KERNEL -o $(@F) getarch_2nd.c
|
$(HOSTCC) -I. $(HOST_CFLAGS) -DBUILD_KERNEL -o $(@F) getarch_2nd.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
dummy:
|
dummy:
|
||||||
|
|
|
@ -214,7 +214,7 @@ ifndef GOTOBLAS_MAKEFILE
|
||||||
export GOTOBLAS_MAKEFILE = 1
|
export GOTOBLAS_MAKEFILE = 1
|
||||||
|
|
||||||
# Generating Makefile.conf and config.h
|
# Generating Makefile.conf and config.h
|
||||||
DUMMY := $(shell $(MAKE) -C $(TOPDIR) -f Makefile.prebuild CC="$(CC)" FC="$(FC)" HOSTCC="$(HOSTCC)" CFLAGS="$(GETARCH_FLAGS)" BINARY=$(BINARY) USE_OPENMP=$(USE_OPENMP) TARGET_CORE=$(TARGET_CORE) ONLY_CBLAS=$(ONLY_CBLAS) TARGET=$(TARGET) all)
|
DUMMY := $(shell $(MAKE) -C $(TOPDIR) -f Makefile.prebuild CC="$(CC)" FC="$(FC)" HOSTCC="$(HOSTCC)" HOST_CFLAGS="$(GETARCH_FLAGS)" CFLAGS="$(CFLAGS)" BINARY=$(BINARY) USE_OPENMP=$(USE_OPENMP) TARGET_CORE=$(TARGET_CORE) ONLY_CBLAS=$(ONLY_CBLAS) TARGET=$(TARGET) all)
|
||||||
|
|
||||||
ifndef TARGET_CORE
|
ifndef TARGET_CORE
|
||||||
include $(TOPDIR)/Makefile.conf
|
include $(TOPDIR)/Makefile.conf
|
||||||
|
|
28
c_check
28
c_check
|
@ -18,11 +18,12 @@ $binary = $ENV{"BINARY"};
|
||||||
$makefile = shift(@ARGV);
|
$makefile = shift(@ARGV);
|
||||||
$config = shift(@ARGV);
|
$config = shift(@ARGV);
|
||||||
|
|
||||||
$compiler_name = join(" ", @ARGV);
|
$compiler_name = shift(@ARGV);
|
||||||
|
$flags = join(" ", @ARGV);
|
||||||
|
|
||||||
# First, we need to know the target OS and compiler name
|
# First, we need to know the target OS and compiler name
|
||||||
|
|
||||||
$data = `$compiler_name -E ctest.c`;
|
$data = `$compiler_name $flags -E ctest.c`;
|
||||||
|
|
||||||
if ($?) {
|
if ($?) {
|
||||||
printf STDERR "C Compiler ($compiler_name) is something wrong.\n";
|
printf STDERR "C Compiler ($compiler_name) is something wrong.\n";
|
||||||
|
@ -175,7 +176,7 @@ if ($defined == 0) {
|
||||||
|
|
||||||
# Do again
|
# Do again
|
||||||
|
|
||||||
$data = `$compiler_name -E ctest.c`;
|
$data = `$compiler_name $flags -E ctest.c`;
|
||||||
|
|
||||||
if ($?) {
|
if ($?) {
|
||||||
printf STDERR "C Compiler ($compiler_name) is something wrong.\n";
|
printf STDERR "C Compiler ($compiler_name) is something wrong.\n";
|
||||||
|
@ -195,7 +196,7 @@ if (($architecture eq "mips") || ($architecture eq "mips64")) {
|
||||||
print $tmpf "void main(void){ __asm__ volatile($code); }\n";
|
print $tmpf "void main(void){ __asm__ volatile($code); }\n";
|
||||||
|
|
||||||
$args = "$msa_flags -o $tmpf.o $tmpf";
|
$args = "$msa_flags -o $tmpf.o $tmpf";
|
||||||
my @cmd = ("$compiler_name $args >/dev/null 2>/dev/null");
|
my @cmd = ("$compiler_name $flags $args >/dev/null 2>/dev/null");
|
||||||
system(@cmd) == 0;
|
system(@cmd) == 0;
|
||||||
if ($? != 0) {
|
if ($? != 0) {
|
||||||
$have_msa = 0;
|
$have_msa = 0;
|
||||||
|
@ -236,7 +237,7 @@ if (($architecture eq "x86") || ($architecture eq "x86_64")) {
|
||||||
if ($compiler eq "PGI") {
|
if ($compiler eq "PGI") {
|
||||||
$args = " -tp skylake -c -o $tmpf.o $tmpf";
|
$args = " -tp skylake -c -o $tmpf.o $tmpf";
|
||||||
}
|
}
|
||||||
my @cmd = ("$compiler_name $args >/dev/null 2>/dev/null");
|
my @cmd = ("$compiler_name $flags $args >/dev/null 2>/dev/null");
|
||||||
system(@cmd) == 0;
|
system(@cmd) == 0;
|
||||||
if ($? != 0) {
|
if ($? != 0) {
|
||||||
$no_avx512 = 1;
|
$no_avx512 = 1;
|
||||||
|
@ -247,7 +248,7 @@ if (($architecture eq "x86") || ($architecture eq "x86_64")) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$data = `$compiler_name -S ctest1.c && grep globl ctest1.s | head -n 1 && rm -f ctest1.s`;
|
$data = `$compiler_name $flags -S ctest1.c && grep globl ctest1.s | head -n 1 && rm -f ctest1.s`;
|
||||||
|
|
||||||
$data =~ /globl\s([_\.]*)(.*)/;
|
$data =~ /globl\s([_\.]*)(.*)/;
|
||||||
|
|
||||||
|
@ -263,19 +264,6 @@ if ($architecture ne $hostarch) {
|
||||||
|
|
||||||
$cross = 1 if ($os ne $hostos);
|
$cross = 1 if ($os ne $hostos);
|
||||||
|
|
||||||
# rework cross suffix and architecture if we are on OSX cross-compiling for ARMV8-based IOS
|
|
||||||
# the initial autodetection will have been confused by the command-line arguments to clang
|
|
||||||
# and the cross-compiler apparently still claims to build for x86_64 in its CC -E output
|
|
||||||
if (($os eq "Darwin") && ($cross_suffix ne "")) {
|
|
||||||
my $tmpnam = `xcrun --sdk iphoneos --find clang`;
|
|
||||||
$cross_suffix = substr($tmpnam, 0, rindex($tmpnam, "/")+1 );
|
|
||||||
# this should produce something like $cross_suffix="/Applications/Xcode-10.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/";
|
|
||||||
$cross =1;
|
|
||||||
$architecture = arm64;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$openmp = "" if $ENV{USE_OPENMP} != 1;
|
$openmp = "" if $ENV{USE_OPENMP} != 1;
|
||||||
|
|
||||||
$linker_L = "";
|
$linker_L = "";
|
||||||
|
@ -283,7 +271,7 @@ $linker_l = "";
|
||||||
$linker_a = "";
|
$linker_a = "";
|
||||||
|
|
||||||
{
|
{
|
||||||
$link = `$compiler_name -c ctest2.c -o ctest2.o 2>&1 && $compiler_name $openmp -v ctest2.o -o ctest2 2>&1 && rm -f ctest2.o ctest2 ctest2.exe`;
|
$link = `$compiler_name $flags -c ctest2.c -o ctest2.o 2>&1 && $compiler_name $flags $openmp -v ctest2.o -o ctest2 2>&1 && rm -f ctest2.o ctest2 ctest2.exe`;
|
||||||
|
|
||||||
$link =~ s/\-Y\sP\,/\-Y/g;
|
$link =~ s/\-Y\sP\,/\-Y/g;
|
||||||
|
|
||||||
|
|
|
@ -88,7 +88,10 @@ ZTRSMKERNEL_RT = ../generic/trsm_kernel_RT.c
|
||||||
#
|
#
|
||||||
#SMINKERNEL = ../arm/min.c
|
#SMINKERNEL = ../arm/min.c
|
||||||
#DMINKERNEL = ../arm/min.c
|
#DMINKERNEL = ../arm/min.c
|
||||||
#
|
|
||||||
|
ISMINKERNEL = imin.S
|
||||||
|
ISMAXKERNEL = imax.S
|
||||||
|
|
||||||
ifneq ($(__BYTE_ORDER__),"__ORDER_BIG_ENDIAN__")
|
ifneq ($(__BYTE_ORDER__),"__ORDER_BIG_ENDIAN__")
|
||||||
ifneq ($(GCCVERSIONGTEQ9),1)
|
ifneq ($(GCCVERSIONGTEQ9),1)
|
||||||
ISAMAXKERNEL = isamax_power8.S
|
ISAMAXKERNEL = isamax_power8.S
|
||||||
|
|
Loading…
Reference in New Issue