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

verify and publish binaries generated by CI #229

Merged
merged 1 commit into from
Feb 21, 2022

Conversation

alaviss
Copy link
Contributor

@alaviss alaviss commented Feb 9, 2022

Summary

This is the final portion of continous delivery pipeline which creates a
release based on artifacts created during a CI run done as part of a
merge via bors.

The release created will contain a JSON manifest and release binaries.
The JSON manifest follows this schema:

{
  "manifestVersion": 0,
  "version": "version identifier (ie. 0.1.0-dev.20000)",
  "source": {
    "name": "source-archive-name",
    "sha256": "checksum"
  },
  "binaries": [
    {
      "target": "the target triplet (eg. x86_64-linux-gnu)",
      "name": "binary-archive-name",
      "sha256": "checksum"
    }
  ]
}

This manifest allow tools to easily pick out the artifact that they need
depending on the target operating system, and it also prevent the need
to hard-code a specific file name format in such tools.

Details

This PR comes with:

  • A release manifest manipulation tool: This tool is used to create a
    release manifest from archive manifests generated by niminst. At the
    moment it does not have many features other than the ones required by
    the pipeline. Refer to the tool built-in help for details on how to
    use it.

  • An additional test in main CI to verify that the release manifest tool
    can create a release manifest from binaries generated there.

  • Extra steps in publisher that download and create a release out of
    artifacts created by main CI.


Notes for Reviewers

  • Currently it does not support automated creation of a non-development release. This will come later.

  • The release description is very plain at the moment. Suggestions on what to put in them would be appreciated.

  • This pipeline will create a release on the main repository, which makes it a bit scary as tags are not removable (they can, but should never be done).

  • A test release created by this pipeline can be found here: https://github.com/alaviss/nimskull/releases/tag/0.1.0-dev.20056

@alaviss alaviss requested a review from saem February 9, 2022 17:42
Copy link
Collaborator

@saem saem left a comment

Choose a reason for hiding this comment

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

For the release description I think the only improvement would be a change log, commit message titles perhaps?

## :triplet:
## The triplet it is targeting
if file.len == 0:
raise newException(ValueError):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Future directional thought: We really should bring result/try into stdlib.

For maximum performance DOD land, the database should probably just have error storage that needs to be resolved and cleared prior to using it further -- not recommend here.

tools/release_manifest.nim Show resolved Hide resolved
This is the final portion of continous delivery pipeline which creates a
release based on artifacts created during a CI run done as part of a
merge via bors.

The release created will contain a JSON manifest and release binaries.
The JSON manifest follows this schema:

```json
{
  "manifestVersion": 0,
  "version": "version identifier (ie. 0.1.0-dev.20000)",
  "source": {
    "name": "source-archive-name",
    "sha256": "checksum"
  },
  "binaries": [
    {
      "target": "the target triplet (eg. x86_64-linux-gnu)",
      "name": "binary-archive-name",
      "sha256": "checksum"
    }
  ]
}
```

This manifest allow tools to easily pick out the artifact that they need
depending on the target operating system, and it also prevent the need
to hard-code a specific file name format in such tools.

Coming in this commit is:

- A release manifest manipulation tool: This tool is used to create a
  release manifest from archive manifests generated by niminst. At the
  moment it does not have many features other than the ones required by
  the pipeline. Refer to the tool built-in help for details on how to
  use it.

- An additional test in main CI to verify that the release manifest tool
  can create a release manifest from binaries generated there.

- Extra steps in publisher that download and create a release out of
  artifacts created by main CI.
@alaviss alaviss force-pushed the publish-bin-upstream branch from e179d54 to 354010a Compare February 14, 2022 01:06
Copy link
Collaborator

@saem saem left a comment

Choose a reason for hiding this comment

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

bors r+

@saem
Copy link
Collaborator

saem commented Feb 21, 2022

We gunna get nightlies! 🎉

@bors
Copy link
Contributor

bors bot commented Feb 21, 2022

Build succeeded:

@bors bors bot merged commit fe9e942 into nim-works:devel Feb 21, 2022
@alaviss alaviss deleted the publish-bin-upstream branch February 21, 2022 04:22
@haxscramper haxscramper added the ci Continuous Integration label Nov 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Continuous Integration
Projects
Development

Successfully merging this pull request may close these issues.

3 participants