0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-03-03 09:31:22 -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:
Ryan Dahl 2020-03-22 19:21:31 -04:00 committed by GitHub
parent c337d2c434
commit 3e74309798
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,28 +4,27 @@ on: [push, pull_request]
jobs:
build:
name: ${{ matrix.kind }} ${{ matrix.os }}
runs-on: ${{ matrix.os }}
name: ${{ matrix.config.kind }} ${{ matrix.config.os }}
if: |
github.event_name == 'push' ||
!startsWith(github.event.pull_request.head.label, 'denoland:')
runs-on: ${{ matrix.config.os }}
timeout-minutes: 60
strategy:
matrix:
os: [macOS-latest, ubuntu-16.04, windows-2019]
kind: ['test_release', 'test_debug', 'bench', 'lint']
exclude:
- os: windows-2019
kind: 'bench'
config:
- os: macOS-latest
kind: 'bench'
kind: test_release
- os: windows-2019
kind: 'lint'
- os: macOS-latest
kind: 'lint'
- os: windows-2019
kind: 'test_debug'
- os: macOS-latest
kind: 'test_debug'
kind: test_release
- os: ubuntu-16.04
kind: test_release
- os: ubuntu-16.04
kind: test_debug
- os: ubuntu-16.04
kind: bench
- os: ubuntu-16.04
kind: lint
# 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
@ -52,7 +51,7 @@ jobs:
submodules: true
- 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: |
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
@ -63,7 +62,7 @@ jobs:
rust-version: "1.42.0"
- name: Install clippy and rustfmt
if: matrix.kind == 'lint'
if: matrix.config.kind == 'lint'
run: |
rustup component add clippy
rustup component add rustfmt
@ -75,7 +74,7 @@ jobs:
architecture: x64
- name: Remove unused versions of Python
if: startsWith(matrix.os, 'windows')
if: startsWith(matrix.config.os, 'windows')
run: |-
$env:PATH -split ";" |
Where-Object { Test-Path "$_\python.exe" } |
@ -111,38 +110,38 @@ jobs:
target/*/deps
target/*/gn_out
key:
${{ matrix.os }}-${{ matrix.kind }}-${{ hashFiles('Cargo.lock') }}
${{ matrix.config.os }}-${{ matrix.config.kind }}-${{ hashFiles('Cargo.lock') }}
- name: lint.py
if: matrix.kind == 'lint'
if: matrix.config.kind == 'lint'
run: python ./tools/lint.py
- name: test_format.py
if: matrix.kind == 'lint'
if: matrix.config.kind == 'lint'
run: python ./tools/test_format.py
- 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
- name: Build debug
if: matrix.kind == 'test_debug'
if: matrix.config.kind == 'test_debug'
run: cargo build --locked --all-targets
- name: Test release
if: matrix.kind == 'test_release'
if: matrix.config.kind == 'test_release'
run: cargo test --release --locked --all-targets
- name: Test debug
if: matrix.kind == 'test_debug'
if: matrix.config.kind == 'test_debug'
run: cargo test --locked --all-targets
- name: Run Benchmarks
if: matrix.kind == 'bench'
if: matrix.config.kind == 'bench'
run: python ./tools/benchmark.py --release
- 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:
DENOBOT_PAT: ${{ secrets.DENOBOT_PAT }}
run: |
@ -156,33 +155,52 @@ jobs:
git push origin gh-pages
- name: Worker info
if: matrix.kind == 'bench'
if: matrix.config.kind == 'bench'
run: |
cat /proc/cpuinfo
cat /proc/meminfo
- name: Pre-release (linux)
if: startsWith(matrix.os, 'ubuntu') && matrix.kind == 'test_release'
run: gzip -f -S _linux_x64.gz target/release/deno
if: startsWith(matrix.config.os, 'ubuntu') && matrix.config.kind == 'test_release'
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)
if: startsWith(matrix.os, 'macOS') && matrix.kind == 'test_release'
run: gzip -f -S _osx_x64.gz target/release/deno
if: startsWith(matrix.config.os, 'macOS') && matrix.config.kind == 'test_release'
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)
if: startsWith(matrix.os, 'windows') && matrix.kind == 'test_release'
run: Compress-Archive -CompressionLevel Optimal -Force -Path target/release/deno.exe -DestinationPath target/release/deno_win_x64.zip
if: startsWith(matrix.config.os, 'windows') && matrix.config.kind == 'test_release'
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
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:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: |
# Old filenames (remove once deno_install updated)
target/release/deno_win_x64.zip
target/release/deno_linux_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
draft: true
@ -190,8 +208,8 @@ jobs:
if: >
startsWith(github.ref, 'refs/tags/') &&
github.repository == 'denoland/deno' &&
matrix.kind == 'test_release' &&
startsWith(matrix.os, 'ubuntu')
matrix.config.kind == 'test_release' &&
startsWith(matrix.config.os, 'ubuntu')
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: |