1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 15:24:46 -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", job: "test",
profile: "release", profile: "release",
use_sysroot: true, 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, os: Runners.linux,
@ -253,6 +256,8 @@ const ci = {
job: "test", job: "test",
profile: "debug", profile: "debug",
use_sysroot: true, use_sysroot: true,
wpt:
"${{ github.ref == 'refs/heads/main' && !startsWith(github.ref, 'refs/tags/') }}",
}, },
{ {
os: Runners.linux, os: Runners.linux,
@ -296,7 +301,7 @@ const ci = {
submoduleStep("./test_util/std"), submoduleStep("./test_util/std"),
{ {
...submoduleStep("./test_util/wpt"), ...submoduleStep("./test_util/wpt"),
if: "matrix.job == 'test'", if: "matrix.wpt",
}, },
{ {
...submoduleStep("./third_party"), ...submoduleStep("./third_party"),
@ -620,20 +625,14 @@ const ci = {
run: 'sudo chroot /sysroot "$(pwd)/target/release/deno" --version', 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", 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", run: "./wpt make-hosts-file | sudo tee -a /etc/hosts",
"working-directory": "test_util/wpt/", "working-directory": "test_util/wpt/",
}, },
{ {
name: "Run web platform tests (debug)", name: "Run web platform tests (debug)",
if: [ if: "matrix.wpt && matrix.profile == 'debug'",
"startsWith(matrix.os, 'ubuntu') && matrix.job == 'test' &&",
"matrix.profile == 'debug' &&",
"github.ref == 'refs/heads/main'",
].join("\n"),
env: { env: {
DENO_BIN: "./target/debug/deno", DENO_BIN: "./target/debug/deno",
}, },
@ -650,10 +649,7 @@ const ci = {
}, },
{ {
name: "Run web platform tests (release)", name: "Run web platform tests (release)",
if: [ if: "matrix.wpt && matrix.profile == 'release'",
"startsWith(matrix.os, 'ubuntu') && matrix.job == 'test' &&",
"matrix.profile == 'release' && !startsWith(github.ref, 'refs/tags/')",
].join("\n"),
env: { env: {
DENO_BIN: "./target/release/deno", DENO_BIN: "./target/release/deno",
}, },
@ -675,8 +671,8 @@ const ci = {
name: "Upload wpt results to dl.deno.land", name: "Upload wpt results to dl.deno.land",
"continue-on-error": true, "continue-on-error": true,
if: [ if: [
"matrix.wpt &&",
"runner.os == 'Linux' &&", "runner.os == 'Linux' &&",
"matrix.job == 'test' &&",
"matrix.profile == 'release' &&", "matrix.profile == 'release' &&",
"github.repository == 'denoland/deno' &&", "github.repository == 'denoland/deno' &&",
"github.ref == 'refs/heads/main' && !startsWith(github.ref, 'refs/tags/')", "github.ref == 'refs/heads/main' && !startsWith(github.ref, 'refs/tags/')",
@ -693,8 +689,8 @@ const ci = {
name: "Upload wpt results to wpt.fyi", name: "Upload wpt results to wpt.fyi",
"continue-on-error": true, "continue-on-error": true,
if: [ if: [
"matrix.wpt &&",
"runner.os == 'Linux' &&", "runner.os == 'Linux' &&",
"matrix.job == 'test' &&",
"matrix.profile == 'release' &&", "matrix.profile == 'release' &&",
"github.repository == 'denoland/deno' &&", "github.repository == 'denoland/deno' &&",
"github.ref == 'refs/heads/main' && !startsWith(github.ref, 'refs/tags/')", "github.ref == 'refs/heads/main' && !startsWith(github.ref, 'refs/tags/')",

View file

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