Skip to content

Update skakoui-lichess.yml #128

Update skakoui-lichess.yml

Update skakoui-lichess.yml #128

Workflow file for this run

name: Deploy
on: [push, pull_request]
env:
CARGO_TERM_COLOR: always
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- run: make test-all
bench:
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- run: make bench | tee output.txt
- uses: rhysd/github-action-benchmark@v1
with:
name: Benchmark
tool: 'cargo'
output-file-path: output.txt
github-token: ${{ secrets.GITHUB_TOKEN }}
gh-pages-branch: criterion
benchmark-data-dir-path: .
auto-push: true
alert-threshold: '200%'
fail-on-alert: true
deploy:
if: github.ref == 'refs/heads/master'
env:
IMAGE: aelred/skakoui
needs: test
runs-on: ubuntu-latest
steps:
- id: prep
run: |
branch=${GITHUB_REF##*/}
sha=${GITHUB_SHA::8}
ts=$(date +%s)
echo "::set-output name=BUILD_ID::${branch}-${sha}-${ts}"
- uses: docker/setup-qemu-action@v1
- uses: docker/setup-buildx-action@v1
- uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- uses: docker/build-push-action@v2
with:
push: true
tags: ${{ env.IMAGE }}:${{ steps.prep.outputs.BUILD_ID }}
cache-from: ${{ env.IMAGE }}-stages
cache-to: ${{ env.IMAGE }}-stages