summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build.yml39
-rw-r--r--.github/workflows/lint.yml2
2 files changed, 37 insertions, 4 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 22886e48e..1bcf8ff21 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -1,14 +1,20 @@
-name: Build and test
+name: build
on: [push, pull_request]
jobs:
build:
- name: Build and test for ${{ matrix.os }}
+ name: ${{ matrix.kind }} ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
- os: [ubuntu-latest, windows-2016, macOS-latest]
+ os: [macOS-10.14, windows-2016, ubuntu-16.04]
+ kind: ['test', 'bench']
+ exclude:
+ - os: windows-2016
+ kind: 'bench'
+ - os: macOS-10.14
+ kind: 'bench'
steps:
- name: Configure git
run: git config --global core.symlinks true
@@ -73,7 +79,34 @@ jobs:
run: cargo build --release --locked --all-targets
- name: Test
+ if: matrix.kind == 'test'
run: cargo test --release --locked --all-targets
+ - name: Run Benchmarks
+ if: matrix.kind == 'bench'
+ run: python ./tools/benchmark.py target/release
+
+ - name: Post Benchmarks
+ if: matrix.kind == 'bench' && github.ref == 'refs/heads/master'
+ env:
+ DENOBOT_PAT: ${{ secrets.DENOBOT_PAT }}
+ run: |
+ # Note gh-pages branch is cloned into //gh-pages/ by
+ # tools/benchmark.py, hence the following copy is ok:
+ cp -r website/* gh-pages/
+ cd gh-pages
+ git remote add origin2 https://${DENOBOT_PAT}@github.com/denoland/deno.git
+ git config user.email "propelml@gmail.com"
+ git config user.name "denobot"
+ git add .
+ git commit --message "Update benchmarks"
+ git push origin2 gh-pages
+
+ - name: Worker info
+ if: matrix.kind == 'bench'
+ run: |
+ cat /proc/cpuinfo
+ cat /proc/meminfo
+
- name: Stop sccache
run: sccache --stop-server
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index ec426dfb9..2f6ea0be8 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -5,7 +5,7 @@ on: [push, pull_request]
jobs:
clippy:
name: lint
- runs-on: ubuntu-latest
+ runs-on: ubuntu-16.04
steps:
- name: Configure git
run: git config --global core.symlinks true