forked from google/xls
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (45 loc) · 1.72 KB
/
one-bazel-test-ubuntu-20.04.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
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
# See also: https://github.com/marketplace/actions/bazel-action
name: Solo Bazel Test (Ubuntu 20.04)
on:
workflow_dispatch:
inputs:
target:
description: 'Bazel Target Pattern'
default: '//xls/dslx:interpreter_test'
required: true
runs_per_test:
description: 'Number of Runs'
default: '1'
required: true
env:
BAZEL_TARGET: ${{ github.event.inputs.target }}
BAZEL_RUNS_PER_TEST: ${{ github.event.inputs.runs_per_test }}
jobs:
build:
name: Bazel Test (opt)
runs-on:
labels: ubuntu-20.04-64core
timeout-minutes: 600
steps:
- uses: actions/checkout@v2
- name: Mount Bazel Cache
uses: actions/cache@v3
with:
path: "~/.cache/bazel"
# Create/use a cache called bazel-cache-20_04-<commit hash>
# and read the latest cache with prefix bazel-cache-20_04-
# if it doesn't already exist.
key: bazel-cache-20_04-${{ github.sha }}
restore-keys: bazel-cache-20_04-
- name: Install bazelisk
run: |
curl -LO "https://github.com/bazelbuild/bazelisk/releases/download/v1.1.0/bazelisk-linux-amd64"
mkdir -p "${GITHUB_WORKSPACE}/bin/"
mv bazelisk-linux-amd64 "${GITHUB_WORKSPACE}/bin/bazel"
chmod +x "${GITHUB_WORKSPACE}/bin/bazel"
- name: Install dependencies via apt
run: sudo apt-get install python3-dev python3-distutils python3-dev python-is-python3 libtinfo5
- name: Bazel Test Target (opt)
run: |
"${GITHUB_WORKSPACE}/bin/bazel" test -c opt --test_output=all --runs_per_test=$BAZEL_RUNS_PER_TEST -- $BAZEL_TARGET