Nightly (GitHub runners) #708
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Builds the Docker from scratch and runs tests (on GitHub's runners). | |
name: Nightly (GitHub runners) | |
on: | |
schedule: | |
- cron: '0 8 * * *' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# ssh-agent needs to be started so that docker build can use SSH. We use SSH | |
# when cargo is building glenside, as cargo needs to clone the private | |
# 3la-tvm repo (for the Rust TVM bindings.) | |
- name: Start ssh-agent | |
uses: webfactory/[email protected] | |
with: | |
ssh-private-key: ${{ secrets.SSH_KEY }} | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
ssh-key: ${{ secrets.SSH_KEY }} | |
# TODO we currently have two ways of providing the SSH key: via ssh-agent + | |
# a GitHub secret, and explicitly as a build-arg flag. We should use just | |
# one method. | |
- name: Build the Docker image | |
id: build | |
run: | | |
export TAG=3la-docker:$(date +%s) | |
echo "::set-output name=TAG::$TAG" | |
DOCKER_BUILDKIT=1 docker build \ | |
. \ | |
--file Dockerfile \ | |
--ssh default \ | |
--build-arg SSH_KEY="${{ secrets.SSH_KEY }}" \ | |
--no-cache \ | |
--tag $TAG | |
- name: Run tests | |
run: docker run --env EVAL_TYPE=1 ${{ steps.build.outputs.TAG }} ./run.sh |