Skip to content

Commit 2c242b4

Browse files
committed
Add Github Action to build development branch nightly with Homebrew
1 parent 0bfb733 commit 2c242b4

1 file changed

Lines changed: 63 additions & 0 deletions

File tree

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
on:
2+
push:
3+
pull_request:
4+
branches:
5+
- develop
6+
schedule:
7+
- cron: 45 7 * * *
8+
9+
name: Nightly-Homebrew-Build
10+
jobs:
11+
build-OpenBLAS-with-Homebrew:
12+
runs-on: macos-latest
13+
env:
14+
HOMEBREW_DEVELOPER: "ON"
15+
HOMEBREW_DISPLAY_INSTALL_TIMES: "ON"
16+
HOMEBREW_NO_ANALYTICS: "ON"
17+
HOMEBREW_NO_AUTO_UPDATE: "ON"
18+
HOMEBREW_NO_BOTTLE_SOURCE_FALLBACK: "ON"
19+
HOMEBREW_NO_INSTALL_CLEANUP: "ON"
20+
21+
steps:
22+
- name: Random delay for cron job
23+
run: |
24+
delay=$(( RANDOM % 600 ))
25+
printf 'Delaying for %s seconds on event %s' ${delay} "${{ github.event_name }}"
26+
sleep ${delay}
27+
if: github.event_name == 'schedule'
28+
29+
- uses: actions/checkout@v2
30+
31+
- name: Update Homebrew
32+
if: github.event_name != 'pull_request'
33+
run: brew update || true
34+
35+
- name: Install prerequisites
36+
run: brew install --fetch-HEAD --HEAD --only-dependencies --keep-tmp openblas
37+
38+
- name: Install and bottle OpenBLAS
39+
run: brew install --fetch-HEAD --HEAD --build-bottle --keep-tmp openblas
40+
41+
- name: Create bottle
42+
run: brew bottle -v openblas
43+
44+
- name: Upload bottle
45+
uses: actions/upload-artifact@v1
46+
with:
47+
name: openblas--HEAD.catalina.bottle.tar.gz
48+
paht: ./*.bottle.*
49+
50+
- name: Show linkage
51+
run: brew linkage -v openblas
52+
53+
- name: Test openblas
54+
run: brew test --HEAD --verbose openblas
55+
56+
- name: Audit openblas formula
57+
run: |
58+
brew audit --strict openblas
59+
brew cat openblas
60+
61+
- name: Post logs on failure
62+
if: failure()
63+
run: brew gist-logs --with-hostname -v openblas

0 commit comments

Comments
 (0)