Skip to content

Commit

Permalink
Enable automated Bazel tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
95-martin-orion committed Mar 5, 2020
1 parent 3ec753d commit 6adf1d5
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/bazeltest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Bazel

on:
push:
# Run post-submit tests when pushing to master.
branches:
- master

# Run tests for any PRs.
pull_request:

jobs:
# Run tests with Bazel.
test:
name: Test on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]

steps:
- uses: actions/checkout@v2
- name: Checkout submodules
run: git submodule update --init --recursive
- name: Run C++ tests
run: bazel test tests:all
- name: Run sample simulation
run: bazel run apps:qsim_base -c circuits/circuit_q24
1 change: 1 addition & 0 deletions apps/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ cc_binary(
name = "qsim_base",
srcs = ["qsim_base.cc"],
deps = ["//lib:qsim_lib"],
data = ["//circuits:circuit_q24"],
copts = [
"-O3",
"-mavx2",
Expand Down
5 changes: 5 additions & 0 deletions circuits/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
exports_files([
"circuit_q24",
"circuit_q30",
"circuit_q40",
])

0 comments on commit 6adf1d5

Please sign in to comment.