diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2019-10-02 19:00:46 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-02 19:00:46 -0400 |
commit | 8727d1c4f6cb3de820343326ca08a87c978343ad (patch) | |
tree | f39f8a3af7c0c9a40b73451b5c11f66376d5f801 | |
parent | a569be861af53860d3af89683b541a85651738e7 (diff) |
Run benchmarks from GH actions instead of Travis (#3049)
-rw-r--r-- | .github/workflows/build.yml | 39 | ||||
-rw-r--r-- | .github/workflows/lint.yml | 2 | ||||
-rw-r--r-- | .travis.yml | 15 |
3 files changed, 37 insertions, 19 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 diff --git a/.travis.yml b/.travis.yml index ade134a59..82d0bda3c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -87,18 +87,3 @@ jobs: - *gzip_release deploy: - *release_provider - - # Run benchmarks and publish the result to github pages. - - name: "benchmarks" - script: - - cargo build -vv --release --locked --all-targets - - ./tools/benchmark.py target/release && cp -r website/* gh-pages/ - deploy: - - provider: pages - github-token: *github-token - keep-history: true - local-dir: gh-pages - on: - branch: master - repo: denoland/deno - skip-cleanup: true |