1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 07:14:47 -05:00

chore(ci): do not clone submodule ./test_util/wpt unnecessarily (#17372)

This commit is contained in:
David Sherret 2023-01-12 11:22:38 -05:00 committed by GitHub
parent dabcdf2324
commit 120bc5450f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 28 deletions

View file

@ -241,6 +241,9 @@ const ci = {
job: "test",
profile: "release",
use_sysroot: true,
// TODO(ry): Because CI is so slow on for OSX and Windows, we
// currently run the Web Platform tests only on Linux.
wpt: "${{ !startsWith(github.ref, 'refs/tags/') }}",
},
{
os: Runners.linux,
@ -253,6 +256,8 @@ const ci = {
job: "test",
profile: "debug",
use_sysroot: true,
wpt:
"${{ github.ref == 'refs/heads/main' && !startsWith(github.ref, 'refs/tags/') }}",
},
{
os: Runners.linux,
@ -296,7 +301,7 @@ const ci = {
submoduleStep("./test_util/std"),
{
...submoduleStep("./test_util/wpt"),
if: "matrix.job == 'test'",
if: "matrix.wpt",
},
{
...submoduleStep("./third_party"),
@ -620,20 +625,14 @@ const ci = {
run: 'sudo chroot /sysroot "$(pwd)/target/release/deno" --version',
},
{
// TODO(ry): Because CI is so slow on for OSX and Windows, we currently
// run the Web Platform tests only on Linux.
name: "Configure hosts file for WPT",
if: "startsWith(matrix.os, 'ubuntu') && matrix.job == 'test'",
if: "matrix.wpt",
run: "./wpt make-hosts-file | sudo tee -a /etc/hosts",
"working-directory": "test_util/wpt/",
},
{
name: "Run web platform tests (debug)",
if: [
"startsWith(matrix.os, 'ubuntu') && matrix.job == 'test' &&",
"matrix.profile == 'debug' &&",
"github.ref == 'refs/heads/main'",
].join("\n"),
if: "matrix.wpt && matrix.profile == 'debug'",
env: {
DENO_BIN: "./target/debug/deno",
},
@ -650,10 +649,7 @@ const ci = {
},
{
name: "Run web platform tests (release)",
if: [
"startsWith(matrix.os, 'ubuntu') && matrix.job == 'test' &&",
"matrix.profile == 'release' && !startsWith(github.ref, 'refs/tags/')",
].join("\n"),
if: "matrix.wpt && matrix.profile == 'release'",
env: {
DENO_BIN: "./target/release/deno",
},
@ -675,8 +671,8 @@ const ci = {
name: "Upload wpt results to dl.deno.land",
"continue-on-error": true,
if: [
"matrix.wpt &&",
"runner.os == 'Linux' &&",
"matrix.job == 'test' &&",
"matrix.profile == 'release' &&",
"github.repository == 'denoland/deno' &&",
"github.ref == 'refs/heads/main' && !startsWith(github.ref, 'refs/tags/')",
@ -693,8 +689,8 @@ const ci = {
name: "Upload wpt results to wpt.fyi",
"continue-on-error": true,
if: [
"matrix.wpt &&",
"runner.os == 'Linux' &&",
"matrix.job == 'test' &&",
"matrix.profile == 'release' &&",
"github.repository == 'denoland/deno' &&",
"github.ref == 'refs/heads/main' && !startsWith(github.ref, 'refs/tags/')",

View file

@ -45,6 +45,7 @@ jobs:
job: test
profile: release
use_sysroot: true
wpt: '${{ !startsWith(github.ref, ''refs/tags/'') }}'
- os: '${{ github.repository == ''denoland/deno'' && ''ubuntu-20.04-xl'' || ''ubuntu-20.04'' }}'
job: bench
profile: release
@ -53,6 +54,7 @@ jobs:
job: test
profile: debug
use_sysroot: true
wpt: '${{ github.ref == ''refs/heads/main'' && !startsWith(github.ref, ''refs/tags/'') }}'
- os: '${{ github.repository == ''denoland/deno'' && ''ubuntu-20.04-xl'' || ''ubuntu-20.04'' }}'
job: lint
profile: debug
@ -85,7 +87,7 @@ jobs:
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != ''true'')'
- name: Clone submodule ./test_util/wpt
run: git submodule update --init --recursive --depth=1 -- ./test_util/wpt
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != ''true'' && (matrix.job == ''test''))'
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != ''true'' && (matrix.wpt))'
- name: Clone submodule ./third_party
run: git submodule update --init --recursive --depth=1 -- ./third_party
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != ''true'' && (matrix.job == ''lint'' || matrix.job == ''bench''))'
@ -392,14 +394,11 @@ jobs:
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != ''true'' && (matrix.profile == ''release'' && matrix.use_sysroot))'
run: sudo chroot /sysroot "$(pwd)/target/release/deno" --version
- name: Configure hosts file for WPT
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != ''true'' && (startsWith(matrix.os, ''ubuntu'') && matrix.job == ''test''))'
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != ''true'' && (matrix.wpt))'
run: ./wpt make-hosts-file | sudo tee -a /etc/hosts
working-directory: test_util/wpt/
- name: Run web platform tests (debug)
if: |-
!(github.event_name == 'pull_request' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != 'true' && (startsWith(matrix.os, 'ubuntu') && matrix.job == 'test' &&
matrix.profile == 'debug' &&
github.ref == 'refs/heads/main'))
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != ''true'' && (matrix.wpt && matrix.profile == ''debug''))'
env:
DENO_BIN: ./target/debug/deno
run: |-
@ -412,9 +411,7 @@ jobs:
--lock=tools/deno.lock.json \
./tools/wpt.ts run --quiet --binary="$DENO_BIN"
- name: Run web platform tests (release)
if: |-
!(github.event_name == 'pull_request' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != 'true' && (startsWith(matrix.os, 'ubuntu') && matrix.job == 'test' &&
matrix.profile == 'release' && !startsWith(github.ref, 'refs/tags/')))
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != ''true'' && (matrix.wpt && matrix.profile == ''release''))'
env:
DENO_BIN: ./target/release/deno
run: |-
@ -432,8 +429,8 @@ jobs:
- name: Upload wpt results to dl.deno.land
continue-on-error: true
if: |-
!(github.event_name == 'pull_request' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != 'true' && (runner.os == 'Linux' &&
matrix.job == 'test' &&
!(github.event_name == 'pull_request' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != 'true' && (matrix.wpt &&
runner.os == 'Linux' &&
matrix.profile == 'release' &&
github.repository == 'denoland/deno' &&
github.ref == 'refs/heads/main' && !startsWith(github.ref, 'refs/tags/')))
@ -446,8 +443,8 @@ jobs:
- name: Upload wpt results to wpt.fyi
continue-on-error: true
if: |-
!(github.event_name == 'pull_request' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != 'true' && (runner.os == 'Linux' &&
matrix.job == 'test' &&
!(github.event_name == 'pull_request' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != 'true' && (matrix.wpt &&
runner.os == 'Linux' &&
matrix.profile == 'release' &&
github.repository == 'denoland/deno' &&
github.ref == 'refs/heads/main' && !startsWith(github.ref, 'refs/tags/')))