Skip to content

Commit 6f7b160

Browse files
committed
Try to fix windows build
1 parent 491a740 commit 6f7b160

File tree

8 files changed

+45
-206
lines changed

8 files changed

+45
-206
lines changed

.github/workflows/build_test.yml

Lines changed: 15 additions & 206 deletions
Original file line numberDiff line numberDiff line change
@@ -17,228 +17,37 @@ name: Build / test
1717
on: [push, pull_request]
1818
jobs:
1919
cmake:
20-
name: Build and test ${{ matrix.name }}
21-
runs-on: ubuntu-20.04
22-
strategy:
23-
matrix:
24-
include:
25-
- name: Clang-6.0
26-
extra_deps: clang-6.0
27-
c_compiler: clang-6.0
28-
cxx_compiler: clang++-6.0
29-
cxx_standard: 11
30-
31-
- name: Clang-6.0 (C++14)
32-
extra_deps: clang-6.0
33-
c_compiler: clang-6.0
34-
cxx_compiler: clang++-6.0
35-
cxx_standard: 14
36-
37-
- name: Clang-6.0 (C++17)
38-
extra_deps: clang-6.0
39-
c_compiler: clang-6.0
40-
cxx_compiler: clang++-6.0
41-
cxx_standard: 17
42-
43-
- name: Clang-7
44-
extra_deps: clang-7
45-
c_compiler: clang-7
46-
cxx_compiler: clang++-7
47-
cxx_standard: 11
48-
49-
- name: Clang-7 (C++14)
50-
extra_deps: clang-7
51-
c_compiler: clang-7
52-
cxx_compiler: clang++-7
53-
cxx_standard: 14
54-
55-
- name: Clang-7 (C++17)
56-
extra_deps: clang-7
57-
c_compiler: clang-7
58-
cxx_compiler: clang++-7
59-
cxx_standard: 17
60-
61-
- name: Clang-8
62-
extra_deps: clang-8
63-
c_compiler: clang-8
64-
cxx_compiler: clang++-8
65-
cxx_standard: 11
66-
67-
- name: Clang-9
68-
extra_deps: clang-9
69-
c_compiler: clang-9
70-
cxx_compiler: clang++-9
71-
cxx_standard: 11
72-
73-
- name: Clang-10
74-
extra_deps: clang-10
75-
c_compiler: clang-10
76-
cxx_compiler: clang++-10
77-
cxx_standard: 11
78-
79-
- name: Clang-10 (C++20)
80-
extra_deps: clang-10
81-
c_compiler: clang-10
82-
cxx_compiler: clang++-10
83-
cxx_standard: 20
84-
85-
- name: Clang-11
86-
extra_deps: clang-11
87-
c_compiler: clang-11
88-
cxx_compiler: clang++-11
89-
cxx_standard: 11
90-
91-
- name: Clang-12
92-
extra_deps: clang-12
93-
c_compiler: clang-12
94-
cxx_compiler: clang++-12
95-
cxx_standard: 11
96-
97-
- name: GCC-8
98-
extra_deps: g++-8
99-
c_compiler: gcc-8
100-
cxx_compiler: g++-8
101-
cxx_flags: -ftrapv
102-
cxx_standard: 11
103-
104-
- name: GCC-8 (C++14)
105-
extra_deps: g++-8
106-
c_compiler: gcc-8
107-
cxx_compiler: g++-8
108-
cxx_flags: -ftrapv
109-
cxx_standard: 14
110-
111-
- name: GCC-8 (C++17)
112-
extra_deps: g++-8
113-
c_compiler: gcc-8
114-
cxx_compiler: g++-8
115-
cxx_flags: -ftrapv
116-
cxx_standard: 17
117-
118-
- name: GCC-9
119-
extra_deps: g++-9
120-
c_compiler: gcc-9
121-
cxx_compiler: g++-9
122-
cxx_flags: -ftrapv
123-
cxx_standard: 11
124-
125-
- name: GCC-10
126-
extra_deps: g++-10
127-
c_compiler: gcc-10
128-
cxx_compiler: g++-10
129-
cxx_flags: -ftrapv
130-
cxx_standard: 11
20+
if: false
21+
runs-on: windows-latest
13122

