91 lines
2.6 KiB
YAML
91 lines
2.6 KiB
YAML
# 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
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
|
cancel-in-progress: true
|
|
|
|
permissions:
|
|
contents: read # to fetch code (actions/checkout)
|
|
|
|
jobs:
|
|
build-OpenBLAS-with-Homebrew:
|
|
if: "github.repository == 'OpenMathLib/OpenBLAS'"
|
|
runs-on: macos-latest
|
|
env:
|
|
DEVELOPER_DIR: /Applications/Xcode_11.4.1.app/Contents/Developer
|
|
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"
|
|
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: "ON"
|
|
HOMEBREW_NO_INSTALL_FROM_API: "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
|