Expected Behavior Since #9786 provides us an OS-independent way of setting the environment variables and build_jdk_11 and build_windows jobs are the same, we must combine them in one job with the following configuration, like so: runs-on: [ubuntu-latest, windows-latest]

Current Behavior We have two jobs running with the same configuration

Context This way we are trying to accomplish a more transparent solution for the build check

Comment From: marcusdacoregio

The runs-on property only accepts array when it's for self-hosted runners.

In order to reuse the same job configuration for multiple OS, we should use the strategy.matrix property, as suggested:

my-job:
  strategy:
    matrix:
      os: [ubuntu-latest, windows-latest]
  runs-on: ${{ matrix.os }}