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

Add support for Chocolatey #20534

Merged
merged 4 commits into from
Jul 18, 2024
Merged

Conversation

hamzaremmal
Copy link
Member

@hamzaremmal hamzaremmal commented Jun 8, 2024

Closes #20380

TODO:

[test_chocolatey]

@hamzaremmal hamzaremmal self-assigned this Jun 8, 2024
@hamzaremmal hamzaremmal force-pushed the chocolatey-config branch 2 times, most recently from 133391d to 0934b95 Compare June 8, 2024 20:17
<projectUrl>https://scala-lang.org/</projectUrl>
<bugTrackerUrl>https://github.com/scala/scala3/issues</bugTrackerUrl>
<copyright>© 2002-2024, LAMP/EPFL</copyright>
<iconUrl>https://cdn.jsdelivr.net/gh/scala/scala3@version/pkgs/chocolatey/icon.svg</iconUrl>
Copy link
Member Author

@hamzaremmal hamzaremmal Jun 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will have to add the hash of the merge-commit after we merge it here

Suggested change
<iconUrl>https://cdn.jsdelivr.net/gh/scala/scala3@version/pkgs/chocolatey/icon.svg</iconUrl>
<iconUrl>https://cdn.jsdelivr.net/gh/scala/scala3@<merge-commit>/pkgs/chocolatey/icon.svg</iconUrl>

@hamzaremmal hamzaremmal added area:ci Issues tied with CI/CD workflows area:package-manager labels Jul 4, 2024
@hamzaremmal hamzaremmal force-pushed the chocolatey-config branch 16 times, most recently from d3e7d75 to 0c1048a Compare July 17, 2024 12:33
@hamzaremmal hamzaremmal marked this pull request as ready for review July 17, 2024 12:47
@bishabosha bishabosha marked this pull request as draft July 17, 2024 15:15
@hamzaremmal hamzaremmal marked this pull request as ready for review July 17, 2024 16:06
@hamzaremmal hamzaremmal requested a review from bishabosha July 18, 2024 11:57
Co-authored-by: Jamie Thompson <[email protected]>
@hamzaremmal hamzaremmal enabled auto-merge July 18, 2024 12:37
Comment on lines +110 to +114
- name: Compute SHA256 of the uploaded artifact (win x86-64)
id : win-x86_64-digest
run : |
curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -o artifact.zip -L https://api.github.com/repos/scala/scala3/actions/artifacts/${{ steps.win-x86_64.outputs.artifact-id }}/zip
echo "digest=$(sha256sum artifact.zip | cut -d " " -f 1)" >> "$GITHUB_OUTPUT"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just want to ping that there is an issue about this : actions/upload-artifact#454

@hamzaremmal hamzaremmal merged commit a046b00 into scala:main Jul 18, 2024
25 checks passed
@hamzaremmal hamzaremmal deleted the chocolatey-config branch July 18, 2024 13:25
version: ${{ inputs.version }}
secrets:
API-KEY: ${{ secrets.CHOCOLATEY_KEY }}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a beneath that line, sees to be outdated now

# TODO: ADD RELEASE WORKFLOW TO CHOCOLATEY AND OTHER PACKAGE MANAGERS HERE

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, the chocolatey word should be dropped

uses: ./.github/workflows/build-chocolatey.yml
needs: [ build-sdk-package ]
with:
version: 3.6.0-local # TODO: FIX THIS
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be fixed before the merge? There is another usage of that in the next job.
I guess this value would need to be frequently updated, so it should be documented somewhere (maybe a mention in the project/Build.scala baseVersion that changing one value should also update ci file)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe build-chocolatey.yml can expose version as output. That way we would never forget about synchronizing the versions in both of the jobs

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually, this value when testing doesn't matter. I just have to give a version number to the package we are currently building (this package is local to the build). Nevertheless, it would be great if we have something that is correct and computes it directly without doing anything else.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added a todo to check later what to change this value to but it is not at all a blocker

hamzaremmal added a commit that referenced this pull request Jul 18, 2024
@prolativ
Copy link
Contributor

@hamzaremmal Should this PR be backported to LTS 3.3.5?

@hamzaremmal
Copy link
Member Author

@prolativ Would be good to have it yes. If the backport is hard to do, I can open a PR that targets LTS 3.3x

@prolativ
Copy link
Contributor

@hamzaremmal How should I adapt the backport for LTS?
Is this only about replacing 3.6.0 (and 3.6.0-local?) with 3.5.5? Or anything else?

@WojciechMazur
Copy link
Contributor

At this point direct backport is not possible - we'd need to adjust it to pre-3.5 building of artifacts. It's assuming usage of universal packager. Also Scala 3.3 LTS also would not have a native runners.
I'm moving it to the back of backport queue and would handle if we'd have a spare time

WojciechMazur added a commit that referenced this pull request Dec 9, 2024
Backports #20534 and #21221 to LTS. 
Requires adaptation - we don't produce native launchers and don't use
universal packager plugin

[test_chocolatey]

---------

Co-authored-by: Hamza Remmal <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:ci Issues tied with CI/CD workflows area:package-manager
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Publish Scala 3 alongside Scala CLI as the scala runner on Chocolatey
4 participants