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 constructor based installer #247

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

proppy
Copy link
Contributor

@proppy proppy commented Sep 27, 2022

Depends on #246
Fixes #245

Test with:

curl -L -O https://github.com/proppy/conda-eda/releases/download/v0.0-1358-g4ea08b3/openlane-sky130a-0-Linux-x86_64.sh
bash openlane-sky130a-0-Linux-x86_64.sh -b -p silicon-env/
source silicon-env/bin/activate 
flow.tcl -design inverter

/cc @QuantamHD @umarcor @mithro

@mithro
Copy link
Member

mithro commented Oct 10, 2022

@PiotrZierhoffer / @umarcor - Could you please review? I think it looks fine and thus we should merge but are unsure about the failures?

@mithro mithro changed the title add constructor based installer Add constructor based installer Oct 10, 2022
@mithro
Copy link
Member

mithro commented Oct 15, 2022

@proppy - Any idea why things are failing in the CI?

@proppy
Copy link
Contributor Author

proppy commented Oct 15, 2022

seems unrelated, nightly CI has similar failure: https://github.com/hdl/conda-eda/actions/runs/3253556045

@proppy
Copy link
Contributor Author

proppy commented Oct 15, 2022

but we can get #246 reviewed indepently if it eases the process.

Copy link
Contributor

@ajelinski ajelinski left a 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
Copy link
Contributor

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?

Copy link
Contributor Author

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

Copy link
Member

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.

Copy link
Contributor

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.

@proppy
Copy link
Contributor Author

proppy commented Oct 18, 2022

I tested using the installer and unfortunately stumbled upon such an error:

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

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?

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).

@ajelinski
Copy link
Contributor

Log: openlane.log

@@ -0,0 +1,49 @@
name: Build installers
Copy link
Member

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Member

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.

Copy link
Contributor

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.

Copy link
Contributor Author

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
Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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.

Comment on lines +39 to +42
TAG=$(git describe --tags)
git tag $TAG
git push origin "HEAD:refs/tags/$TAG"
echo "TAG=$TAG" >> $GITHUB_ENV
Copy link
Contributor

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:

  1. git describe --tags will use tags from previous runs of this code in Construct.yml so pretty soon we'll have tags like: v0.0-1337-gc24a15291-X-gSHA-X-gSHA-X-gSHA-X-gSHA-...
  2. There's no check if the tag already exists and the workflow will be triggered every day (with Upload.yml nightly runs).

Copy link
Contributor Author

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.

@proppy
Copy link
Contributor Author

proppy commented Nov 30, 2022

@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))

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.

Create constructor installers
4 participants