Skip to content

Commit 276c179

Browse files
authored
Merge pull request #32 from xianyi/develop
rebase
2 parents 403cde1 + c5bbfd8 commit 276c179

7 files changed

Lines changed: 97 additions & 28 deletions

File tree

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# Only the "head" branch of the OpenBLAS package is tested
2+
3+
on:
4+
push:
5+
paths:
6+
- '**/nightly-Homebrew-build.yml'
7+
pull_request:
8+
branches:
9+
- develop
10+
paths:
11+
- '**/nightly-Homebrew-build.yml'
12+
schedule:
13+
- cron: 45 7 * * *
14+
# This is 7:45 AM UTC daily, late at night in the USA
15+
16+
# Since push and pull_request will still always be building and testing the `develop` branch,
17+
# it only makes sense to test if this file has been changed
18+
19+
name: Nightly-Homebrew-Build
20+
jobs:
21+
build-OpenBLAS-with-Homebrew:
22+
runs-on: macos-latest
23+
env:
24+
HOMEBREW_DEVELOPER: "ON"
25+
HOMEBREW_DISPLAY_INSTALL_TIMES: "ON"
26+
HOMEBREW_NO_ANALYTICS: "ON"
27+
HOMEBREW_NO_AUTO_UPDATE: "ON"
28+
HOMEBREW_NO_BOTTLE_SOURCE_FALLBACK: "ON"
29+
HOMEBREW_NO_INSTALL_CLEANUP: "ON"
30+
31+
steps:
32+
- name: Random delay for cron job
33+
run: |
34+
delay=$(( RANDOM % 600 ))
35+
printf 'Delaying for %s seconds on event %s' ${delay} "${{ github.event_name }}"
36+
sleep ${delay}
37+
if: github.event_name == 'schedule'
38+
39+
- uses: actions/checkout@v2
40+
# This isn't even needed, technically. Homebrew will get `develop` via git
41+
42+
- name: Update Homebrew
43+
if: github.event_name != 'pull_request'
44+
run: brew update || true
45+
46+
- name: Install prerequisites
47+
run: brew install --fetch-HEAD --HEAD --only-dependencies --keep-tmp openblas
48+
49+
- name: Install and bottle OpenBLAS
50+
run: brew install --fetch-HEAD --HEAD --build-bottle --keep-tmp openblas
51+
# the HEAD flags tell Homebrew to build the develop branch fetch via git
52+
53+
- name: Create bottle
54+
run: |
55+
brew bottle -v openblas
56+
mkdir bottles
57+
mv *.bottle.tar.gz bottles
58+
59+
- name: Upload bottle
60+
uses: actions/upload-artifact@v1
61+
with:
62+
name: openblas--HEAD.catalina.bottle.tar.gz
63+
path: bottles
64+
65+
- name: Show linkage
66+
run: brew linkage -v openblas
67+
68+
- name: Test openblas
69+
run: brew test --HEAD --verbose openblas
70+
71+
- name: Audit openblas formula
72+
run: |
73+
brew audit --strict openblas
74+
brew cat openblas
75+
76+
- name: Post logs on failure
77+
if: failure()
78+
run: brew gist-logs --with-hostname -v openblas

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ matrix:
176176
- <<: *test-macos
177177
osx_image: xcode10.1
178178
env:
179-
- 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"
179+
- CC="/Applications/Xcode-10.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang"
180180
- 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"
181181
- BTYPE="TARGET=ARMV8 BINARY=64 HOSTCC=clang NOFORTRAN=1"
182182

Makefile.install

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ ifeq ($(OSNAME), $(filter $(OSNAME),FreeBSD OpenBSD NetBSD DragonFly))
8282
endif
8383
ifeq ($(OSNAME), Darwin)
8484
@-cp $(LIBDYNNAME) "$(DESTDIR)$(OPENBLAS_LIBRARY_DIR)"
85-
@-install_name_tool -id "$(DESTDIR)$(OPENBLAS_LIBRARY_DIR)/$(LIBDYNNAME)" "$(DESTDIR)$(OPENBLAS_LIBRARY_DIR)/$(LIBDYNNAME)"
85+
@-install_name_tool -id "$(OPENBLAS_LIBRARY_DIR)/$(LIBPREFIX).$(MAJOR_VERSION).dylib" "$(DESTDIR)$(OPENBLAS_LIBRARY_DIR)/$(LIBDYNNAME)"
8686
@cd "$(DESTDIR)$(OPENBLAS_LIBRARY_DIR)" ; \
8787
ln -fs $(LIBDYNNAME) $(LIBPREFIX).dylib ; \
8888
ln -fs $(LIBDYNNAME) $(LIBPREFIX).$(MAJOR_VERSION).dylib

Makefile.prebuild

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ all: getarch_2nd
4242
./getarch_2nd 1 >> $(TARGET_CONF)
4343

4444
config.h : c_check f_check getarch
45-
perl ./c_check $(TARGET_MAKE) $(TARGET_CONF) $(CC) $(TARGET_FLAGS)
45+
perl ./c_check $(TARGET_MAKE) $(TARGET_CONF) $(CC) $(TARGET_FLAGS) $(CFLAGS)
4646
ifneq ($(ONLY_CBLAS), 1)
4747
perl ./f_check $(TARGET_MAKE) $(TARGET_CONF) $(FC) $(TARGET_FLAGS)
4848
else
@@ -59,13 +59,13 @@ endif
5959

6060

