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

Add workflow to create single source fpm version #563

Merged
merged 3 commits into from
Sep 13, 2021

Conversation

awvwgk
Copy link
Member

@awvwgk awvwgk commented Sep 7, 2021

This adds the script to generate the single source file version of fpm for bootstrapping. The following steps are used to generate the bootstrap version:

  1. remove test targets from package manifest by patch (remove after Only compile tests for fpm test command #92 is resolved)
  2. install an existing binary of fpm
  3. call fpm with compiler wrapper script to collect single source version
  4. build bootstrap version from single source version
  5. reverse patch the package manifest (remove after Only compile tests for fpm test command #92 is resolved)
  6. build fpm using the bootstrap version
  7. upload single source file version

Finally, the single source file version is uploaded on releases.

This patch also changes the release workflow to run on every commit, but only upload on releases. This allows to use the created artifacts from PRs to quickly bootstrap a new fpm version with some new features implemented.

Requires #560
Closes #391
Closes #559

@awvwgk
Copy link
Member Author

awvwgk commented Sep 7, 2021

You can find generated single source file version here: https://github.com/fortran-lang/fpm/suites/3704688086/artifacts/90445473

Note that links to uploaded artifacts from workflows expire quite quickly, go to the Checks tab to select the correct artifact if the link above is broken.

@awvwgk awvwgk added the automation Automated workflows for this project label Sep 8, 2021
Copy link
Member

@certik certik left a comment

Choose a reason for hiding this comment

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

This is really good. Thank you @awvwgk for this.

With this in, I feel the bootstrap is very robust: the master branch will always bootstrap using itself and we have scripts to create the single file. Thus when packaging, we can even use the same scripts to create the single source file; or we can continue using an older version --- it does not matter at this point, because if anything breaks with an older version we know that we can always create the single source and it will work.

This is fine with me to merge as is.

@awvwgk
Copy link
Member Author

awvwgk commented Sep 13, 2021

Thanks for reviewing. I'll go ahead and merge now.

@awvwgk awvwgk merged commit df8c9b4 into fortran-lang:main Sep 13, 2021
@awvwgk awvwgk deleted the single-source branch September 13, 2021 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automation Automated workflows for this project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adding source tarballs to the release Provide single source file fpm versions via CI workflow
3 participants