File tree Expand file tree Collapse file tree 4 files changed +55
-4
lines changed
Expand file tree Collapse file tree 4 files changed +55
-4
lines changed Original file line number Diff line number Diff line change 1+ name : ci
2+ on :
3+ push :
4+ branches :
5+ - master
6+ pull_request :
7+ workflow_dispatch :
8+
9+ defaults :
10+ run :
11+ shell : bash
12+
13+ # Cancels a previous run if a new commit is made on the same pull request
14+ concurrency :
15+ group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
16+ cancel-in-progress : true
17+
18+
19+ jobs :
20+ build :
21+ strategy :
22+ matrix :
23+ os : [ubuntu-latest, macos-latest, windows-latest]
24+
25+ runs-on : ${{ matrix.os }}
26+
27+ steps :
28+ - name : Checkout repository
29+ uses : actions/checkout@v4
30+
31+ - name : Set up Bazel
32+ uses : bazel-contrib/setup-bazel@0.14.0
33+ with :
34+ bazelisk-cache : true
35+ disk-cache : ${{ github.workflow }}
36+ repository-cache : true
37+
38+ - name : Bazel tests
39+ run : bazel test src:all
Original file line number Diff line number Diff line change @@ -59,3 +59,9 @@ git_repository(
5959 remote = "https://github.com/nlohmann/json.git" ,
6060 shallow_since = "1701207391 +0100" ,
6161)
62+
63+ http_archive (
64+ name = "platforms" ,
65+ urls = ["https://github.com/bazelbuild/platforms/archive/refs/tags/0.0.6.zip" ],
66+ strip_prefix = "platforms-0.0.6" ,
67+ )
Original file line number Diff line number Diff line change @@ -27,10 +27,15 @@ OPT_COPTS = select({
2727 "-fno-fast-math" ,
2828 "-flto" ,
2929 "-march=native" ,
30- "-mmacosx-version-min=10.15"
3130 ],
3231 ":debug" : ["-Og" ],
33- }) + ["-std=c++20" ]
32+ }) + select ({
33+ "@platforms//os:windows" : ["/std:c++20" ],
34+ "//conditions:default" : ["-std=c++20" ],
35+ }) + select ({
36+ "@platforms//os:macos" : ["-mmacosx-version-min=10.15" ],
37+ "//conditions:default" : [],
38+ })
3439
3540OPT_LINKOPTS = select ({
3641 "//conditions:default" : [
@@ -100,7 +105,8 @@ cc_test(
100105 name = "tesseract_tests" ,
101106 timeout = "eternal" ,
102107 srcs = ["tesseract.test.cc" ],
103- tags = ["exclusive" ],
108+ copts = OPT_COPTS ,
109+ linkopts = OPT_LINKOPTS ,
104110 deps = [
105111 ":libsimplex" ,
106112 ":libtesseract" ,
Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ bool simplex_test_compare(stim::DetectorErrorModel& dem,
8080
8181TEST (tesseract, Tesseract_simplex_test) {
8282 for (float p_err : {0.001 , 0.003 , 0.005 }) {
83- for (size_t distance : {3 , 5 , 7 }) {
83+ for (size_t distance : {3 , 5 }) {
8484 for (const size_t num_rounds : {2 , 5 , 10 }) {
8585 const size_t num_shots = 1000 / num_rounds / distance;
8686 std::cout << " p_err = " << p_err << " distance = " << distance
You can’t perform that action at this time.
0 commit comments