Skip to content
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

Readme: Add Github Actions nightly workflow status badge #8971

Merged
merged 1 commit into from
Jul 11, 2022

Conversation

Ayesh
Copy link
Contributor

@Ayesh Ayesh commented Jul 10, 2022

Follows-up #8970.

@TimWolla
Copy link
Member

I'm not sure if "Nightly" is the correct choice to display, as that one is highly dynamic. I think the "Push" workflow would be more appropriate, as that's specific to master and thus consistent with the other services to my understanding.

@iluuu1994
Copy link
Member

I agree with Tim, this should probably use the push workflow. The nightly workflow tests all changed branches. It would be nice to display nightly test results per branch, but that would require splitting up the workflow.

@Ayesh Ayesh force-pushed the readme-github-actions-badge branch from 754ec0f to fe4db6d Compare July 10, 2022 22:11
@Ayesh
Copy link
Contributor Author

Ayesh commented Jul 10, 2022

Thank you @iluuu1994 and @TimWolla, changed now.

It would be nice to display nightly test results per branch, but that would require splitting up the workflow.

I can imagine a matrix like this being quite helpful:

OS/Architecture PHP 7.4 PHP 8.0 PHP 8.1 master
Linux x64 -- -- -- --
Windows x64 -- -- -- --
Mac OS -- -- -- --

Unfortunately it doesn't look like we can do it yet, unless we use a service like shields.io to fetch the status of each item in a job matrix and generate SVG. Too complicated to pull, I'd say.

README.md Outdated
@@ -14,6 +14,7 @@ web development. Fast, flexible and pragmatic, PHP powers everything from your
blog to the most popular websites in the world. PHP is distributed under the
[PHP License v3.01](LICENSE).

[![Nightly](https://github.com/php/php-src/actions/workflows/push.yml/badge.svg)](https://github.com/php/php-src/actions/workflows/nightly.yml)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nightly badge should go probably after the build statuses and before fuzzer.

The standard (non nightly) build statuses should have an individual badge per php version/branch, which should be supported - https://github.community/t/workflow-status-badge-per-branch/16198/5

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The order now is Travis, Appveyor, Azure, Github Actions.

The standard (non nightly) build statuses should have an individual badge per php version/branch, which should be supported - https://github.community/t/workflow-status-badge-per-branch/16198/5

PHP-7.4 branch does not use the current line of CIs. I tried the nightly builds with the branch parameter changed, but the badges don't seem to be working correctly.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The order now is Travis, Appveyor, Azure, Github Actions.

I'd show the GitHub Actions badge first, as it's likely includes the most important jobs (x86-64 for Linux).

I tried the nightly builds with the branch parameter changed, but the badges don't seem to be working correctly.

I don't think that's how it works. The branch parameter will check which branch the workflow was triggered on. However, nightly is always triggered from master as all cron workflows are only triggered on the default branch.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. I just figured that the nightly.yml in master branch cleverly runs the builds on all active branches. But for status badges, you are right we can't really do it given the lack of the feature we have.

I also changed the order so GH Actions is shown first:

Push Build status Build status Build Status Fuzzing Status

@Ayesh Ayesh force-pushed the readme-github-actions-badge branch from fe4db6d to ff9cf9e Compare July 11, 2022 11:40
README.md Outdated
Comment on lines 17 to 20
[![Build status](https://travis-ci.com/php/php-src.svg?branch=master)](https://travis-ci.com/github/php/php-src)
[![Build status](https://ci.appveyor.com/api/projects/status/meyur6fviaxgdwdy/branch/master?svg=true)](https://ci.appveyor.com/project/php/php-src)
[![Build Status](https://dev.azure.com/phpazuredevops/php/_apis/build/status/php.php-src?branchName=master)](https://dev.azure.com/phpazuredevops/php/_build/latest?definitionId=1&branchName=master)
[![Push](https://github.com/php/php-src/actions/workflows/push.yml/badge.svg)](https://github.com/php/php-src/actions/workflows/push.yml)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[![Build status](https://travis-ci.com/php/php-src.svg?branch=master)](https://travis-ci.com/github/php/php-src)
[![Build status](https://ci.appveyor.com/api/projects/status/meyur6fviaxgdwdy/branch/master?svg=true)](https://ci.appveyor.com/project/php/php-src)
[![Build Status](https://dev.azure.com/phpazuredevops/php/_apis/build/status/php.php-src?branchName=master)](https://dev.azure.com/phpazuredevops/php/_build/latest?definitionId=1&branchName=master)
[![Push](https://github.com/php/php-src/actions/workflows/push.yml/badge.svg)](https://github.com/php/php-src/actions/workflows/push.yml)
[![Build status for PHP 8.0](https://github.com/php/php-src/actions/workflows/push.yml/badge.svg?branch=PHP-8.0)](https://github.com/php/php-src/actions/workflows/push.yml?query=branch%3APHP-8.0)
[![Build status for PHP 8.1](https://github.com/php/php-src/actions/workflows/push.yml/badge.svg?branch=PHP-8.1)](https://github.com/php/php-src/actions/workflows/push.yml?query=branch%3APHP-8.1)
[![Build status for PHP 8.2](https://github.com/php/php-src/actions/workflows/push.yml/badge.svg?branch=master)](https://github.com/php/php-src/actions/workflows/push.yml?query=branch%3Amaster)
[![Build status](https://travis-ci.com/php/php-src.svg?branch=master)](https://travis-ci.com/github/php/php-src)
[![Build status](https://ci.appveyor.com/api/projects/status/meyur6fviaxgdwdy/branch/master?svg=true)](https://ci.appveyor.com/project/php/php-src)
[![Build Status](https://dev.azure.com/phpazuredevops/php/_apis/build/status/php.php-src?branchName=master)](https://dev.azure.com/phpazuredevops/php/_build/latest?definitionId=1&branchName=master)

here is how it is rendered: https://github.com/php/php-src/blob/ff9cf9e4bcb855b67dc21bf27ead57199ba81f51/README.md, the badge annotation is not displayed... maybe we should introduce 3 separate lines for each supported PHP version

GH should be first, it will shortly test Windows as well

and for each line/version, nightly should be 2nd badge and the workflow should be changed, so it is triggered from cron on master on every branch - https://github.com/php/php-src/actions/workflows/nightly.yml?query=branch%3APHP-8.1

@Ayesh Ayesh force-pushed the readme-github-actions-badge branch from ff9cf9e to 8952223 Compare July 11, 2022 12:08
@iluuu1994 iluuu1994 merged commit a759a7f into php:master Jul 11, 2022
@iluuu1994
Copy link
Member

Thank you @Ayesh! Any further improvements like a matrix can be done in a follow up.

@Ayesh Ayesh deleted the readme-github-actions-badge branch March 12, 2024 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants