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

windows-latest: 7-Zip not found #9361

Closed
2 of 13 tasks
FlorinChess opened this issue Feb 18, 2024 · 1 comment
Closed
2 of 13 tasks

windows-latest: 7-Zip not found #9361

FlorinChess opened this issue Feb 18, 2024 · 1 comment

Comments

@FlorinChess
Copy link

FlorinChess commented Feb 18, 2024

Description

I have a job that uses 7-Zip in one of the steps which came preinstalled. Trying to run the job a few months later, the window-latest runner no longer has 7-Zip preinstalled which causes the job to fail.

Platforms affected

  • Azure DevOps
  • GitHub Actions - Standard Runners
  • GitHub Actions - Larger Runners

Runner images affected

  • Ubuntu 20.04
  • Ubuntu 22.04
  • macOS 11
  • macOS 12
  • macOS 13
  • macOS 13 Arm64
  • macOS 14
  • macOS 14 Arm64
  • Windows Server 2019
  • Windows Server 2022

Image version and build link

Image: windows-2022
Version: 20240211.1.0

https://github.com/FlorinChess/Music/actions/runs/7944706780/job/21690977695

Is it regression?

Inconclusive: run logs no longer available

Expected behavior

When the workflow was first written, windows-latest runners had 7-Zip installed, no extra setup required.

Actual behavior

The windows-latest images no longer have 7-Zip preinstalled.

Repro steps

 # Install virutal audio device
    - name: Install Scream
      shell: powershell
      run: |
          Start-Service audio*
          Invoke-WebRequest https://github.com/duncanthrax/scream/releases/download/3.6/Scream3.6.zip -OutFile C:\Scream3.6.zip
          Extract-7Zip -Path C:\Scream3.6.zip -DestinationPath C:\Scream
          $cert = (Get-AuthenticodeSignature C:\Scream\Install\driver\Scream.sys).SignerCertificate
          $store = [System.Security.Cryptography.X509Certificates.X509Store]::new("TrustedPublisher", "LocalMachine")
          $store.Open("ReadWrite")
          $store.Add($cert)
          $store.Close()
          cd C:\Scream\Install\driver
          C:\Scream\Install\helpers\devcon install Scream.inf *Scream

The build fails on Extract-7Zip -Path C:\Scream3.6.zip -DestinationPath C:\Scream with the powershell error:

Extract-7Zip : The term 'Extract-7Zip' is not recognized as the name of a cmdlet, function, script file, or operable 
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At D:\a\_temp\54fe7281-0807-4b2b-b7a9-1c88f50e3333.ps1:4 char:1
+ Extract-7Zip -Path C:\Scream3.6.zip -DestinationPath C:\Scream
+ ~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Extract-7Zip:String) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : CommandNotFoundException

For more information, check out the public build: https://github.com/FlorinChess/Music/actions/runs/7944706780/job/21690977695

@sergei-pyshnoi
Copy link
Contributor

Hello @FlorinChess . Extract-7Zip cmdlet was part of functions that using for image generation only and we do not recommend use it in workflows. It was replaced with Expand-7ZipArchive function during runner-images major repo refactoring.

@sergei-pyshnoi sergei-pyshnoi closed this as not planned Won't fix, can't repro, duplicate, stale Feb 19, 2024
Docheinstein added a commit to Docheinstein/GBEmulatorShootout that referenced this issue Apr 16, 2024
The Extract-7Zip command is not supported anymore by GitHub actions.
It has been replaced with the Expand-7ZipArchive.

Source: actions/runner-images#9361 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants