-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add bot to automatically regenerate files via glow
- Loading branch information
1 parent
07e5d0e
commit 702d9c7
Showing
1 changed file
with
83 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
name: Regenerate bindings | ||
on: | ||
# Uncomment during development to make testing easier | ||
#push: | ||
schedule: | ||
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule | ||
# Runs on Mon,Thu. For help with cron syntax, see https://crontab.guru/ | ||
- cron: '33 1 * * 1,4' | ||
|
||
jobs: | ||
regenerate: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install Mesa | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install \ | ||
libxcursor-dev \ | ||
libxrandr-dev \ | ||
libxinerama-dev \ | ||
libxi-dev \ | ||
libgl1-mesa-dev | ||
- name: Checkout gl | ||
uses: actions/checkout@v4 | ||
with: | ||
path: gl | ||
|
||
- name: Checkout glow | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: go-gl/glow | ||
path: glow | ||
|
||
- name: Checkout examples | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: go-gl/example | ||
path: example | ||
|
||
- name: Setup Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: 'stable' | ||
|
||
- name: Regenerate files | ||
run: | | ||
go work init | ||
go work use gl/ | ||
go work use glow/ | ||
go work use example/ | ||
cd gl | ||
# Clean up previously generated files | ||
rm -r */ | ||
go generate -tags=gen . | ||
go test -v -race ./... | ||
cd .. | ||
# Test for API breakage | ||
go test ./example/... | ||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v5 | ||
with: | ||
path: gl | ||
commit-message: Regenerate bindings | ||
author: GitHub <[email protected]> | ||
title: Regenerate bindings | ||
body: | | ||
This pull request was triggered by one of the following events: | ||
- https://github.com/go-gl/glow has been updated | ||
- The output of gofmt has changed in the latest Go version | ||
If checks are not available, you may need to close and reopen this pull request. | ||
[See here for details.][2] | ||
Auto-generated by [create-pull-request][1] | ||
[1]: https://github.com/peter-evans/create-pull-request | ||
[2]: https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#workarounds-to-trigger-further-workflow-runs | ||
branch: regenerate |