-
Notifications
You must be signed in to change notification settings - Fork 14
BNCY CI Workflows
There are several GitHub actions workflows used to build the toolchain:
Workflow | Description |
---|---|
pull-request-swift-toolchain-cirun.yml | Runs swift-toolchain.yml on Azure images against pull requests. |
pull-request-swift-toolchain-github.yml | Runs swift-toolchain.yml on GitHub images against pull requests. |
schedule-swift-toolchain.yml | Runs swift-toolchain.yml every few hours. |
swift-toolchain.yml | The core workflow that powers the others. |
We generally try to minimize the diff between swift-toolchain.yml
in this repository and compnerd/swift-build
, with all major development taking place in compnerd/swift-build
. Ideally the files remain identical on the main
branch.
To trigger a CI build on-demand using the same powerful BCNY-owned runners as our scheduled builds, without any local changes, use schedule-swift-toolchain.yml
. For example:
gh workflow run 'schedule-swift-toolchain.yml' -R thebrowsercompany/swift-build
To test local changes, commit them and push them to a remote ref, then trigger the workflow on that ref. Remember to cleanup the ref when you are done. For example:
git commit -m "Commit my changes"
git push origin HEAD:refs/heads/username/my-changes
gh workflow run 'schedule-swift-toolchain.yml' -R thebrowsercompany/swift-build -r username/my-changes
# Remove the branch after testing.
git push origin -d username/my-changes
If you are already working on a local Git branch and you've pushed your changes to the remote, then you can also run this command to trigger the workflow on the same branch:
gh workflow run 'schedule-swift-toolchain.yml' -R thebrowsercompany/swift-build -r $(git branch --show-current)
For more control over workflow inputs, run swift-toolchain.yml
directly. Workflow inputs can be specified using the gh
client's -f
parameter which can be set multiple times with different key-value pairs. For example:
gh workflow run 'swift-toolchain.yml' -R thebrowsercompany/swift-build -f "default_runner=windows-latest"