-
Notifications
You must be signed in to change notification settings - Fork 27
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 constructor based installer #247
base: master
Are you sure you want to change the base?
Conversation
@PiotrZierhoffer / @umarcor - Could you please review? I think it looks fine and thus we should merge but are unsure about the failures? |
@proppy - Any idea why things are failing in the CI? |
seems unrelated, nightly CI has similar failure: https://github.com/hdl/conda-eda/actions/runs/3253556045 |
but we can get #246 reviewed indepently if it eases the process. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm genuinely impressed by the whole idea and Conda construct itself as I didn't know the tool.
I tested using the installer and unfortunately stumbled upon such an error:
error copying "/root/silicon-env/share/openlane/designs/inverter/runs/RUN_2022.10.18_13.16.56/results/signoff/inverter.magic.gds": no such file or directory
while executing
"file copy -force $::env(MAGIC_GDS) $::env(CURRENT_GDS)"
(procedure "run_magic" line 21)
invoked from within
"run_magic"
(procedure "run_magic_step" line 3)
invoked from within
"[lindex $step_exe 0] [lindex $step_exe 1] "
(procedure "run_non_interactive_mode" line 52)
invoked from within
"run_non_interactive_mode {*}$argv"
(file "/root/silicon-env/share/openlane/flow.tcl" line 415)
invoked from within
"source "$::env(CONDA_PREFIX)/share/openlane/flow.tcl""
(file "/root/silicon-env/bin/flow.tcl" line 3)
but perhaps it'll get fixed by disabling this klayout xor?
What bothers me a little is that we'll have a tag added for each run of the Construct
workflow, i.e., with each Upload
workflow run from master. Do I get it right? Isn't there any other option to publish the installer?
with: | ||
name: "openlane-sky130a-installer" | ||
path: | | ||
/home/runner/work/conda-eda/conda-eda/openlane-sky130a-0-Linux-x86_64.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't there any variable available with this path?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that would be ${{ env.GITHUB_WORKSPACE }}/openlane-sky130a-0-Linux-x86_64.sh
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using openlane-sky130a-0-Linux-x86_64.sh
should also work. Since actions/checkout@v3
is used, the default location for other steps is the root of the repo already.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW I have no preference on the two.
Can you share the full log? I also have a more recent version of the installer here https://github.com/proppy/conda-eda/releases/tag/v0.0-1418-g170b751
I couldn't think of something else if we want to publish the installer as a GitHub release, another possibility it to move them on GCS in timestamped directory, that's something I think would also make sense for packages (see #204). |
Log: openlane.log |
@@ -0,0 +1,49 @@ | |||
name: Build installers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this a separated workflow instead of an additional job in Build?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not the same. Construct is a new workflow, which is called as a reusable workflow from Upload. I mean having it as an additional job in workflow Build, without creating a new (reusable) workflow.
The Build workflow might be executed directly, not as a reusable workflow, which would ignore the recipes/jobs defined in Construct. However, if you put this job in Build, then it will always be run together with other recipes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not the same. Construct is a new workflow, which is called as a reusable workflow from Upload. I mean having it as an additional job in workflow Build, without creating a new (reusable) workflow. The Build workflow might be executed directly, not as a reusable workflow, which would ignore the recipes/jobs defined in Construct. However, if you put this job in Build, then it will always be run together with other recipes.
Good point that it shouldn't be in fact run from Upload
but from Build
. Perhaps you could move the Construct job then @proppy and use needs: "openlane-linux"
for it? It'd be also nice to have openlane.sky130a
parametrized in Construct.yml so that it's reusable if we ever want to have more installers constructed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Build workflow might be executed directly, not as a reusable workflow, which would ignore the recipes/jobs defined in Construct. However, if you put this job in Build, then it will always be run together with other recipes.
My thinking that whe only want to "release" the installer when we actually publish the packages (so w/ that logic the same way we don't run Upload
when we run Build
independently, we couldn't run Construct
).
version: 0 | ||
|
||
channels: | ||
- https://conda.anaconda.org/litex-hub |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
litex-hub
alone should also work, isn't it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since all the constructor example were using fully qualified URLs: https://github.com/conda/constructor/search?q=conda.anaconda.org I assumed it was best-practice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems channel names are enough for other channels than main indeed: https://github.com/restlessronin/lila-deep/blob/415fc7172c49e0a1ae766c7c9331d0d85645ef33/.colab/construct.yaml
Though I found no construct.yaml
with plain main
on GH (https://github.com/search?q=main+extension%3Ayaml+filename%3Aconstruct.yaml&type=Code) so I have no preference on full URLs vs channel names.
TAG=$(git describe --tags) | ||
git tag $TAG | ||
git push origin "HEAD:refs/tags/$TAG" | ||
echo "TAG=$TAG" >> $GITHUB_ENV |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've just realized there are two issues here:
git describe --tags
will use tags from previous runs of this code inConstruct.yml
so pretty soon we'll have tags like:v0.0-1337-gc24a15291-X-gSHA-X-gSHA-X-gSHA-X-gSHA-...
- There's no check if the tag already exists and the workflow will be triggered every day (with
Upload.yml
nightly runs).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I did had this issue, and handled it by removing --tags
from the git describe
command
You're right it will overwrite the existing release with a new build even if there is no change in conda-eda
which could be unfortunate if there are some upstream change but no conda-eda
commit.
@PiotrZierhoffer, @umarcor would it make sense to setup a dedicated bucket for those installer artifacts so that we can get rid of the noise that automated tagging would add to the repo (as @ajelinski pointed in #247 (review)) |
Depends on #246
Fixes #245
Test with:
/cc @QuantamHD @umarcor @mithro