Run Parallel Builds on the Same OS Using Different Build Scripts

splatteredbits's Avatar

splatteredbits

26 Jan, 2021 11:12 PM

I am building a PowerShell module that supports both Windows PowerShell and PowerShell Core. On the Visual Studio 2015 and 2017 images, I'd like to run my build in Windows PowerShell (ps) and PowerShell Core (pwsh). I'm also running builds on Visual Studio 2019, Ubuntu, and mac OS. I can't figure out how to matrix this in such a way that I build on two instances of VS 2015 and VS 2017, a single instance on the others, and run different build scripts on the VS 2015/2017 instances. Is this possible?

  1. Support Staff 1 Posted by Feodor Fitsner on 27 Jan, 2021 01:30 AM

    Feodor Fitsner's Avatar

    Do you have some appveyor.yml already?

  2. Feodor Fitsner closed this discussion on 29 Mar, 2021 09:03 PM.

  3. splatteredbits re-opened this discussion on 24 Nov, 2021 08:00 PM

  4. 2 Posted by splatteredbits on 24 Nov, 2021 08:00 PM

    splatteredbits's Avatar

    Sorry for taking so long to get back to you. I must have missed that someone responded.

    Here's my appveyor.yml [1].

    What I want is at total of 7 jobs:

    • 2 jobs only on Visual Studio 2013 Visual Studio 2015 that run a build under Windows PowerShell (i.e. ps).
    • 5 jobs on all images except Visual Studio 2013 that run the build under PowerShell (i.e. pwsh).

    Currently, with this YAML, I get six jobs and macOS, Ubuntu, Visual Studio 2015, and Visual Studio 2022 propertly run PowerShell (i.e. pwsh), Visual Studio 2013 properly runs Windows PowerShell (i.e. ps), but I get only one Visual Studio 2019 job and it runs Windows PowerShell (i.e. ps). I expect there to be a second Visual Studio 2019 job that runs on PowerShell (i.e. pwsh).

    [1]

    image:
    - macOS
    - Ubuntu
    - Visual Studio 2013
    - Visual Studio 2015
    - Visual Studio 2019
    - Visual Studio 2022
    for:
    - matrix:
        only:
        - image: Visual Studio 2013
        - image: Visual Studio 2019
      build_script:
      - ps: $PSVersionTable ; .\build.ps1
    - matrix:
        except:
        - image: Visual Studio 2013
      build_script:
      - pwsh: $PSVersionTable ; ./build.ps1
    

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac