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

Create a GitHub Action (or several) to simplify using this #13

Open
fingolfin opened this issue Mar 26, 2021 · 1 comment
Open

Create a GitHub Action (or several) to simplify using this #13

fingolfin opened this issue Mar 26, 2021 · 1 comment

Comments

@fingolfin
Copy link
Member

Right now to use this we copy & past the oscar.yml file from here to each of our repositories and edit it as needed. Drawback is that tweaking anything in there now required updating several repositories. It can also be easy to miss difference between the different copies. And someone trying to understand the oscar.yml has a lot on their plate.

We could create a GitHub Action (or multiple) to factor out some or even all of the duplicate code. E.g. right now, I think this sequence is repeated twice in our actions:

      - name: re-using OscarDevTools checkout
         if: github.repository == 'oscar-system/OscarDevTools.jl'
         run: |
           julia --project=oscar-dev -e "using Pkg;
                                         Pkg.develop(PackageSpec(path=\".\"));
                                         Pkg.instantiate();"
       - name: fetch OscarDevTools
         if: github.repository != 'oscar-system/OscarDevTools.jl'
         run: |
           julia --project=oscar-dev -e "using Pkg;
                                         Pkg.add(PackageSpec(name=\"OscarDevTools\",version=\"0.2\"));
                                         Pkg.instantiate();"

Well, this could be put into an action oscar-system/install-devtools and then can be replaced by something like this:

       - uses: oscar-system/[email protected]

Writing a simply GitHub Action (which basically acts like a "macro" that contains normal GH Actions YML, with a few parameters), is actually relatively simple. We did it for GAP, see e.g. here: https://github.com/gap-actions/setup-gap-for-packages -- the only thing that really matters there is the action.yml which is mostly self-explanatory, I think. Of course adding a README, LICENSE, tests for the action we nice but not required. Nor is it required to put this into the marketplace.

Anyway, this is not urgent, I simply wanted to record this thought.

@thofma
Copy link
Contributor

thofma commented Mar 27, 2021

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

No branches or pull requests

2 participants