<div dir="ltr">Hello,<br><br>Richard Barton asked me to check if we could use github actions to get automatic builds and tests for flang on push actions: PR creation or update and merge to master.<br><br>We would like to request your comments on the following proposal of how this could be implemented:<br><br>1) On every push action to master branch in flang-compiler/flang repository Github action will:<br>  * Download the pre-built llvm and flang-driver artifacts for installation and install them.<br>  * Build and install OpenMP (about 30 seconds)<br>  * Build libpgmath and flang project.<br>  * Run make check-all to test the build.<br><br>  The action takes about 7-8 minutes and gives a clear pass/fail result in the Pull Request, including links to the build logs.<br><br>  Example PRs to demonstrate how this works:<br>  * Breaking the build: <a href="https://github.com/michalpasztamobica/flang/pull/1">https://github.com/michalpasztamobica/flang/pull/1</a><br>  * Breaking the tests: <a href="https://github.com/michalpasztamobica/flang/pull/3">https://github.com/michalpasztamobica/flang/pull/3</a><br>  * Harmless change resulting in a successful build: <a href="https://github.com/michalpasztamobica/flang/pull/2">https://github.com/michalpasztamobica/flang/pull/2</a><br><br>  The script itself: <a href="https://github.com/michalpasztamobica/flang/blob/master/.github/workflows/build_flang.yml">https://github.com/michalpasztamobica/flang/blob/master/.github/workflows/build_flang.yml</a><br><br>2) On every push action to release_90 in flang-compiler/flang-driver repository Github actions will:<br>  * Download the pre-built llvm artifacts for installation and install them.<br>  * Build flang-driver project according to official instructions.<br>  * Upload the resulting build directory as an artifact to be used in step (1).<br><br>  The script is here: <a href="https://github.com/michalpasztamobica/flang-driver/blob/release_90/.github/workflows/build_flang-driver.yml">https://github.com/michalpasztamobica/flang-driver/blob/release_90/.github/workflows/build_flang-driver.yml</a><br><br>3) On every push action to release_90 in flang-compiler/llvm repository Github actions will:<br>  * Build llvm project according to official instructions.<br>  * Upload the resulting build directory as an artifact to be used in step (1 and 2).<br><br>  The script is here: <a href="https://github.com/michalpasztamobica/llvm/blob/release_90/.github/workflows/build_llvm.yml">https://github.com/michalpasztamobica/llvm/blob/release_90/.github/workflows/build_llvm.yml</a><br><br><br>Here's a few points giving the rationale behind the described solutions<br><br>1) We want to keep the whole process on github. Hence - we rely on artifacts built and uploaded by github actions. Github holds artifacts for 90 days, so sometimes a manual trigger of some jobs may be necessary. I haven't found a way to automate this so it works as if cron was setup to trigger it every 90 days. We could consider doing binary releases instead, especially that this topic has been discussed already during Wednesday calls, but we suggest we start small and then expand a working solution.<br><br>2) We focus on flang repository commits - we tried to keep them as quick as possible, hence the builds rely on other jobs to build the artifacts and we don't run tests for llvm or flang-driver.<br><br>3) We build X86, Aarch64 and PowerPC for llvm and flang-driver. Github only provides X86 machines with different operating systems, so for building and testing flang itself we are bound to X86 only. We could set up "self-hosted runners" to be triggerred with github actions if we had a machine available somewhere.<br><br>Next steps:<br><br>Once we get the comments we will try to implement them and submit PRs for merging the presented yml scripts to all three repositories.<br><br>Many thanks to Andrzej Warzynski for their insightful review remarks to the scripts and to Richard Barton for driving this idea.<div><br></div><div>I am looking forward to hearing your comments! You can also reach me on the flang-compiler Slack channel.</div><div><br></div><div>Best regards,<br><div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr">Michał Paszta<br>Senior Consultant / Senior Group Manager</div><div dir="ltr"><br></div><div dir="ltr">Tel: +48 664 964 158</div><div dir="ltr">RingCentral: 2524<br>Address: Skierniewicka 10a, 01-230 Warszawa<br></div></div></div></div></div></div></div></div></div></div></div></div></div></div>

<br>
<div style="font-family:Arial,Helvetica,sans-serif;font-size:1.3em"><font face="Arial, Helvetica, sans-serif" size="2">Mobica is a global software services company, delivering and enabling technologies that transform business outcomes for the leading brands in Automotive, Silicon, FinTech, Media and Telecoms. Headquartered in Wilmslow UK with offices across Europe and the US, our established technical and delivery excellence in high quality software engineering drives success for our multinational customers on every continent, every day.</font></div><div style="font-family:Arial,Helvetica,sans-serif;font-size:1.3em"><font face="Arial, Helvetica, sans-serif" size="2">Find out more at <a href="https://www.mobica.com" target="_blank">Mobica.com</a><br><br></font></div><div style="font-family:Arial,Helvetica,sans-serif;font-size:1.3em"><img src="https://www.mobica.com/mobica_mail_tagline.png"><br><br></div><div><div style="font-family:Arial,Helvetica,sans-serif"><font size="1">Mobica Limited is a limited company registered in England and Wales with registered number 05169596 and VAT registered number 223837508. Our registered office is at Crown House, Manchester Road, Wilmslow, Cheshire, SK9 1BH, UK.</font></div><div style="font-family:Arial,Helvetica,sans-serif"><font size="1">This message is intended solely for the addressee(s) and may contain confidential information.</font></div><div><font size="1"><font face="Arial, Helvetica, sans-serif">If you have received this message in error, please send it back to us, and immediately and permanently delete it.</font><br><font face="Arial, Helvetica, sans-serif">Do not use, copy or disclose the information contained in this message or in any attachment.</font><br><font face="Arial, Helvetica, sans-serif">Mobica complies with all requirements of GDPR and other relevant data protection law. You can view our Privacy Policy at <a href="https://mobica.com/privacy-policy/" target="_blank">https://mobica.com/privacy-<wbr>policy/</a></font></font></div></div>