Fixed width for buttons or proportional with the text?

What is the best practice for a UI, to make all the similar buttons with a fixed width, no matter how long is the text (with the condition to fit) or make the width proportional with the text and add the same padding?

enter image description here

Update:

Please check also this example on Material Design Guidelines that suggest a minimum width and flexible width.

enter image description here

Dialog buttons Button height: 36dp Button top margin: 24dp Button padding: 8dp Button alignment: Right edge for LTR scripts Button width: Varies based on button text length

enter image description here

It is this a general rule?