mirror of
https://github.com/denoland/deno.git
synced 2025-03-04 01:44:26 -05:00
ci: releases should all use zip and LLVM target triples (#4460)
Old release files are left around until we are able to update deno_install.
This commit is contained in:
parent
c337d2c434
commit
3e74309798
1 changed files with 57 additions and 39 deletions
96
.github/workflows/ci.yml
vendored
96
.github/workflows/ci.yml
vendored
|
@ -4,28 +4,27 @@ on: [push, pull_request]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: ${{ matrix.kind }} ${{ matrix.os }}
|
name: ${{ matrix.config.kind }} ${{ matrix.config.os }}
|
||||||
runs-on: ${{ matrix.os }}
|
if: |
|
||||||
|
github.event_name == 'push' ||
|
||||||
|
!startsWith(github.event.pull_request.head.label, 'denoland:')
|
||||||
|
runs-on: ${{ matrix.config.os }}
|
||||||
timeout-minutes: 60
|
timeout-minutes: 60
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [macOS-latest, ubuntu-16.04, windows-2019]
|
config:
|
||||||
kind: ['test_release', 'test_debug', 'bench', 'lint']
|
|
||||||
exclude:
|
|
||||||
- os: windows-2019
|
|
||||||
kind: 'bench'
|
|
||||||
- os: macOS-latest
|
- os: macOS-latest
|
||||||
kind: 'bench'
|
kind: test_release
|
||||||
|
|
||||||
- os: windows-2019
|
- os: windows-2019
|
||||||
kind: 'lint'
|
kind: test_release
|
||||||
- os: macOS-latest
|
- os: ubuntu-16.04
|
||||||
kind: 'lint'
|
kind: test_release
|
||||||
|
- os: ubuntu-16.04
|
||||||
- os: windows-2019
|
kind: test_debug
|
||||||
kind: 'test_debug'
|
- os: ubuntu-16.04
|
||||||
- os: macOS-latest
|
kind: bench
|
||||||
kind: 'test_debug'
|
- os: ubuntu-16.04
|
||||||
|
kind: lint
|
||||||
|
|
||||||
# Always run master branch builds to completion. This allows the cache to
|
# Always run master branch builds to completion. This allows the cache to
|
||||||
# stay mostly up-to-date in situations where a single job fails due to
|
# stay mostly up-to-date in situations where a single job fails due to
|
||||||
|
@ -52,7 +51,7 @@ jobs:
|
||||||
submodules: true
|
submodules: true
|
||||||
|
|
||||||
- name: Create source tarballs (release, linux)
|
- name: Create source tarballs (release, linux)
|
||||||
if: startsWith(matrix.os, 'ubuntu') && matrix.kind == 'test_release' && startsWith(github.ref, 'refs/tags/') && github.repository == 'denoland/deno'
|
if: startsWith(matrix.config.os, 'ubuntu') && matrix.config.kind == 'test_release' && startsWith(github.ref, 'refs/tags/') && github.repository == 'denoland/deno'
|
||||||
run: |
|
run: |
|
||||||
mkdir -p target/release
|
mkdir -p target/release
|
||||||
tar --exclude=.cargo --exclude=".git*" --exclude=target --exclude=deno_typescript/typescript/tests --exclude=third_party/cpplint --exclude=third_party/node_modules --exclude=third_party/python_packages --exclude=third_party/prebuilt -czvf target/release/deno_src.tar.gz -C .. deno
|
tar --exclude=.cargo --exclude=".git*" --exclude=target --exclude=deno_typescript/typescript/tests --exclude=third_party/cpplint --exclude=third_party/node_modules --exclude=third_party/python_packages --exclude=third_party/prebuilt -czvf target/release/deno_src.tar.gz -C .. deno
|
||||||
|
@ -63,7 +62,7 @@ jobs:
|
||||||
rust-version: "1.42.0"
|
rust-version: "1.42.0"
|
||||||
|
|
||||||
- name: Install clippy and rustfmt
|
- name: Install clippy and rustfmt
|
||||||
if: matrix.kind == 'lint'
|
if: matrix.config.kind == 'lint'
|
||||||
run: |
|
run: |
|
||||||
rustup component add clippy
|
rustup component add clippy
|
||||||
rustup component add rustfmt
|
rustup component add rustfmt
|
||||||
|
@ -75,7 +74,7 @@ jobs:
|
||||||
architecture: x64
|
architecture: x64
|
||||||
|
|
||||||
- name: Remove unused versions of Python
|
- name: Remove unused versions of Python
|
||||||
if: startsWith(matrix.os, 'windows')
|
if: startsWith(matrix.config.os, 'windows')
|
||||||
run: |-
|
run: |-
|
||||||
$env:PATH -split ";" |
|
$env:PATH -split ";" |
|
||||||
Where-Object { Test-Path "$_\python.exe" } |
|
Where-Object { Test-Path "$_\python.exe" } |
|
||||||
|
@ -111,38 +110,38 @@ jobs:
|
||||||
target/*/deps
|
target/*/deps
|
||||||
target/*/gn_out
|
target/*/gn_out
|
||||||
key:
|
key:
|
||||||
${{ matrix.os }}-${{ matrix.kind }}-${{ hashFiles('Cargo.lock') }}
|
${{ matrix.config.os }}-${{ matrix.config.kind }}-${{ hashFiles('Cargo.lock') }}
|
||||||
|
|
||||||
- name: lint.py
|
- name: lint.py
|
||||||
if: matrix.kind == 'lint'
|
if: matrix.config.kind == 'lint'
|
||||||
run: python ./tools/lint.py
|
run: python ./tools/lint.py
|
||||||
|
|
||||||
- name: test_format.py
|
- name: test_format.py
|
||||||
if: matrix.kind == 'lint'
|
if: matrix.config.kind == 'lint'
|
||||||
run: python ./tools/test_format.py
|
run: python ./tools/test_format.py
|
||||||
|
|
||||||
- name: Build release
|
- name: Build release
|
||||||
if: matrix.kind == 'test_release' || matrix.kind == 'bench'
|
if: matrix.config.kind == 'test_release' || matrix.config.kind == 'bench'
|
||||||
run: cargo build --release --locked --all-targets
|
run: cargo build --release --locked --all-targets
|
||||||
|
|
||||||
- name: Build debug
|
- name: Build debug
|
||||||
if: matrix.kind == 'test_debug'
|
if: matrix.config.kind == 'test_debug'
|
||||||
run: cargo build --locked --all-targets
|
run: cargo build --locked --all-targets
|
||||||
|
|
||||||
- name: Test release
|
- name: Test release
|
||||||
if: matrix.kind == 'test_release'
|
if: matrix.config.kind == 'test_release'
|
||||||
run: cargo test --release --locked --all-targets
|
run: cargo test --release --locked --all-targets
|
||||||
|
|
||||||
- name: Test debug
|
- name: Test debug
|
||||||
if: matrix.kind == 'test_debug'
|
if: matrix.config.kind == 'test_debug'
|
||||||
run: cargo test --locked --all-targets
|
run: cargo test --locked --all-targets
|
||||||
|
|
||||||
- name: Run Benchmarks
|
- name: Run Benchmarks
|
||||||
if: matrix.kind == 'bench'
|
if: matrix.config.kind == 'bench'
|
||||||
run: python ./tools/benchmark.py --release
|
run: python ./tools/benchmark.py --release
|
||||||
|
|
||||||
- name: Post Benchmarks
|
- name: Post Benchmarks
|
||||||
if: matrix.kind == 'bench' && github.ref == 'refs/heads/master' && github.repository == 'denoland/deno'
|
if: matrix.config.kind == 'bench' && github.ref == 'refs/heads/master' && github.repository == 'denoland/deno'
|
||||||
env:
|
env:
|
||||||
DENOBOT_PAT: ${{ secrets.DENOBOT_PAT }}
|
DENOBOT_PAT: ${{ secrets.DENOBOT_PAT }}
|
||||||
run: |
|
run: |
|
||||||
|
@ -156,33 +155,52 @@ jobs:
|
||||||
git push origin gh-pages
|
git push origin gh-pages
|
||||||
|
|
||||||
- name: Worker info
|
- name: Worker info
|
||||||
if: matrix.kind == 'bench'
|
if: matrix.config.kind == 'bench'
|
||||||
run: |
|
run: |
|
||||||
cat /proc/cpuinfo
|
cat /proc/cpuinfo
|
||||||
cat /proc/meminfo
|
cat /proc/meminfo
|
||||||
|
|
||||||
- name: Pre-release (linux)
|
- name: Pre-release (linux)
|
||||||
if: startsWith(matrix.os, 'ubuntu') && matrix.kind == 'test_release'
|
if: startsWith(matrix.config.os, 'ubuntu') && matrix.config.kind == 'test_release'
|
||||||
run: gzip -f -S _linux_x64.gz target/release/deno
|
run: |
|
||||||
|
cd target/release
|
||||||
|
# New filename
|
||||||
|
zip -r deno-x86_64-unknown-linux-gnu.zip deno
|
||||||
|
# Old filename (remove once deno_install updated)
|
||||||
|
gzip -f -S _linux_x64.gz deno
|
||||||
|
|
||||||
- name: Pre-release (mac)
|
- name: Pre-release (mac)
|
||||||
if: startsWith(matrix.os, 'macOS') && matrix.kind == 'test_release'
|
if: startsWith(matrix.config.os, 'macOS') && matrix.config.kind == 'test_release'
|
||||||
run: gzip -f -S _osx_x64.gz target/release/deno
|
run: |
|
||||||
|
cd target/release
|
||||||
|
# New filename
|
||||||
|
zip -r deno-x86_64-apple-darwin.zip deno
|
||||||
|
# Old filename (remove once deno_install updated)
|
||||||
|
gzip -f -S _osx_x64.gz deno
|
||||||
|
|
||||||
- name: Pre-release (windows)
|
- name: Pre-release (windows)
|
||||||
if: startsWith(matrix.os, 'windows') && matrix.kind == 'test_release'
|
if: startsWith(matrix.config.os, 'windows') && matrix.config.kind == 'test_release'
|
||||||
run: Compress-Archive -CompressionLevel Optimal -Force -Path target/release/deno.exe -DestinationPath target/release/deno_win_x64.zip
|
run: |
|
||||||
|
# Old filename (remove once deno_install updated)
|
||||||
|
Compress-Archive -CompressionLevel Optimal -Force -Path target/release/deno.exe -DestinationPath target/release/deno_win_x64.zip
|
||||||
|
# New filename
|
||||||
|
Compress-Archive -CompressionLevel Optimal -Force -Path target/release/deno.exe -DestinationPath target/release/deno-x86_64-pc-windows-msvc.zip
|
||||||
|
|
||||||
- name: Release
|
- name: Release
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
if: matrix.kind == 'test_release' && startsWith(github.ref, 'refs/tags/') && github.repository == 'denoland/deno'
|
if: matrix.config.kind == 'test_release' && startsWith(github.ref, 'refs/tags/') && github.repository == 'denoland/deno'
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
files: |
|
files: |
|
||||||
|
# Old filenames (remove once deno_install updated)
|
||||||
target/release/deno_win_x64.zip
|
target/release/deno_win_x64.zip
|
||||||
target/release/deno_linux_x64.gz
|
target/release/deno_linux_x64.gz
|
||||||
target/release/deno_osx_x64.gz
|
target/release/deno_osx_x64.gz
|
||||||
|
# New filenames
|
||||||
|
target/release/deno-x86_64-pc-windows-msvc.zip
|
||||||
|
target/release/deno-x86_64-unknown-linux-gnu.zip
|
||||||
|
target/release/deno-x86_64-apple-darwin.zip
|
||||||
target/release/deno_src.tar.gz
|
target/release/deno_src.tar.gz
|
||||||
draft: true
|
draft: true
|
||||||
|
|
||||||
|
@ -190,8 +208,8 @@ jobs:
|
||||||
if: >
|
if: >
|
||||||
startsWith(github.ref, 'refs/tags/') &&
|
startsWith(github.ref, 'refs/tags/') &&
|
||||||
github.repository == 'denoland/deno' &&
|
github.repository == 'denoland/deno' &&
|
||||||
matrix.kind == 'test_release' &&
|
matrix.config.kind == 'test_release' &&
|
||||||
startsWith(matrix.os, 'ubuntu')
|
startsWith(matrix.config.os, 'ubuntu')
|
||||||
env:
|
env:
|
||||||
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
|
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
|
|
Loading…
Add table
Reference in a new issue