13223
steps:
133-
- name: Harden Runner
134-
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
135-
with:
136-
egress-policy: audit # cannot be block - runner does git checkout
137-
13824
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.0.0
13925

140-
- name: Install deps
141-
run: sudo apt-get install ${{ matrix.extra_deps }}
142-
14326
- name: Build and test
27+
shell: bash
14428
run: |
14529
export CMAKE_BUILD_PARALLEL_LEVEL=2
14630
export CTEST_PARALLEL_LEVEL=2
147-
CXXFLAGS=${{ matrix.cxx_flags }} CC=${{ matrix.c_compiler }} CXX=${{ matrix.cxx_compiler }} cmake -DHWY_WARNINGS_ARE_ERRORS=ON -DCMAKE_CXX_STANDARD=${{ matrix.cxx_standard }} -B out .
31+
cmake CC=clang CXX=clang++ cmake -DHWY_WARNINGS_ARE_ERRORS=ON -DCMAKE_CXX_STANDARD=11 -B out .
14832
cmake --build out
14933
ctest --test-dir out
15034
151-
cmake_ubuntu_2204:
152-
name: Build and test ${{ matrix.name }}
153-
runs-on: ubuntu-22.04
154-
strategy:
155-
matrix:
156-
include:
157-
- name: Clang-13
158-
extra_deps: clang-13
159-
c_compiler: clang-13
160-
cxx_compiler: clang++-13
161-
cxx_standard: 11
162-
163-
- name: Clang-14
164-
extra_deps: clang-14
165-
c_compiler: clang-14
166-
cxx_compiler: clang++-14
167-
cxx_standard: 11
168-
169-
- name: Clang-15
170-
extra_deps: clang-15
171-
c_compiler: clang-15
172-
cxx_compiler: clang++-15
173-
cxx_standard: 11
174-
175-
- name: Clang-15 (C++20)
176-
extra_deps: clang-15
177-
c_compiler: clang-15
178-
cxx_compiler: clang++-15
179-
cxx_standard: 20
180-
181-
- name: GCC-11
182-
extra_deps: g++-11
183-
c_compiler: gcc-11
184-
cxx_compiler: g++-11
185-
cxx_flags: -ftrapv
186-
cxx_standard: 11
187-
188-
- name: GCC-11 (C++20)
189-
extra_deps: g++-11
190-
c_compiler: gcc-11
191-
cxx_compiler: g++-11
192-
cxx_flags: -ftrapv
193-
cxx_standard: 20
194-
195-
- name: GCC-12
196-
extra_deps: g++-12
197-
c_compiler: gcc-12
198-
cxx_compiler: g++-12
199-
cxx_flags: -ftrapv
200-
cxx_standard: 11
201-
202-
- name: GCC-12 (C++20)
203-
extra_deps: g++-12
204-
c_compiler: gcc-12
205-
cxx_compiler: g++-12
206-
cxx_flags: -ftrapv
207-
cxx_standard: 20
35+
36+
bazel:
37+
runs-on: windows-latest
20838

20939
steps:
210-
- name: Harden Runner
211-
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
212-
with:
213-
egress-policy: audit # cannot be block - runner does git checkout
214-
21540
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.0.0
21641

217-
- name: Install deps
218-
run: sudo apt-get install ${{ matrix.extra_deps }}
42+
- uses: bazelbuild/setup-bazelisk@b39c379c82683a5f25d34f0d062761f62693e0b2 # v3.0.0
21943

