mirror of
https://github.com/denoland/deno.git
synced 2024-11-28 16:20:57 -05:00
chore(ci): use windows-2022 runner on skipped release job on PRs (#17398)
This commit is contained in:
parent
0eb68246da
commit
69a84a6a2b
2 changed files with 9 additions and 4 deletions
10
.github/workflows/ci.generate.ts
vendored
10
.github/workflows/ci.generate.ts
vendored
|
@ -2,12 +2,13 @@
|
||||||
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
||||||
import * as yaml from "https://deno.land/std@0.171.0/encoding/yaml.ts";
|
import * as yaml from "https://deno.land/std@0.171.0/encoding/yaml.ts";
|
||||||
|
|
||||||
|
const windowsRunnerCondition =
|
||||||
|
"github.repository == 'denoland/deno' && 'windows-2022-xl' || 'windows-2022'";
|
||||||
const Runners = {
|
const Runners = {
|
||||||
linux:
|
linux:
|
||||||
"${{ github.repository == 'denoland/deno' && 'ubuntu-20.04-xl' || 'ubuntu-20.04' }}",
|
"${{ github.repository == 'denoland/deno' && 'ubuntu-20.04-xl' || 'ubuntu-20.04' }}",
|
||||||
macos: "macos-12",
|
macos: "macos-12",
|
||||||
windows:
|
windows: `\${{ ${windowsRunnerCondition} }}`,
|
||||||
"${{ github.repository == 'denoland/deno' && 'windows-2022-xl' || 'windows-2022' }}",
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const installPkgsCommand =
|
const installPkgsCommand =
|
||||||
|
@ -200,7 +201,7 @@ const ci = {
|
||||||
jobs: {
|
jobs: {
|
||||||
build: {
|
build: {
|
||||||
name: "${{ matrix.job }} ${{ matrix.profile }} ${{ matrix.os }}",
|
name: "${{ matrix.job }} ${{ matrix.profile }} ${{ matrix.os }}",
|
||||||
"runs-on": "${{ matrix.os }}",
|
"runs-on": "${{ matrix.runner || matrix.os }}",
|
||||||
"timeout-minutes": 120,
|
"timeout-minutes": 120,
|
||||||
strategy: {
|
strategy: {
|
||||||
matrix: {
|
matrix: {
|
||||||
|
@ -223,6 +224,9 @@ const ci = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
os: Runners.windows,
|
os: Runners.windows,
|
||||||
|
// use a free runner on PRs since this will be skipped
|
||||||
|
runner:
|
||||||
|
`\${{ github.event_name == 'pull_request' && 'windows-2022' || (${windowsRunnerCondition}) }}`,
|
||||||
job: "test",
|
job: "test",
|
||||||
profile: "release",
|
profile: "release",
|
||||||
skip_pr: true,
|
skip_pr: true,
|
||||||
|
|
3
.github/workflows/ci.yml
vendored
3
.github/workflows/ci.yml
vendored
|
@ -19,7 +19,7 @@ concurrency:
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: '${{ matrix.job }} ${{ matrix.profile }} ${{ matrix.os }}'
|
name: '${{ matrix.job }} ${{ matrix.profile }} ${{ matrix.os }}'
|
||||||
runs-on: '${{ matrix.os }}'
|
runs-on: '${{ matrix.runner || matrix.os }}'
|
||||||
timeout-minutes: 120
|
timeout-minutes: 120
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
|
@ -35,6 +35,7 @@ jobs:
|
||||||
job: test
|
job: test
|
||||||
profile: fastci
|
profile: fastci
|
||||||
- os: '${{ github.repository == ''denoland/deno'' && ''windows-2022-xl'' || ''windows-2022'' }}'
|
- os: '${{ github.repository == ''denoland/deno'' && ''windows-2022-xl'' || ''windows-2022'' }}'
|
||||||
|
runner: '${{ github.event_name == ''pull_request'' && ''windows-2022'' || (github.repository == ''denoland/deno'' && ''windows-2022-xl'' || ''windows-2022'') }}'
|
||||||
job: test
|
job: test
|
||||||
profile: release
|
profile: release
|
||||||
skip_pr: true
|
skip_pr: true
|
||||||
|
|
Loading…
Reference in a new issue