6161
getarch : getarch.c cpuid.S dummy $(CPUIDEMU)
62-
$(HOSTCC) $(CFLAGS) $(EXFLAGS) -o $(@F) getarch.c cpuid.S $(CPUIDEMU)
62+
$(HOSTCC) $(HOST_CFLAGS) $(EXFLAGS) -o $(@F) getarch.c cpuid.S $(CPUIDEMU)
6363

6464
getarch_2nd : getarch_2nd.c config.h dummy
6565
ifndef TARGET_CORE
66-
$(HOSTCC) -I. $(CFLAGS) -o $(@F) getarch_2nd.c
66+
$(HOSTCC) -I. $(HOST_CFLAGS) -o $(@F) getarch_2nd.c
6767
else
68-
$(HOSTCC) -I. $(CFLAGS) -DBUILD_KERNEL -o $(@F) getarch_2nd.c
68+
$(HOSTCC) -I. $(HOST_CFLAGS) -DBUILD_KERNEL -o $(@F) getarch_2nd.c
6969
endif
7070

7171
dummy:

Makefile.system

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ ifndef GOTOBLAS_MAKEFILE
214214
export GOTOBLAS_MAKEFILE = 1
215215

216216
# Generating Makefile.conf and config.h
217-
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)
217+
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)
218218

219219
ifndef TARGET_CORE
220220
include $(TOPDIR)/Makefile.conf

c_check

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,12 @@ $binary = $ENV{"BINARY"};
1818
$makefile = shift(@ARGV);
1919
$config = shift(@ARGV);
2020

21-
$compiler_name = join(" ", @ARGV);
21+
$compiler_name = shift(@ARGV);
22+
$flags = join(" ", @ARGV);
2223

2324
# First, we need to know the target OS and compiler name
2425

25-
$data = `$compiler_name -E ctest.c`;
26+
$data = `$compiler_name $flags -E ctest.c`;
2627

2728
if ($?) {
2829
printf STDERR "C Compiler ($compiler_name) is something wrong.\n";
@@ -175,7 +176,7 @@ if ($defined == 0) {
175176

176177
# Do again
177178

178-
$data = `$compiler_name -E ctest.c`;
179+
$data = `$compiler_name $flags -E ctest.c`;
179180

180181
if ($?) {
181182
printf STDERR "C Compiler ($compiler_name) is something wrong.\n";
@@ -195,7 +196,7 @@ if (($architecture eq "mips") || ($architecture eq "mips64")) {
195196
print $tmpf "void main(void){ __asm__ volatile($code); }\n";
196197

197198
$args = "$msa_flags -o $tmpf.o $tmpf";
198-
my @cmd = ("$compiler_name $args >/dev/null 2>/dev/null");
199+
my @cmd = ("$compiler_name $flags $args >/dev/null 2>/dev/null");
199200
system(@cmd) == 0;
200201
if ($? != 0) {
201202
$have_msa = 0;
@@ -236,7 +237,7 @@ if (($architecture eq "x86") || ($architecture eq "x86_64")) {
236237
if ($compiler eq "PGI") {
237238
$args = " -tp skylake -c -o $tmpf.o $tmpf";
238239
}
239-
my @cmd = ("$compiler_name $args >/dev/null 2>/dev/null");
240+
my @cmd = ("$compiler_name $flags $args >/dev/null 2>/dev/null");
240241
system(@cmd) == 0;
241242
if ($? != 0) {
242243
$no_avx512 = 1;
@@ -247,7 +248,7 @@ if (($architecture eq "x86") || ($architecture eq "x86_64")) {
247248
}
248249
}
249250

250-
$data = `$compiler_name -S ctest1.c && grep globl ctest1.s | head -n 1 && rm -f ctest1.s`;
251+
$data = `$compiler_name $flags -S ctest1.c && grep globl ctest1.s | head -n 1 && rm -f ctest1.s`;
251252

252253
$data =~ /globl\s([_\.]*)(.*)/;
253254

@@ -263,27 +264,14 @@ if ($architecture ne $hostarch) {
263264

264265
$cross = 1 if ($os ne $hostos);
265266

266-
# rework cross suffix and architecture if we are on OSX cross-compiling for ARMV8-based IOS
267-
# the initial autodetection will have been confused by the command-line arguments to clang
268-
# and the cross-compiler apparently still claims to build for x86_64 in its CC -E output
269-
if (($os eq "Darwin") && ($cross_suffix ne "")) {
270-
my $tmpnam = `xcrun --sdk iphoneos --find clang`;
271-
$cross_suffix = substr($tmpnam, 0, rindex($tmpnam, "/")+1 );
272-
# this should produce something like $cross_suffix="/Applications/Xcode-10.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/";
273-
$cross =1;
274-
$architecture = arm64;
275-
}
276-
277-
278-
279267
$openmp = "" if $ENV{USE_OPENMP} != 1;
280268

281269
$linker_L = "";
282270
$linker_l = "";
283271
$linker_a = "";
284272

285273
{
286-
$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`;
274+
$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`;
287275

288276
$link =~ s/\-Y\sP\,/\-Y/g;
289277

kernel/power/KERNEL.POWER8

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,10 @@ ZTRSMKERNEL_RT = ../generic/trsm_kernel_RT.c
8888
#
8989
#SMINKERNEL = ../arm/min.c
9090
#DMINKERNEL = ../arm/min.c
91-
#
91+
92+
ISMINKERNEL = imin.S
93+
ISMAXKERNEL = imax.S
94+
9295
ifneq ($(__BYTE_ORDER__),"__ORDER_BIG_ENDIAN__")
9396
ifneq ($(GCCVERSIONGTEQ9),1)
9497
ISAMAXKERNEL = isamax_power8.S

0 commit comments

Comments
 (0)