nikic / buffer

PHP extension for buffer based typed arrays
Other
42 stars 5 forks source link

Building different versions using GitHub actions #5

Closed DrDub closed 1 year ago

DrDub commented 1 year ago

At the end of the PHP 7 migration, @nikic mentioned:

It would probably be good to add some basic Github Actions setup to check that things build with versions which are intended to be supported. Always a bit tricky with differences across versions.

So I guess this is the next step, I can work on that. I'll try to get the GitHub actions to build also a Windows version.

Regarding supporting multiple versions, what do you recommend? The code can be in a different branch per version or use #ifdef to enable/disable sections of the code. Or any other way you prefer.

DrDub commented 1 year ago

Oh, you already added the GitHub actions. Fantastic. Maybe I should close this.

nikic commented 1 year ago

Yeah, this is already done.

Regarding supporting multiple versions, what do you recommend? The code can be in a different branch per version or use #ifdef to enable/disable sections of the code. Or any other way you prefer.

Definitely #ifdef, merging across branches is a much larger hassle. Though if we drop PHP 7 support, there's hopefully very little to #ifdef.