-
Notifications
You must be signed in to change notification settings - Fork 7
64 lines (55 loc) · 1.93 KB
/
bazelBuildAndTestTorchmlir.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Licensed under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
# Also available under a BSD-style license. See LICENSE.
name: Bazel Build and Test (torch-mlir)
# Only run when torch-mlir hash changes (deps.bzl)
on:
pull_request:
branches:
- main
paths:
- 'deps.bzl'
- '.github/workflows/bazelBuildAndTestTorchmlir.yml'
# TODO: Use self-hosted runners as we hit disk space issues with GitHub hosted runners
# push:
# branches:
# - main
# paths:
# - 'deps.bzl'
# - '.github/workflows/bazelBuildAndTestTorchmlir.yml'
workflow_dispatch:
# Ensure that only a single job or workflow using the same
# concurrency group will run at a time. This would cancel
# any in-progress jobs in the same github workflow and github
# ref (e.g. refs/heads/main or refs/pull/<pr_number>/merge).
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
ubuntu-build:
name: ubuntu-x86_64 / torch-mlir
runs-on: ubuntu-latest
steps:
- name: Checkout mlir-tcp
uses: actions/checkout@v4
- name: Setup workspace
uses: ./.github/actions/setup-build
with:
cache-prefix: 'torch-mlir'
- name: Build docker image
run: |
docker build -f docker/Dockerfile \
-t mlir-tcp:ci \
--build-arg GROUP=$(id -gn) \
--build-arg GID=$(id -g) \
--build-arg USER=$(id -un) \
--build-arg UID=$(id -u) \
.
- name: Bazel build and test torch-mlir
run: |
docker run --rm \
-v "$(pwd)":"/opt/src/mlir-tcp" \
-v "${HOME}/.cache/bazel":"${HOME}/.cache/bazel" \
mlir-tcp:ci \
bazel test --test_output=errors @torch-mlir//...