Skip to content

rebuild swig bottle #315

rebuild swig bottle

rebuild swig bottle #315

Workflow file for this run

---
name: brew test-bot
on:
push:
branches:
- main
- master
pull_request:
# workflow_dispatch: # NOTE: nova with homebrew gha
env:
HOMEBREW_NO_ANALYTICS: 1
HOMEBREW_NO_AUTO_UPDATE: 1
HOMEBREW_NO_INSTALL_CLEANUP: 1
jobs:
test-bot:
strategy:
# NOTE: ipatch, all three self hosted runners (vms) are hosted on same computer
# ...so limit job to one runner at a time.
# REF: https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs#defining-the-maximum-number-of-concurrent-jobs
max-parallel: 1
matrix:
# os: [ubuntu-latest, macos-latest] # NOTE: default
# NOTE: homebrew/homebrew-core uses private self hosted runners
# NOTE: `macOS-latest` is the default runner provided by github
os: [ self-hosted-catalinavm, self-hosted-bigsurvm, self-hosted-mojavevm ]
# os: [ self-hosted-catalinavm, self-hosted-bigsurvm ]
# os: [ self-hosted-mojavevm ]
runs-on: ${{ matrix.os }}
timeout-minutes: 1200
steps:
- name: Get current date
id: date
run: echo "date=$(date +'%Y-%m-%dT%H:%M:%S')" >> $GITHUB_ENV
- name: Log date
run: echo "${{ steps.date.outputs.date }}"
- name: Set default run status
run: echo "last_run_status=default" >> $GITHUB_ENV
- name: Restore last run status
id: last_run
uses: actions/cache@v2
with:
path: |
last_run_status
key: |
${{ github.run_id }}-${{ matrix.os }}-${{ steps.date.outputs.date }}
restore-keys: |
${{ github.run_id }}-${{ matrix.os }}-
- name: Set last run status
id: last_run_status
run: echo "The last run status is ${{ env.last_run_status }}"
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
- name: Cache Homebrew Bundler RubyGems
if: steps.last_run_status.outputs.last_run_status != 'success'
id: cache
uses: actions/[email protected]
with:
path: ${{ steps.set-up-homebrew.outputs.gems-path }}
key: ${{ runner.os }}-rubygems-${{ steps.set-up-homebrew.outputs.gems-hash }}
restore-keys: ${{ runner.os }}-rubygems-
- name: print env
run: env
# NOTE: exp with using a condition to add env var for mojave runner
# REF: https://docs.github.com/en/actions/learn-github-actions/environment-variables
- name: condition 1
if: runner.name == 'vmmojave'
run: echo "The operating system on the runner is, $RUNNER_OS."; echo HOMEBREW_DEVELOPER=1 >> $GITHUB_ENV
# NOTE: not possible to have two `run:` blocks within a `name`
# attempt reset env var that appears to be not resetting
# - name: condition attempt to reset HOMEBREW_CORE_GIT_REMOTE env var
# if: runner.name == 'vmmojave'
# run: echo HOMEBREW_CORE_GIT_REMOTE=https://github.com/homebrew/homebrew-core >> $GITHUB_ENV
- name: Install Homebrew Bundler RubyGems
if: steps.cache.outputs.cache-hit != 'true' && steps.last_run_status.outputs.last_run_status != 'success'
run: brew install-bundler-gems
- run: brew test-bot --only-cleanup-before
- run: brew test-bot --only-setup
- run: brew test-bot --only-tap-syntax
# - name: condition 2
# if: runner.name == 'vmmojave'
# run: echo HOMEBREW_CORE_GIT_REMOTE=https://github.com/ipatch/homebrew-core-mojave >> $GITHUB_ENV
# NOTE: ipatch, attempt to set homebrew-core repo to specific commit for catalina bottling
- name: check for catalina vm and set homebrew-core repo to specific commit
if: runner.name == 'vmcatalina'
run: |
cd $(brew --repo homebrew/core); \
git checkout ipatch-1015-cmake-bottle
- name: condition 3
if: runner.name == 'vmmojave'
run: |
sed -i '' \
-e '/[email protected]/d' \
-e '/[email protected]/d' \
-e '/[email protected]/d' \
-e '/[email protected]/d' \
$(brew --repo homebrew/core)/style_exceptions/binary_bootstrap_formula_urls_allowlist.json
- run: |
brew test-bot \
--only-formulae \
--only-json-tab \
--skip-recursive-dependents \
--root-url=https://ghcr.io/v2/freecad/homebrew-freecad
if: github.event_name == 'pull_request'
- name: Uplod bottles as artifact
if: always() && github.event_name == 'pull_request'
uses: actions/[email protected]
with:
name: bottles
path: '*.bottle.*'
- name: Save run status
if: steps.last_run_status.outputs.last_run_status != 'success'
run: echo "last_run_status=${{ steps.test_run.outcome }}" >> $GITHUB_ENV