1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-25 15:29:32 -05:00

chore(ci): cache test debug ubuntu-22.04-xl build (#18216)

This commit is contained in:
David Sherret 2023-03-15 21:47:15 -04:00 committed by Yoshiya Hinosawa
parent 4e0e6569cb
commit a2ae4e5459
2 changed files with 26 additions and 34 deletions

View file

@ -220,7 +220,7 @@ const ci = {
{ {
os: Runners.macos, os: Runners.macos,
job: "test", job: "test",
profile: "fastci", profile: "debug",
}, },
{ {
os: Runners.macos, os: Runners.macos,
@ -231,7 +231,7 @@ const ci = {
{ {
os: Runners.windows, os: Runners.windows,
job: "test", job: "test",
profile: "fastci", profile: "debug",
}, },
{ {
os: Runners.windows, os: Runners.windows,
@ -496,15 +496,7 @@ const ci = {
}, },
{ {
name: "Build debug", name: "Build debug",
if: [ if: "matrix.job == 'test' && matrix.profile == 'debug'",
"(matrix.job == 'test' || matrix.job == 'bench') &&",
"matrix.profile == 'debug'",
].join("\n"),
run: "cargo build --locked --all-targets",
},
{
name: "Build fastci",
if: "(matrix.job == 'test' && matrix.profile == 'fastci')",
run: "cargo build --locked --all-targets", run: "cargo build --locked --all-targets",
env: { CARGO_PROFILE_DEV_DEBUG: 0 }, env: { CARGO_PROFILE_DEV_DEBUG: 0 },
}, },
@ -607,22 +599,24 @@ const ci = {
name: "Test debug", name: "Test debug",
if: [ if: [
"matrix.job == 'test' && matrix.profile == 'debug' &&", "matrix.job == 'test' && matrix.profile == 'debug' &&",
"!startsWith(github.ref, 'refs/tags/')", "!startsWith(github.ref, 'refs/tags/') && startsWith(matrix.os, 'ubuntu')",
].join("\n"), ].join("\n"),
run: "cargo test --locked", run: "cargo test --locked",
env: { CARGO_PROFILE_DEV_DEBUG: 0 },
}, },
{ {
name: "Test fastci", name: "Test debug (fast)",
if: "matrix.job == 'test' && matrix.profile == 'fastci'", if: [
"matrix.job == 'test' && matrix.profile == 'debug' && ",
"!startsWith(matrix.os, 'ubuntu')",
].join("\n"),
run: [ run: [
// Run unit then integration tests. Skip doc tests here // Run unit then integration tests. Skip doc tests here
// since they are sometimes very slow on Mac. // since they are sometimes very slow on Mac.
"cargo test --locked --lib", "cargo test --locked --lib",
"cargo test --locked --test '*'", "cargo test --locked --test '*'",
].join("\n"), ].join("\n"),
env: { env: { CARGO_PROFILE_DEV_DEBUG: 0 },
CARGO_PROFILE_DEV_DEBUG: 0,
},
}, },
{ {
name: "Test release", name: "Test release",
@ -766,7 +760,7 @@ const ci = {
{ {
name: "Build product size info", name: "Build product size info",
if: if:
"matrix.job != 'lint' && matrix.profile != 'fastci' && github.repository == 'denoland/deno' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/'))", "matrix.job != 'lint' && matrix.profile != 'debug' && github.repository == 'denoland/deno' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/'))",
run: [ run: [
'du -hd1 "./target/${{ matrix.profile }}"', 'du -hd1 "./target/${{ matrix.profile }}"',
'du -ha "./target/${{ matrix.profile }}/deno"', 'du -ha "./target/${{ matrix.profile }}/deno"',
@ -847,11 +841,10 @@ const ci = {
}, },
}, },
{ {
// In main branch, always creates fresh cache // In main branch, always create a fresh cache
name: "Save cache build output (main)", name: "Save cache build output (main)",
uses: "actions/cache/save@v3", uses: "actions/cache/save@v3",
if: if: "matrix.job == 'test' && github.ref == 'refs/heads/main'",
"(matrix.profile == 'release' || matrix.profile == 'fastci') && github.ref == 'refs/heads/main'",
with: { with: {
path: [ path: [
"./target", "./target",

View file

@ -26,14 +26,14 @@ jobs:
include: include:
- os: macos-12 - os: macos-12
job: test job: test
profile: fastci profile: debug
- os: macos-12 - os: macos-12
job: test job: test
profile: release profile: release
skip_pr: true skip_pr: true
- os: '${{ github.repository == ''denoland/deno'' && ''windows-2022-xl'' || ''windows-2022'' }}' - os: '${{ github.repository == ''denoland/deno'' && ''windows-2022-xl'' || ''windows-2022'' }}'
job: test job: test
profile: fastci profile: debug
- 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'') }}' runner: '${{ github.event_name == ''pull_request'' && ''windows-2022'' || (github.repository == ''denoland/deno'' && ''windows-2022-xl'' || ''windows-2022'') }}'
job: test job: test
@ -302,12 +302,7 @@ jobs:
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != ''true'' && (matrix.job == ''lint''))' if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != ''true'' && (matrix.job == ''lint''))'
run: deno run --unstable --allow-write --allow-read --allow-run ./tools/lint.js run: deno run --unstable --allow-write --allow-read --allow-run ./tools/lint.js
- name: Build debug - name: Build debug
if: |- if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != ''true'' && (matrix.job == ''test'' && matrix.profile == ''debug''))'
!(github.event_name == 'pull_request' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != 'true' && ((matrix.job == 'test' || matrix.job == 'bench') &&
matrix.profile == 'debug'))
run: cargo build --locked --all-targets
- name: Build fastci
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != ''true'' && ((matrix.job == ''test'' && matrix.profile == ''fastci'')))'
run: cargo build --locked --all-targets run: cargo build --locked --all-targets
env: env:
CARGO_PROFILE_DEV_DEBUG: 0 CARGO_PROFILE_DEV_DEBUG: 0
@ -380,10 +375,14 @@ jobs:
- name: Test debug - name: Test debug
if: |- if: |-
!(github.event_name == 'pull_request' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != 'true' && (matrix.job == 'test' && matrix.profile == 'debug' && !(github.event_name == 'pull_request' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != 'true' && (matrix.job == 'test' && matrix.profile == 'debug' &&
!startsWith(github.ref, 'refs/tags/'))) !startsWith(github.ref, 'refs/tags/') && startsWith(matrix.os, 'ubuntu')))
run: cargo test --locked run: cargo test --locked
- name: Test fastci env:
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != ''true'' && (matrix.job == ''test'' && matrix.profile == ''fastci''))' CARGO_PROFILE_DEV_DEBUG: 0
- name: Test debug (fast)
if: |-
!(github.event_name == 'pull_request' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != 'true' && (matrix.job == 'test' && matrix.profile == 'debug' &&
!startsWith(matrix.os, 'ubuntu')))
run: |- run: |-
cargo test --locked --lib cargo test --locked --lib
cargo test --locked --test '*' cargo test --locked --test '*'
@ -490,7 +489,7 @@ jobs:
git commit --message "Update benchmarks" git commit --message "Update benchmarks"
git push origin gh-pages git push origin gh-pages
- name: Build product size info - name: Build product size info
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != ''true'' && (matrix.job != ''lint'' && matrix.profile != ''fastci'' && github.repository == ''denoland/deno'' && (github.ref == ''refs/heads/main'' || startsWith(github.ref, ''refs/tags/''))))' if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != ''true'' && (matrix.job != ''lint'' && matrix.profile != ''debug'' && github.repository == ''denoland/deno'' && (github.ref == ''refs/heads/main'' || startsWith(github.ref, ''refs/tags/''))))'
run: |- run: |-
du -hd1 "./target/${{ matrix.profile }}" du -hd1 "./target/${{ matrix.profile }}"
du -ha "./target/${{ matrix.profile }}/deno" du -ha "./target/${{ matrix.profile }}/deno"
@ -548,7 +547,7 @@ jobs:
draft: true draft: true
- name: Save cache build output (main) - name: Save cache build output (main)
uses: actions/cache/save@v3 uses: actions/cache/save@v3
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != ''true'' && ((matrix.profile == ''release'' || matrix.profile == ''fastci'') && github.ref == ''refs/heads/main''))' if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != ''true'' && (matrix.job == ''test'' && github.ref == ''refs/heads/main''))'
with: with:
path: |- path: |-
./target ./target