ilammy / msvc-dev-cmd

GitHub Action to setup Developer Command Prompt for Microsoft Visual C++
MIT License
338 stars 49 forks source link

Surprising Time Spent on Running msvc-dev-cmd@v1 on windows-latest #12

Closed davecom closed 4 years ago

davecom commented 4 years ago

I'm suddenly seeing repositories take over 4 minutes on running msvc-dev-cmd@v1, while just a couple days ago they were taking less than a minute. What variables could be causing the increased time? Is there something I can tweak? Does it have to do with changes to windows-latest? Thanks in advance for any insight.

Below is our yml file and the step that is becoming perversely long is "Setup Developer Command Prompt"

name: Build and Test

on:
  push

jobs:

  build-and-test-windows:
    name: Build and Test on Windows
    runs-on: windows-latest
    timeout-minutes: 5

    steps:
      - name: Setup Developer Command Prompt
        uses: ilammy/msvc-dev-cmd@v1
      - name: Check Out Source Code
        uses: actions/checkout@v2
      - name: nmake Build
        run: nmake
      - name: Run Executable
        run: .\assignment4.exe

  build-and-test-linux:
    name: Build and Test on Linux
    runs-on: ubuntu-latest
    timeout-minutes: 5

    steps:
      - name: Check Out Source Code
        uses: actions/checkout@v2
      - name: GNU make Build
        run: make
      - name: Run Executable
        run: ./assignment4
ilammy commented 4 years ago

Hm... That's most likely due to v1 being updated to recently released v1.4.0. I am sorry, I did not notice the build time increase :disappointed: Indeed, it seems to take way more time than necessary, it's not clear why.

As a mitigation, I have reverted the v1 tag back to more stable v1.3.0 which it still fast. (That is, ilammy/msvc-dev-cmd@v1 should be fast now.) The v1.4.0 is also demoted to pre-release state, until the next version does something about the execution speed.

davecom commented 4 years ago

Thank you @ilammy. Appreciate the work you have done on msvc-dev-cmd and the quick response.

FranciscoPombal commented 4 years ago

I can reproduce this issue. v1.3.0 used to take less than 10 seconds to complete (see any Windows job here: https://github.com/qbittorrent/qBittorrent/actions, for an example of this), while v1.4.0 consistently takes an additional 4 minutes. So for now v1.3.0 is definitely the one to use.

ilammy commented 4 years ago

@davecom, @FranciscoPombal, I've just published v1.4.1 which should fix this issue. Could you please give it a try? If that works for you, I'll bump v1 to that version.

FranciscoPombal commented 4 years ago

@ilammy Thanks, that fixed it!

ilammy commented 4 years ago

Alrighty. I've bumped v1 to the latest release. It seems that's it :tada: