Skip to content

Commit 8f782f0

Browse files
authored
Merge pull request #2426 from zbeekman/nightly-homebrew-check
Nightly homebrew check
2 parents 6a517dc + 1a88c4a commit 8f782f0

1 file changed

Lines changed: 78 additions & 0 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

0 commit comments

Comments
 (0)