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

[ci] Add nightly firtool release build, options to workflow_dispatch #5742

Merged
merged 5 commits into from
Aug 3, 2023

Conversation

seldridge
Copy link
Member

@seldridge seldridge commented Aug 1, 2023

Add a nightly scheduled build of firtool. This is intended for other projects to consume to do top-of-tree testing.

Add options to control the manually run workflow dispatch build. This enables building any of [linux, macos, windows] builds and with an optional to disable testing. I've been using this to test the build. The UI that GitHub gives you is shown below:

Screenshot 2023-08-01 at 02 00 59

This is stacked on #5741 until that lands.

Once the nightly build is running, any user can grab this through the GitHub API, substituting $TOKEN for a GitHub personal or app token. The following script will grab the latest nightly and extract it.

ARTIFACT_NAME=firrtl-bin-linux-x64.tar.gz
ARTIFACT_ID=$(
  curl -L \
       -H "Accept: application/vnd.github+json" \
       -H "Authorization: Bearer $TOKEN" \
       -H "X-GitHub-Api-Version: 2022-11-28" \
       "https://api.github.com/repos/llvm/circt/actions/artifacts?name=firrtl-bin-linux-x64.tar.gz&per_page=1" | \
    jq '.artifacts[0].id')
curl -L \
     -H "Accept: application/vnd.github+json" \
     -H "Authorization: Bearer $TOKEN" \
     -H "X-GitHub-Api-Version: 2022-11-28" \
     https://api.github.com/repos/llvm/circt/actions/artifacts/$ARTIFACT_ID/zip \
     --output download.zip
unzip -p download.zip | tar zxf -
rm download.zip

@seldridge seldridge force-pushed the dev/seldridge/ci-firrtl-release-cleanup branch from 4b01037 to 9d34e62 Compare August 1, 2023 06:22
@seldridge seldridge force-pushed the dev/seldridge/nightly-tarballs branch from 6488e68 to 15a2942 Compare August 1, 2023 06:22
Copy link
Contributor

@jackkoenig jackkoenig 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 pretty cool, nice work!

@seldridge seldridge force-pushed the dev/seldridge/nightly-tarballs branch 16 times, most recently from 3e612c4 to 82b76c6 Compare August 3, 2023 01:21
Change the firtool release CI to not use a hard-coded build matrix.
Refactor this into two jobs:

  1. "choose-matrix" which constructs JSON blobs of what the paramters are
  for the build matrix.  These JSON blobs are constructed from the step
  environment ("env") to aid readability.

  2. "publish" which reads the JSON blobs to construct the build
  matrix.  (This operates basically the same as before.)

This is done to later enable more plasticity of this CI job for uses which
are not just release publishing, but also for nightly publihsing.

Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
Change the CI for building a release of firtool from using a split
LLVM/CIRCT build to a unified build.  The latter should be substantially
faster.

Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
Add nightly builds of `firtool` for Linux targets only.  These builds
occur everyday at 0700 UTC (0000 PDT/2300 PST).

Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
To facilitate testing, add an input OS variable.

Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
Add an environment option to skip CIRCT testing.  This is intended to be
used if the previous job knows that tests don't need to be run (or for
testing of actions with a slightly faster turnaround).

Expose this option as a workflow_dispatch input to make this easier to test.

Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
@seldridge seldridge force-pushed the dev/seldridge/nightly-tarballs branch from 82b76c6 to cbcda6c Compare August 3, 2023 03:06
@seldridge seldridge force-pushed the dev/seldridge/ci-firrtl-release-cleanup branch from 497c4fd to cbf10a0 Compare August 3, 2023 03:06
@seldridge seldridge changed the base branch from dev/seldridge/ci-firrtl-release-cleanup to main August 3, 2023 03:24
@seldridge seldridge marked this pull request as ready for review August 3, 2023 03:24
@seldridge seldridge merged commit cbcda6c into main Aug 3, 2023
10 checks passed
@seldridge seldridge deleted the dev/seldridge/nightly-tarballs branch August 3, 2023 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants