-
-
Notifications
You must be signed in to change notification settings - Fork 12.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
workflows: add self-hosted runners #50468
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: Build bottles. | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- 'Formula/*' | ||
|
||
jobs: | ||
build-bottles: | ||
strategy: | ||
matrix: | ||
version: [10.15, 10.14, 10.13] | ||
runs-on: ${{ matrix.version }} | ||
env: | ||
HOMEBREW_GIT_NAME: BrewTestBot | ||
HOMEBREW_GIT_EMAIL: 'homebrew-test-bot@lists.sfconservancy.org' | ||
PATH: '/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin' | ||
HOMEBREW_DEVELOPER: 1 | ||
HOMEBREW_NO_ANALYTICS: 1 | ||
HOMEBREW_NO_AUTO_UPDATE: 1 | ||
steps: | ||
- name: Setup tap | ||
run: | | ||
git -C $(brew --repo) remote set-url origin https://github.com/Homebrew/brew | ||
cd $(brew --repo ${{ github.repository }}) | ||
git config remote.origin.url https://github.com/Homebrew/homebrew-core/ | ||
git fetch origin refs/pull/${{ github.event.pull_request.number }}/merge | ||
git checkout -f FETCH_HEAD | ||
- name: Cleanup | ||
run: | | ||
BREW_LIST=$(brew list 2>/dev/null) | ||
if [ -n "$BREW_LIST" ]; then | ||
echo ">> brew uninstall" | ||
brew uninstall --force --ignore-dependencies $BREW_LIST | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It doesn’t. I need to figure out what environment variables test bot is looking at on Jenkins to determine its cleanup behavior. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sounds good, thanks 👍 |
||
fi | ||
rm -rf bottles | ||
rm -rf * | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What's it cleaning up here? Does GitHub Actions not provide a clean space to each runner? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd suggest this cleanup logic go into There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
For GitHub hosted runners, yes, but this is basically like Jenkins where we need to do all of that. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sounds good! |
||
find . /usr/local/Homebrew -name .git/gc.log -delete | ||
brew update-reset /usr/local/Homebrew | ||
brew update | ||
- name: Build bottles | ||
run: | | ||
mkdir bottles | ||
cd bottles | ||
brew test-bot --ci-pr | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This copies the Jenkins configuration. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Think it could be removed there too! |
||
- name: Upload bottles | ||
if: always() | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: bottles | ||
path: bottles | ||
- name: Cleanup | ||
if: always() | ||
run: | | ||
BREW_LIST=$(brew list 2>/dev/null) | ||
if [ -n "$BREW_LIST" ]; then | ||
echo ">> brew uninstall" | ||
brew uninstall --force --ignore-dependencies $BREW_LIST | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
fi | ||
rm -rf bottles | ||
rm -rf * |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this use actions/checkout@master?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This copies the Jenkins configuration. I believe test bot looks at the current brew repository, not its current directory.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I understand this, can you elaborate a bit?