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

Fix chocolatey package releases #2463

Merged
merged 1 commit into from
Feb 10, 2024

Conversation

chadlwilson
Copy link
Contributor

@chadlwilson chadlwilson commented Feb 10, 2024

The Chocolatey packages are stuck in moderation since they currently download/install packages without checksums: https://community.chocolatey.org/packages/gauge/1.5.7

Package automation scripts download a remote file without validating the checksum.

This change makes the Windows packages available to the Choco package release step, since the checksums don't seem to be in some other metadata.

Checksums are mandatory within Chocolatey packages now so these are needed to be able to generate the package install script. Dependent on getgauge/chocolatey-packages@406b9d7 which computes the checksums and changes the templating of the package accordingly, so you get a chocolateyInstall.ps1 like

$packageName = 'gauge'
$location = "$env:PROGRAMFILES\gauge\bin"
$validExitCodes = @(0)

Install-ChocolateyZipPackage -PackageName "$packageName" -Url "https://github.com/getgauge/gauge/releases/download/v1.6.1/gauge-1.6.1-windows.x86.zip" -Checksum "54ffb0dc379fb565c3032a0f7bd928b6114fd13e20f335e114ff9b6f08fd2f83" -ChecksumType sha256 -Url64 "https://github.com/getgauge/gauge/releases/download/v1.6.1/gauge-1.6.1-windows.x86_64.zip" -Checksum64 "fa78e558853a7e6b5618cd3db3bc7994650a33fa756c74f3fa08d2cbd7bcfe67" -ChecksumType64 sha256 -UnzipLocation "$location" -validExitCodes $validExitCodes

$currentPath = [environment]::GetEnvironmentVariable("PATH", "Machine")

if($currentPath -NotLike "*$location*") {
    $newPath = $currentPath + ";" + "$location"
    [environment]::SetEnvironmentVariable("PATH", $newPath, "Machine")
}

The package.ps1 for generation has been validated on Windows 11.

Checksums are mandatory within Chocolatey packages now so these are needed to be able to generate the package install script. Dependent on getgauge/chocolatey-packages@406b9d7

Signed-off-by: Chad Wilson <[email protected]>
@sriv sriv enabled auto-merge (squash) February 10, 2024 08:15
@sriv sriv disabled auto-merge February 10, 2024 08:16
@sriv
Copy link
Member

sriv commented Feb 10, 2024

I think we should try an automated release, what do you say @chadlwilson ?

@chadlwilson
Copy link
Contributor Author

We can, but pypi is broken too so might be good to try and fix that as well?

Copy link
Contributor

Benchmark Results

java_maven_multithreaded.csv

Commit CPU Memory Time ExitCode
62b9937 77% 234160 0:14.59 0
b55b734 67% 234752 0:16.79 0
6475093 58% 202856 0:19.71 0
0afd18e 59% 246244 0:19.33 0

java_maven_serial.csv

Commit CPU Memory Time ExitCode
62b9937 80% 269976 0:17.24 0
b55b734 84% 216004 0:16.96 0
6475093 83% 260176 0:17.12 0
0afd18e 81% 217324 0:17.37 0

java_gradle_serial.csv

Commit CPU Memory Time ExitCode
62b9937 9% 106932 0:24.90 0
b55b734 9% 118740 0:25.15 0
6475093 9% 117392 0:25.12 0
0afd18e 9% 121116 0:25.31 0

java_simple_parallel.csv

Commit CPU Memory Time ExitCode
62b9937 21% 72096 0:25.94 0
b55b734 24% 72212 0:22.78 0
6475093 22% 72064 0:23.98 0
0afd18e 23% 74544 0:23.27 0

java_gradle_multithreaded.csv

Commit CPU Memory Time ExitCode
62b9937 10% 120752 0:23.40 0
b55b734 10% 108120 0:23.65 0
6475093 9% 114264 0:23.61 0
0afd18e 10% 117956 0:23.02 0

java_maven_parallel.csv

Commit CPU Memory Time ExitCode
62b9937 41% 246160 0:33.10 0
b55b734 43% 231220 0:31.14 0
6475093 44% 243516 0:29.99 0
0afd18e 41% 233968 0:32.95 0

java_gradle_parallel.csv

Commit CPU Memory Time ExitCode
62b9937 6% 119752 0:41.56 0
b55b734 5% 115740 0:40.07 0
6475093 5% 116668 0:46.13 0
0afd18e 5% 118524 0:40.46 0

java_simple_multithreaded.csv

Commit CPU Memory Time ExitCode
62b9937 36% 70008 0:09.92 0
b55b734 38% 67900 0:09.27 0
6475093 30% 68364 0:12.14 0
0afd18e 27% 69956 0:12.37 0

java_simple_serial.csv

Commit CPU Memory Time ExitCode
62b9937 42% 65868 0:14.17 0
b55b734 52% 66024 0:11.35 0
6475093 51% 65716 0:11.90 0
0afd18e 42% 65696 0:14.36 0

Notes

  • The results above are generated by running against seed projects in https://github.com/getgauge/gauge-benchmark
  • These results are not persisted, but on merging to master the benchmark will be rerun.
  • These benchmark are run in Github Actions' agents, which are virtualized. Results are not to be taken as actual benchmarks.Rather, these are indicative numbers and make sense for comparison.

See Workflow log for more details.

@chadlwilson chadlwilson merged commit 630fcb2 into getgauge:master Feb 10, 2024
28 checks passed
@chadlwilson chadlwilson deleted the fix-chocolatey-package branch February 10, 2024 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants