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

Support extracting from a tarball/artifact/URL #190

Open
umarcor opened this issue Jan 9, 2022 · 2 comments
Open

Support extracting from a tarball/artifact/URL #190

umarcor opened this issue Jan 9, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@umarcor
Copy link
Contributor

umarcor commented Jan 9, 2022

It would be interesting for setup-msys2 to support a third source type. Apart from the built-in installation or a clean release, it would be convenient if users could provide their own tarball/artifact. That would allow to use one job in the workflow for setup (installing/updating the dependencies) and then reuse it in multiple parallel jobs. Currently, using setup-msys2 in parallel does update multiple packages redundantly.

@eine eine added the enhancement New feature or request label Jan 9, 2022
@Biswa96
Copy link
Member

Biswa96 commented Jan 9, 2022

It may be easier to understand with an example. Like, pacman -U command accepts URL or path of a package.

@umarcor
Copy link
Contributor Author

umarcor commented Jan 9, 2022

@Biswa96 the point is to avoid downloading and extracting/installing the same packages multiple times in parallel. See, for example: https://github.com/umarcor/neorv32-setups/actions/runs/1673157184

A MWE of the proposal would be:

name: Test

on:
 push:
 pull_request:
 schedule:
   - cron: '0 0 * * 3,6'

jobs:


 setup:
   runs-on: windows-latest
   steps:

   - uses: msys2/setup-msys2@v2
     with:
       update: true
       install: >-
         base-devel
         git
       pacboy: >-
         icestorm:p
         yosys:p
         nextpnr:p

   - name: '📤 Upload MSYS2 installation'
     uses: actions/upload-artifact@v2
     with:
       path: location_of_msys2???

 run:
   needs: setup
   runs-on: windows-latest
   strategy:
     fail-fast: false
     matrix:
       include:
         - acase
         - anothercase
         - athirdcase
         - ...
   defaults:
     run:
       shell: msys2 {0}
   steps:

   - uses: msys2/setup-msys2@v2
     with:
       update: false
       release: artifact???

   - run: uname -a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants