Compile and run GLFW tests for all platforms

Is there some way that I can execute the CMake build, compilation and tests for GLFW, without pushing commits to Github? I’ve recently been working on a few PRs for GLFW, and it’s been bothering me that I can’t properly have my code analyzed and tested before committing and pushing to the PRs. When I push changes to the remote repository’s branch, and this branch is a part of a PR for GLFW, Github executes 5 CIs for my code. Locally, I’m on MacOS, using the CMake-generated Xcode project for development. Only recently did I realize that I can run the MacOS CI locally on my machine, but I still cannot run the others without bothering everyone following the GLFW repository, with lots of notifications every time I need to test my code. And, of course, I keep running into tiny syntax errors in the Win32, WL and X11 code, code that XCode doesn’t analyze. Very annoying. Is there anything I can do to improve my workflow, and prevent spamming everyone?

PS: sorry for the spam!

The easiest way I can think of would be to replicate the GLFW Github Actions on your own repo, and push to a branch which isn’t referenced by the PR. So for a given PR you would have two branches, one the actual PR branch and one the dev PR branch.

My own workflow is to run tests via a Windows .bat scripts for WSL (which now supports graphics) and Windows, which can test X11, Wayland and Win32 configurations. I then run MacOS on a physical Mac machine manually if all the other tests pass. If you have a VM on MacOS which supports OpenGL you might be able to do something similar.

1 Like

With the most recent commit to the main branch you should now be able to trigger manual builds as well, via website, tool or API. Any branch that includes this edit should gain this ability, even in a fork and even if the branch filter in the workflow doesn’t mention it.

1 Like


Thanks. This seemed like the correct solution at first, however, it doesn’t seem to be possible to run workflows on local branches. I’d like to run the workflows on uncommitted local changes, and if that’s not possible, the next best is un-pushed local commits. I may have missed something obvious, but so far, it only seems like I can run them on pushed commits, which leaves me no further than Doug’s solution.

Thanks to @dougbinks for your advice, as well. I definitely will look into getting a VM back up and running again, not too far into the future.

Huh, wonder if it’s some side effect of the privileges I have on the upstream repo then.


I may just have misunderstood or overlooked something. I settled on a separate branch, which is the PR branch with the prefix dev-, then push to this when I need to run the CI tasks, then run gh workflow run Build --ref dev-<> in the Terminal. The AppVeyor task is not run at all. I’m not aware of any way to instruct the gh workflow command to use a local branch. I don’t have any experience with the Github CLI prior to GLFW, and it’s been a while since I used Git, so it’s possible I just missed something obvious.