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-2022 image 20230918.1.0 removed the "ninja" tool #8343

Closed
2 of 10 tasks
mstorsjo opened this issue Sep 20, 2023 · 5 comments
Closed
2 of 10 tasks

windows-2022 image 20230918.1.0 removed the "ninja" tool #8343

mstorsjo opened this issue Sep 20, 2023 · 5 comments

Comments

@mstorsjo
Copy link

Description

The "ninja" tool used to be available in the windows-2022 images, but since 20230918.1.0 it no longer is.

It wasn't part of the official list of provided tools, but as it was available out of the box, CI scripts have come to rely on it. It used to be available as C:\ProgramData\Chocolatey\bin\ninja.exe.

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
  • Windows Server 2019
  • Windows Server 2022

Image version and build link

https://github.com/mstorsjo/llvm-mingw/actions/runs/6242492372/job/16957853448

Is it regression?

Yes, regression from 20230910.1.0

Expected behavior

As running the command "ninja" has worked in earlier runs with windows-2022, and there hasn't been any explicit intent to remove it, it should remain available.

https://github.com/mstorsjo/llvm-mingw/actions/runs/6242492372/job/16957852949 shows a successful build with windows-2022 image 20230910.1.0, where ninja is available.

Actual behavior

Actual runs with image version 20230918.1.0 fail to find the "ninja" tool.

Repro steps

Run a workflow that looks like this:

name: Builds
on:
  push:

jobs:
  check-ninja:
    runs-on: windows-2022
    steps:
      - name: Locate ninja
        shell: cmd
        run: |
          where ninja
@erik-bershel
Copy link
Contributor

Hey @mstorsjo!
As far as I can see, the package was installed as a dependency of some other package distributed through Chocolatey. Ninja package itself was never a supported part of the image. We do not recommend relying on such a dependencies when building. You can simply and fast install it in runtime with this command:

choco install ninja

Due to maintenance concerns, fast and easy installation in runtime, we wouldn't like to add ninja to the Windows images.

syyyr added a commit to silicon-heaven/libshv that referenced this issue Sep 20, 2023
It was only available as a transitive dependency.

actions/runner-images#8343
syyyr added a commit to silicon-heaven/libshv that referenced this issue Sep 20, 2023
It was only available as a transitive dependency.

actions/runner-images#8343
syyyr added a commit to silicon-heaven/libshv that referenced this issue Sep 20, 2023
It was only available as a transitive dependency.

actions/runner-images#8343
@mstorsjo
Copy link
Author

Hey @mstorsjo! As far as I can see, the package was installed as a dependency of some other package distributed through Chocolatey. Ninja package itself was never a supported part of the image. We do not recommend relying on such a dependencies when building.

Ok, that's fair enough.

You can simply and fast install it in runtime with this command:

choco install ninja

Due to maintenance concerns, fast and easy installation in runtime, we wouldn't like to add ninja to the Windows images.

Right - although on the other hand, I would argue the opposite; the tool is very very small (and already used to be present), so that it would be worthwhile to add it to the list of formally supported tools. The images already ship with CMake (which is many magnitudes bigger), and ninja is a very common builder for CMake projects.

But that's indeed a different question, I'll file a separate issue for a request to include it (which you then can reject again if that's what the final verdict is).

@mstorsjo
Copy link
Author

But that's indeed a different question, I'll file a separate issue for a request to include it (which you then can reject again if that's what the final verdict is).

I filed this add request at #8348. FWIW, I do see that the ninja tool is missing on Ubuntu and macOS images as well, so I guess it's at least consistent with that.

mstorsjo added a commit to mstorsjo/llvm-mingw that referenced this issue Sep 20, 2023
Ninja isn't documented as one of the tools provided by the CI runner
images, but it used to be available implicitly installed before
in the windows-2022 images. Since the 20230918.1.0 image update,
it no longer is available out of the box; see
actions/runner-images#8343.
ChrisThrasher added a commit to SFML/SFML that referenced this issue Sep 20, 2023
actions/runner-images#8343 (comment)

Ninja's presence in the Windows images was due to it being a
transitive dependency of another packages. It was never guaranteed
to be present. The actions/runner-images devs do not plan on adding
it so we're forced to install it ourselves.
ChrisThrasher added a commit to SFML/SFML that referenced this issue Sep 20, 2023
actions/runner-images#8343 (comment)

Ninja's presence in the Windows images was due to it being a
transitive dependency of another packages. It was never guaranteed
to be present. The actions/runner-images devs do not plan on adding
it so we're forced to install it ourselves.
ChrisThrasher added a commit to SFML/SFML that referenced this issue Sep 21, 2023
actions/runner-images#8343 (comment)

Ninja's presence in the Windows images was due to it being a
transitive dependency of another packages. It was never guaranteed
to be present. The actions/runner-images devs do not plan on adding
it so we're forced to install it ourselves.
syyyr added a commit to silicon-heaven/libshv that referenced this issue Sep 21, 2023
It was only available as a transitive dependency.

actions/runner-images#8343
andrewrk added a commit to ziglang/zig that referenced this issue Sep 21, 2023
The new CI images provided by GitHub no longer provide ninja.exe, so
this commit installs it explicitly, using the suggested method from
GitHub.

See actions/runner-images#8343 for more
details.
andrewrk added a commit to ziglang/zig that referenced this issue Sep 21, 2023
The new CI images provided by GitHub no longer provide ninja.exe, so
this commit installs it explicitly, using the suggested method from
GitHub.

See actions/runner-images#8343 for more
details.
ChrisThrasher added a commit to SFML/SFML that referenced this issue Sep 22, 2023
actions/runner-images#8343 (comment)

Ninja's presence in the Windows images was due to it being a
transitive dependency of another packages. It was never guaranteed
to be present. The actions/runner-images devs do not plan on adding
it so we're forced to install it ourselves.
ChrisThrasher added a commit to SFML/SFML that referenced this issue Sep 22, 2023
actions/runner-images#8343 (comment)

Ninja's presence in the Windows images was due to it being a
transitive dependency of another packages. It was never guaranteed
to be present. The actions/runner-images devs do not plan on adding
it so we're forced to install it ourselves.
@walbourn
Copy link

This change impacted a number of my build pipelines. IMO Ninja should really be included if you are going to bother to include CMake.

andrewrk added a commit to ziglang/zig that referenced this issue Jan 29, 2024
The new CI images provided by GitHub no longer provide ninja.exe, so
this commit installs it explicitly, using the suggested method from
GitHub.

See actions/runner-images#8343 for more
details.
@marc-hb
Copy link

marc-hb commented Dec 22, 2024

thanks for your suggestion but considering that it' easy to add Ninja to workflows on demand,...

I just asked runtime installation to be officially documented, please upvote:

Ever growing list of duplicates gathered at:

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

4 participants