mirror of
https://github.com/denoland/deno.git
synced 2025-01-03 04:48:52 -05:00
build: rename kind
to job
in ci config (#11699)
Co-authored-by: Jheyson Saavedra <jheysondev@users.noreply.github.com>
This commit is contained in:
parent
47b7cd5a7e
commit
fb135dc3e4
1 changed files with 40 additions and 41 deletions
81
.github/workflows/ci.yml
vendored
81
.github/workflows/ci.yml
vendored
|
@ -4,7 +4,7 @@ on: [push, pull_request]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: ${{ matrix.kind }} ${{ matrix.profile }} ${{ matrix.os }}
|
name: ${{ matrix.job }} ${{ matrix.profile }} ${{ matrix.os }}
|
||||||
if: |
|
if: |
|
||||||
github.event_name == 'push' ||
|
github.event_name == 'push' ||
|
||||||
!startsWith(github.event.pull_request.head.label, 'denoland:')
|
!startsWith(github.event.pull_request.head.label, 'denoland:')
|
||||||
|
@ -13,26 +13,25 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
# TODO(ry) Rename 'kind' to 'job'?
|
|
||||||
- os: macos-10.15
|
- os: macos-10.15
|
||||||
kind: test
|
job: test
|
||||||
profile: release
|
profile: release
|
||||||
- os: windows-2019
|
- os: windows-2019
|
||||||
kind: test
|
job: test
|
||||||
profile: release
|
profile: release
|
||||||
- os: ${{ github.repository == 'denoland/deno' && 'ubuntu-latest-xl' || 'ubuntu-latest' }}
|
- os: ${{ github.repository == 'denoland/deno' && 'ubuntu-latest-xl' || 'ubuntu-latest' }}
|
||||||
kind: test
|
job: test
|
||||||
profile: release
|
profile: release
|
||||||
use_sysroot: true
|
use_sysroot: true
|
||||||
- os: ${{ github.repository == 'denoland/deno' && 'ubuntu-latest-xl' || 'ubuntu-latest' }}
|
- os: ${{ github.repository == 'denoland/deno' && 'ubuntu-latest-xl' || 'ubuntu-latest' }}
|
||||||
kind: bench
|
job: bench
|
||||||
profile: release
|
profile: release
|
||||||
use_sysroot: true
|
use_sysroot: true
|
||||||
- os: ${{ github.repository == 'denoland/deno' && 'ubuntu-latest-xl' || 'ubuntu-latest' }}
|
- os: ${{ github.repository == 'denoland/deno' && 'ubuntu-latest-xl' || 'ubuntu-latest' }}
|
||||||
kind: test
|
job: test
|
||||||
profile: debug
|
profile: debug
|
||||||
- os: ${{ github.repository == 'denoland/deno' && 'ubuntu-latest-xl' || 'ubuntu-latest' }}
|
- os: ${{ github.repository == 'denoland/deno' && 'ubuntu-latest-xl' || 'ubuntu-latest' }}
|
||||||
kind: lint
|
job: lint
|
||||||
profile: debug
|
profile: debug
|
||||||
|
|
||||||
# Always run main branch builds to completion. This allows the cache to
|
# Always run main branch builds to completion. This allows the cache to
|
||||||
|
@ -68,7 +67,7 @@ jobs:
|
||||||
if: |
|
if: |
|
||||||
startsWith(matrix.os, 'ubuntu') &&
|
startsWith(matrix.os, 'ubuntu') &&
|
||||||
matrix.profile == 'release' &&
|
matrix.profile == 'release' &&
|
||||||
matrix.kind == 'test' &&
|
matrix.job == 'test' &&
|
||||||
github.repository == 'denoland/deno' &&
|
github.repository == 'denoland/deno' &&
|
||||||
startsWith(github.ref, 'refs/tags/')
|
startsWith(github.ref, 'refs/tags/')
|
||||||
run: |
|
run: |
|
||||||
|
@ -82,13 +81,13 @@ jobs:
|
||||||
rust-version: 1.54.0
|
rust-version: 1.54.0
|
||||||
|
|
||||||
- name: Install clippy and rustfmt
|
- name: Install clippy and rustfmt
|
||||||
if: matrix.kind == 'lint'
|
if: matrix.job == 'lint'
|
||||||
run: |
|
run: |
|
||||||
rustup component add clippy
|
rustup component add clippy
|
||||||
rustup component add rustfmt
|
rustup component add rustfmt
|
||||||
|
|
||||||
- name: Install Deno
|
- name: Install Deno
|
||||||
if: matrix.kind == 'lint'
|
if: matrix.job == 'lint'
|
||||||
run: |
|
run: |
|
||||||
curl -fsSL https://deno.land/x/install/install.sh | sh -s v1.11.3
|
curl -fsSL https://deno.land/x/install/install.sh | sh -s v1.11.3
|
||||||
echo "$HOME/.deno/bin" >> $GITHUB_PATH
|
echo "$HOME/.deno/bin" >> $GITHUB_PATH
|
||||||
|
@ -115,7 +114,7 @@ jobs:
|
||||||
if: |
|
if: |
|
||||||
runner.os != 'Windows' &&
|
runner.os != 'Windows' &&
|
||||||
matrix.profile == 'release' &&
|
matrix.profile == 'release' &&
|
||||||
matrix.kind == 'test' &&
|
matrix.job == 'test' &&
|
||||||
github.repository == 'denoland/deno' &&
|
github.repository == 'denoland/deno' &&
|
||||||
(github.ref == 'refs/heads/main' ||
|
(github.ref == 'refs/heads/main' ||
|
||||||
startsWith(github.ref, 'refs/tags/'))
|
startsWith(github.ref, 'refs/tags/'))
|
||||||
|
@ -128,7 +127,7 @@ jobs:
|
||||||
- name: Setup gcloud (windows)
|
- name: Setup gcloud (windows)
|
||||||
if: |
|
if: |
|
||||||
runner.os == 'Windows' &&
|
runner.os == 'Windows' &&
|
||||||
matrix.kind == 'test' &&
|
matrix.job == 'test' &&
|
||||||
matrix.profile == 'release' &&
|
matrix.profile == 'release' &&
|
||||||
github.repository == 'denoland/deno' &&
|
github.repository == 'denoland/deno' &&
|
||||||
(github.ref == 'refs/heads/main' ||
|
(github.ref == 'refs/heads/main' ||
|
||||||
|
@ -148,7 +147,7 @@ jobs:
|
||||||
|
|
||||||
- name: Configure canary build
|
- name: Configure canary build
|
||||||
if: |
|
if: |
|
||||||
matrix.kind == 'test' &&
|
matrix.job == 'test' &&
|
||||||
matrix.profile == 'release' &&
|
matrix.profile == 'release' &&
|
||||||
github.repository == 'denoland/deno' &&
|
github.repository == 'denoland/deno' &&
|
||||||
github.ref == 'refs/heads/main'
|
github.ref == 'refs/heads/main'
|
||||||
|
@ -242,7 +241,7 @@ jobs:
|
||||||
rustc --version
|
rustc --version
|
||||||
cargo --version
|
cargo --version
|
||||||
# Deno is installed when linting.
|
# Deno is installed when linting.
|
||||||
if [ "${{ matrix.kind }}" == "lint" ]
|
if [ "${{ matrix.job }}" == "lint" ]
|
||||||
then
|
then
|
||||||
deno --version
|
deno --version
|
||||||
fi
|
fi
|
||||||
|
@ -317,29 +316,29 @@ jobs:
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: test_format.js
|
- name: test_format.js
|
||||||
if: matrix.kind == 'lint'
|
if: matrix.job == 'lint'
|
||||||
run: deno run --unstable --allow-write --allow-read --allow-run ./tools/format.js --check
|
run: deno run --unstable --allow-write --allow-read --allow-run ./tools/format.js --check
|
||||||
|
|
||||||
- name: lint.js
|
- name: lint.js
|
||||||
if: matrix.kind == 'lint'
|
if: matrix.job == 'lint'
|
||||||
# TODO(ry) assert matrix.profile == "debug"
|
# TODO(ry) assert matrix.profile == "debug"
|
||||||
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: |
|
||||||
(matrix.kind == 'test' || matrix.kind == 'bench') &&
|
(matrix.job == 'test' || matrix.job == 'bench') &&
|
||||||
matrix.profile == 'debug' && !matrix.use_sysroot
|
matrix.profile == 'debug' && !matrix.use_sysroot
|
||||||
run: cargo build --locked --all-targets
|
run: cargo build --locked --all-targets
|
||||||
|
|
||||||
- name: Build release
|
- name: Build release
|
||||||
if: |
|
if: |
|
||||||
(matrix.kind == 'test' || matrix.kind == 'bench') &&
|
(matrix.job == 'test' || matrix.job == 'bench') &&
|
||||||
matrix.profile == 'release' && !matrix.use_sysroot
|
matrix.profile == 'release' && !matrix.use_sysroot
|
||||||
run: cargo build --release --locked --all-targets
|
run: cargo build --release --locked --all-targets
|
||||||
|
|
||||||
- name: Build release (in sysroot)
|
- name: Build release (in sysroot)
|
||||||
if: |
|
if: |
|
||||||
(matrix.kind == 'test' || matrix.kind == 'bench') &&
|
(matrix.job == 'test' || matrix.job == 'bench') &&
|
||||||
matrix.profile == 'release' && matrix.use_sysroot
|
matrix.profile == 'release' && matrix.use_sysroot
|
||||||
run: |
|
run: |
|
||||||
sudo chroot /sysroot \
|
sudo chroot /sysroot \
|
||||||
|
@ -349,7 +348,7 @@ jobs:
|
||||||
- name: Pre-release (linux)
|
- name: Pre-release (linux)
|
||||||
if: |
|
if: |
|
||||||
startsWith(matrix.os, 'ubuntu') &&
|
startsWith(matrix.os, 'ubuntu') &&
|
||||||
matrix.kind == 'test' &&
|
matrix.job == 'test' &&
|
||||||
matrix.profile == 'release'
|
matrix.profile == 'release'
|
||||||
run: |
|
run: |
|
||||||
cd target/release
|
cd target/release
|
||||||
|
@ -359,7 +358,7 @@ jobs:
|
||||||
- name: Pre-release (mac)
|
- name: Pre-release (mac)
|
||||||
if: |
|
if: |
|
||||||
startsWith(matrix.os, 'macOS') &&
|
startsWith(matrix.os, 'macOS') &&
|
||||||
matrix.kind == 'test' &&
|
matrix.job == 'test' &&
|
||||||
matrix.profile == 'release'
|
matrix.profile == 'release'
|
||||||
run: |
|
run: |
|
||||||
cd target/release
|
cd target/release
|
||||||
|
@ -368,7 +367,7 @@ jobs:
|
||||||
- name: Pre-release (windows)
|
- name: Pre-release (windows)
|
||||||
if: |
|
if: |
|
||||||
startsWith(matrix.os, 'windows') &&
|
startsWith(matrix.os, 'windows') &&
|
||||||
matrix.kind == 'test' &&
|
matrix.job == 'test' &&
|
||||||
matrix.profile == 'release'
|
matrix.profile == 'release'
|
||||||
run: |
|
run: |
|
||||||
Compress-Archive -CompressionLevel Optimal -Force -Path target/release/deno.exe -DestinationPath target/release/deno-x86_64-pc-windows-msvc.zip
|
Compress-Archive -CompressionLevel Optimal -Force -Path target/release/deno.exe -DestinationPath target/release/deno-x86_64-pc-windows-msvc.zip
|
||||||
|
@ -376,7 +375,7 @@ jobs:
|
||||||
- name: Upload canary to dl.deno.land (unix)
|
- name: Upload canary to dl.deno.land (unix)
|
||||||
if: |
|
if: |
|
||||||
runner.os != 'Windows' &&
|
runner.os != 'Windows' &&
|
||||||
matrix.kind == 'test' &&
|
matrix.job == 'test' &&
|
||||||
matrix.profile == 'release' &&
|
matrix.profile == 'release' &&
|
||||||
github.repository == 'denoland/deno' &&
|
github.repository == 'denoland/deno' &&
|
||||||
github.ref == 'refs/heads/main'
|
github.ref == 'refs/heads/main'
|
||||||
|
@ -386,7 +385,7 @@ jobs:
|
||||||
- name: Upload canary to dl.deno.land (windows)
|
- name: Upload canary to dl.deno.land (windows)
|
||||||
if: |
|
if: |
|
||||||
runner.os == 'Windows' &&
|
runner.os == 'Windows' &&
|
||||||
matrix.kind == 'test' &&
|
matrix.job == 'test' &&
|
||||||
matrix.profile == 'release' &&
|
matrix.profile == 'release' &&
|
||||||
github.repository == 'denoland/deno' &&
|
github.repository == 'denoland/deno' &&
|
||||||
github.ref == 'refs/heads/main'
|
github.ref == 'refs/heads/main'
|
||||||
|
@ -398,7 +397,7 @@ jobs:
|
||||||
|
|
||||||
- name: Test debug
|
- name: Test debug
|
||||||
if: |
|
if: |
|
||||||
matrix.kind == 'test' && matrix.profile == 'debug' &&
|
matrix.job == 'test' && matrix.profile == 'debug' &&
|
||||||
!matrix.use_sysroot
|
!matrix.use_sysroot
|
||||||
run: |
|
run: |
|
||||||
cargo test --locked --doc
|
cargo test --locked --doc
|
||||||
|
@ -406,13 +405,13 @@ jobs:
|
||||||
|
|
||||||
- name: Test release
|
- name: Test release
|
||||||
if: |
|
if: |
|
||||||
matrix.kind == 'test' && matrix.profile == 'release' &&
|
matrix.job == 'test' && matrix.profile == 'release' &&
|
||||||
!matrix.use_sysroot
|
!matrix.use_sysroot
|
||||||
run: cargo test --release --locked
|
run: cargo test --release --locked
|
||||||
|
|
||||||
- name: Test release (in sysroot)
|
- name: Test release (in sysroot)
|
||||||
if: |
|
if: |
|
||||||
matrix.kind == 'test' && matrix.profile == 'release' &&
|
matrix.job == 'test' && matrix.profile == 'release' &&
|
||||||
matrix.use_sysroot
|
matrix.use_sysroot
|
||||||
run: |
|
run: |
|
||||||
sudo chroot /sysroot \
|
sudo chroot /sysroot \
|
||||||
|
@ -422,13 +421,13 @@ jobs:
|
||||||
# TODO(ry): Because CI is so slow on for OSX and Windows, we currently
|
# TODO(ry): Because CI is so slow on for OSX and Windows, we currently
|
||||||
# run the Web Platform tests only on Linux.
|
# 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.kind == 'test'
|
if: startsWith(matrix.os, 'ubuntu') && matrix.job == 'test'
|
||||||
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: |
|
||||||
startsWith(matrix.os, 'ubuntu') && matrix.kind == 'test' &&
|
startsWith(matrix.os, 'ubuntu') && matrix.job == 'test' &&
|
||||||
matrix.profile == 'debug'
|
matrix.profile == 'debug'
|
||||||
env:
|
env:
|
||||||
DENO_BIN: ./target/debug/deno
|
DENO_BIN: ./target/debug/deno
|
||||||
|
@ -442,7 +441,7 @@ jobs:
|
||||||
|
|
||||||
- name: Run web platform tests (release)
|
- name: Run web platform tests (release)
|
||||||
if: |
|
if: |
|
||||||
startsWith(matrix.os, 'ubuntu') && matrix.kind == 'test' &&
|
startsWith(matrix.os, 'ubuntu') && matrix.job == 'test' &&
|
||||||
matrix.profile == 'release'
|
matrix.profile == 'release'
|
||||||
env:
|
env:
|
||||||
DENO_BIN: ./target/release/deno
|
DENO_BIN: ./target/release/deno
|
||||||
|
@ -460,7 +459,7 @@ jobs:
|
||||||
- name: Upload wpt results to dl.deno.land
|
- name: Upload wpt results to dl.deno.land
|
||||||
if: |
|
if: |
|
||||||
runner.os == 'Linux' &&
|
runner.os == 'Linux' &&
|
||||||
matrix.kind == 'test' &&
|
matrix.job == 'test' &&
|
||||||
matrix.profile == 'release' &&
|
matrix.profile == 'release' &&
|
||||||
github.repository == 'denoland/deno' &&
|
github.repository == 'denoland/deno' &&
|
||||||
github.ref == 'refs/heads/main'
|
github.ref == 'refs/heads/main'
|
||||||
|
@ -474,7 +473,7 @@ jobs:
|
||||||
- name: Upload wpt results to wpt.fyi
|
- name: Upload wpt results to wpt.fyi
|
||||||
if: |
|
if: |
|
||||||
runner.os == 'Linux' &&
|
runner.os == 'Linux' &&
|
||||||
matrix.kind == 'test' &&
|
matrix.job == 'test' &&
|
||||||
matrix.profile == 'release' &&
|
matrix.profile == 'release' &&
|
||||||
github.repository == 'denoland/deno' &&
|
github.repository == 'denoland/deno' &&
|
||||||
github.ref == 'refs/heads/main'
|
github.ref == 'refs/heads/main'
|
||||||
|
@ -487,11 +486,11 @@ jobs:
|
||||||
./tools/upload_wptfyi.js $(git rev-parse HEAD) --ghstatus
|
./tools/upload_wptfyi.js $(git rev-parse HEAD) --ghstatus
|
||||||
|
|
||||||
- name: Run benchmarks
|
- name: Run benchmarks
|
||||||
if: matrix.kind == 'bench' && !matrix.use_sysroot
|
if: matrix.job == 'bench' && !matrix.use_sysroot
|
||||||
run: cargo bench --locked
|
run: cargo bench --locked
|
||||||
|
|
||||||
- name: Run benchmarks (in sysroot)
|
- name: Run benchmarks (in sysroot)
|
||||||
if: matrix.kind == 'bench' && matrix.use_sysroot
|
if: matrix.job == 'bench' && matrix.use_sysroot
|
||||||
run: |
|
run: |
|
||||||
sudo chroot /sysroot \
|
sudo chroot /sysroot \
|
||||||
su -l "$(whoami)" \
|
su -l "$(whoami)" \
|
||||||
|
@ -499,7 +498,7 @@ jobs:
|
||||||
|
|
||||||
- name: Post Benchmarks
|
- name: Post Benchmarks
|
||||||
if: |
|
if: |
|
||||||
matrix.kind == 'bench' &&
|
matrix.job == 'bench' &&
|
||||||
github.repository == 'denoland/deno' &&
|
github.repository == 'denoland/deno' &&
|
||||||
github.ref == 'refs/heads/main'
|
github.ref == 'refs/heads/main'
|
||||||
env:
|
env:
|
||||||
|
@ -518,13 +517,13 @@ jobs:
|
||||||
git push origin gh-pages
|
git push origin gh-pages
|
||||||
|
|
||||||
- name: Build product size info
|
- name: Build product size info
|
||||||
if: matrix.kind != 'lint'
|
if: matrix.job != 'lint'
|
||||||
run: |
|
run: |
|
||||||
du -hd1 "./target/${{ matrix.profile }}"
|
du -hd1 "./target/${{ matrix.profile }}"
|
||||||
du -ha "./target/${{ matrix.profile }}/deno"
|
du -ha "./target/${{ matrix.profile }}/deno"
|
||||||
|
|
||||||
- name: Worker info
|
- name: Worker info
|
||||||
if: matrix.kind == 'bench'
|
if: matrix.job == 'bench'
|
||||||
run: |
|
run: |
|
||||||
cat /proc/cpuinfo
|
cat /proc/cpuinfo
|
||||||
cat /proc/meminfo
|
cat /proc/meminfo
|
||||||
|
@ -532,7 +531,7 @@ jobs:
|
||||||
- name: Upload release to dl.deno.land (unix)
|
- name: Upload release to dl.deno.land (unix)
|
||||||
if: |
|
if: |
|
||||||
runner.os != 'Windows' &&
|
runner.os != 'Windows' &&
|
||||||
matrix.kind == 'test' &&
|
matrix.job == 'test' &&
|
||||||
matrix.profile == 'release' &&
|
matrix.profile == 'release' &&
|
||||||
github.repository == 'denoland/deno' &&
|
github.repository == 'denoland/deno' &&
|
||||||
startsWith(github.ref, 'refs/tags/')
|
startsWith(github.ref, 'refs/tags/')
|
||||||
|
@ -544,7 +543,7 @@ jobs:
|
||||||
- name: Upload release to dl.deno.land (windows)
|
- name: Upload release to dl.deno.land (windows)
|
||||||
if: |
|
if: |
|
||||||
runner.os == 'Windows' &&
|
runner.os == 'Windows' &&
|
||||||
matrix.kind == 'test' &&
|
matrix.job == 'test' &&
|
||||||
matrix.profile == 'release' &&
|
matrix.profile == 'release' &&
|
||||||
github.repository == 'denoland/deno' &&
|
github.repository == 'denoland/deno' &&
|
||||||
startsWith(github.ref, 'refs/tags/')
|
startsWith(github.ref, 'refs/tags/')
|
||||||
|
@ -559,7 +558,7 @@ jobs:
|
||||||
- name: Upload release to GitHub
|
- name: Upload release to GitHub
|
||||||
uses: softprops/action-gh-release@59c3b4891632ff9a897f99a91d7bc557467a3a22
|
uses: softprops/action-gh-release@59c3b4891632ff9a897f99a91d7bc557467a3a22
|
||||||
if: |
|
if: |
|
||||||
matrix.kind == 'test' &&
|
matrix.job == 'test' &&
|
||||||
matrix.profile == 'release' &&
|
matrix.profile == 'release' &&
|
||||||
github.repository == 'denoland/deno' &&
|
github.repository == 'denoland/deno' &&
|
||||||
startsWith(github.ref, 'refs/tags/')
|
startsWith(github.ref, 'refs/tags/')
|
||||||
|
|
Loading…
Reference in a new issue