Skip to content

Add citation information to README #51

Add citation information to README

Add citation information to README #51

Workflow file for this run

name: CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build-container:
runs-on: ubuntu-latest
container: docker:20.10.24-git
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: True
- name: Log in to Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
file: diana/docker/Dockerfile.tvm
push: true
labels: ${{ steps.meta.outputs.labels }}
tags: ${{ steps.meta.outputs.tags }}
outputs:
container_name: ${{ steps.meta.outputs.tags }}
build-htvm-release:
runs-on: ubuntu-latest
needs: build-container
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: True
- name: Cache HTVM Build if C++ is not altered
id: cache-build
uses: actions/cache@v3
with:
path: build
key: ${{ hashFiles('src', 'cmake', 'include') }}
- name: Build HTVM Release
if: steps.cache-build.outputs.cache-hit != 'true'
uses: addnab/docker-run-action@v3
with:
image: ${{ needs.build-container.outputs.container_name }}
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
options: -v ${{ github.workspace }}:/tvm-fork
run: |
mkdir build
cp diana/config.cmake build
cd build
cmake ..
make -j$(nproc)
cd ..
- name: Store HTVM Build
uses: actions/upload-artifact@v3
with:
name: build
path: build
test-htvm-unit:
runs-on: ubuntu-latest
needs: [build-container, build-htvm-release]
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: True
- name: Download previous HTVM build
uses: actions/download-artifact@v3
with:
name: build
path: build
- name: Run unit tests
uses: addnab/docker-run-action@v3
with:
image: ${{ needs.build-container.outputs.container_name }}
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
options: -v ${{ github.workspace }}:/tvm-fork
run: |
export TVM_HOME=`pwd`
export PYTHONPATH=$PYTHONPATH:`pwd`/python
pytest tests/python/contrib/test_soma_dory
test-htvm-e2e:
runs-on: ubuntu-latest
needs: [build-container, build-htvm-release]
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: True
lfs: True
- name: Download previous HTVM build
uses: actions/download-artifact@v3
with:
name: build
path: build
- name: Run end-to-end tests
uses: addnab/docker-run-action@v3
with:
image: ${{ needs.build-container.outputs.container_name }}
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
options: -v ${{ github.workspace }}:/tvm-fork
run: |
export TVM_HOME=`pwd`
export PYTHONPATH=$PYTHONPATH:`pwd`/python
cd diana/byoc
echo "Dory version is "`git --git-dir /dory/.git rev-parse HEAD`
pytest -v test.py