220-
- name: Build and test
44+
- name: build
45+
shell: bash
22146
run: |
222-
export CMAKE_BUILD_PARALLEL_LEVEL=2
223-
export CTEST_PARALLEL_LEVEL=2
224-
CXXFLAGS=${{ matrix.cxx_flags }} CC=${{ matrix.c_compiler }} CXX=${{ matrix.cxx_compiler }} cmake -DHWY_WARNINGS_ARE_ERRORS=ON -DCMAKE_CXX_STANDARD=${{ matrix.cxx_standard }} -B out .
225-
cmake --build out
226-
ctest --test-dir out
47+
bazel build :all
22748
228-
bazel:
229-
runs-on: ubuntu-latest
230-
steps:
231-
- name: Harden Runner
232-
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
233-
with:
234-
egress-policy: audit # cannot be block - runner does git checkout
235-
236-
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.0.0
237-
238-
- uses: bazelbuild/setup-bazelisk@b39c379c82683a5f25d34f0d062761f62693e0b2 # v3.0.0
49+
- name: test
50+
shell: bash
51+
run: bazel test :all
23952

240-
- uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v4.0.1
241-
with:
242-
path: ~/.cache/bazel
243-
key: bazel-${{ runner.os }}
244-
- run: bazel build //...
53+

.github/workflows/codeql.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ permissions: {}
1919

2020
jobs:
2121
analyze:
22+
if: false
2223
name: Analyze
2324
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
2425
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}

.github/workflows/docs_pages_workflow.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ permissions:
99
jobs:
1010

1111
build_docs_job:
12+
if: false
1213
runs-on: ubuntu-latest
1314
container: debian:buster-slim
1415

.github/workflows/multiarch.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ permissions:
88

99
jobs:
1010
multiarch:
11+
if: false
1112
runs-on: ubuntu-22.04
1213
strategy:
1314
fail-fast: true

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ docs/g3doc/*
22
docs/html/*
33
docs/md/*
44
docs/rst/*
5+
/bazel*

BUILD

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,10 @@ cc_binary(
414414
":hwy",
415415
":nanobenchmark",
416416
],
417+
linkstatic = select({
418+
"@platforms//cpu:riscv64": True,
419+
"//conditions:default": False,
420+
}),
417421
)
418422

419423
cc_library(
@@ -433,6 +437,10 @@ cc_test(
433437
size = "small",
434438
srcs = ["hwy/tests/list_targets.cc"],
435439
deps = [":hwy"],
440+
linkstatic = select({
441+
"@platforms//cpu:riscv64": True,
442+
"//conditions:default": False,
443+
}),
436444
)
437445

438446
# path, name

hwy/contrib/sort/BUILD

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,10 @@ cc_binary(
189189
":vqsort",
190190
"//:hwy",
191191
],
192+
linkstatic = select({
193+
"@platforms//cpu:riscv64": True,
194+
"//conditions:default": False,
195+
}),
192196
)
193197

194198
cc_test(
@@ -206,6 +210,10 @@ cc_test(
206210
"//:hwy",
207211
"//:hwy_test_util",
208212
],
213+
linkstatic = select({
214+
"@platforms//cpu:riscv64": True,
215+
"//conditions:default": False,
216+
}),
209217
)
210218

211219
cc_test(
@@ -224,6 +232,10 @@ cc_test(
224232
"//:hwy_test_util",
225233
"//:nanobenchmark",
226234
],
235+
linkstatic = select({
236+
"@platforms//cpu:riscv64": True,
237+
"//conditions:default": False,
238+
}),
227239
)
228240

229241
cc_binary(
@@ -239,4 +251,8 @@ cc_binary(
239251
"//:hwy",
240252
"//:hwy_test_util",
241253
],
254+
linkstatic = select({
255+
"@platforms//cpu:riscv64": True,
256+
"//conditions:default": False,
257+
}),
242258
)

hwy/highway_export.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@
1010
#define HWY_DLLEXPORT_H
1111

1212
#if !defined(HWY_SHARED_DEFINE)
13+
1314
#define HWY_DLLEXPORT
1415
#define HWY_CONTRIB_DLLEXPORT
1516
#define HWY_TEST_DLLEXPORT
17+
1618
#else // !HWY_SHARED_DEFINE
1719

1820
#ifndef HWY_DLLEXPORT

0 commit comments

Comments
 (0)