Skip to content
This repository was archived by the owner on Nov 5, 2024. It is now read-only.

Commit 6933e8e

Browse files
authored
fix ci (#8)
1 parent 9671320 commit 6933e8e

File tree

8 files changed

+66
-64
lines changed

8 files changed

+66
-64
lines changed

.github/workflows/test.yml

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
ld: ld
3939
ar: ar
4040
run: |
41-
$CC --version
41+
$CXX --version
4242
make tests/run
4343
4444
- name: test on windows (msvc)
@@ -49,16 +49,6 @@ jobs:
4949
run: |
5050
make tests/run
5151
52-
- name: test on windows (mingw)
53-
os: windows-latest
54-
target: x86_64-pc-windows-gnu
55-
cxx: g++
56-
ld: ld
57-
ar: ar
58-
run: |
59-
gcc --version
60-
make tests/run
61-
6252
- name: valgrind
6353
os: ubuntu-latest
6454
target: x86_64-unknown-linux-gnu
@@ -77,7 +67,7 @@ jobs:
7767
cxx: clang++-12
7868
ld: ld.lld-12
7969
ar: llvm-ar-12
80-
run: ASAN_OPTIONS=detect_leaks=1 CXXFLAGS="-fsanitize=address" make tests/run
70+
run: ASAN_OPTIONS=detect_leaks=1:alloc_dealloc_mismatch=0 CXXFLAGS="-fsanitize=address" make tests/run
8171

8272
steps:
8373
- name: setup msvc on windows
@@ -103,7 +93,7 @@ jobs:
10393
RUSTFLAGS: ""
10494
run: |
10595
make do-codegen
106-
make token_ids.h
96+
make token_ids.hpp
10797
10898
- name: run tests
10999
run: ${{ matrix.build.run }}

header/build.mk

Lines changed: 0 additions & 6 deletions
This file was deleted.

header/build.sh

Lines changed: 0 additions & 42 deletions
This file was deleted.

scripts/setup_target.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ $(info O = $(O))
1010
$(info A = $(A))
1111
$(info STATIC_LIB_FILE = $(STATIC_LIB_FILE))
1212
$(info LIST_DEPS = $(LIST_DEPS))
13-
$(info CFLAGS = $(CFLAGS))
13+
$(info CXXFLAGS = $(CXXFLAGS))
1414

1515
$(info add_to_lib = $(call add_to_lib,lib.$(A),object.$(O)))
16-
$(info build_cxx_obj = $(call build_cxx_obj,file.c,file.$(O)))
16+
$(info build_cxx_obj = $(call build_cxx_obj,file.cpp,file.$(O)))
1717
$(info build_cxx_exe = $(call build_cxx_exe,file.$(O),out))
1818

1919
$(info )

scripts/targets/x86_64-apple-darwin.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ A = a
66
STATIC_LIB_FILE = libruby_parser_cpp.$(A)
77
LIST_DEPS = otool -L
88

9-
CXXFLAGS += -Wall -Wextra -Wpedantic -Weverything -g
9+
CXXFLAGS += -std=c++17 -Wall -Wextra -Wpedantic -Weverything -g
1010
# but disable -Wpadded, we inherit Rust layouts
1111
CXXFLAGS += -Wno-padded
1212
# ignore C++98 compatibility
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
$(info Compiling x86_64-pc-windows-msvc target)
2+
3+
O = obj
4+
A = lib
5+
6+
STATIC_LIB_FILE = ruby_parser_cpp.$(A)
7+
LIST_DEPS = dumpbin /dependents
8+
9+
# /nologo
10+
CXXFLAGS += /std:c++17 /bigobj /MT /Zi
11+
12+
ifeq ($(BUILD_ENV), debug)
13+
CXXFLAGS += /Od /DEBUG /DTEST_ENV
14+
else
15+
CXXFLAGS += /O2
16+
endif
17+
18+
define add_to_lib
19+
lib.exe $(1) $(2) /OUT:$(1)
20+
endef
21+
22+
define build_cxx_obj
23+
$(CXX) $(1) $(CXXFLAGS) /c /Fo
24+
endef
25+
26+
define build_cxx_exe
27+
$(CXX) ws2_32.lib advapi32.lib userenv.lib $(1) $(CXXFLAGS) /link /OUT:$(2)
28+
endef
29+
30+
BENCHMARK_RUNNER_ASSET_NAME = rust-parser-x86_64-pc-windows-msvc.exe
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
$(info Compiling x86_64-unknown-linux-gnu target)
2+
3+
O = o
4+
A = a
5+
6+
STATIC_LIB_FILE = libruby_parser_cpp.$(A)
7+
LIST_DEPS = ldd
8+
9+
CXXFLAGS += -std=c++17 -Wall -Wextra -g -target $(TARGET)
10+
11+
ifeq ($(BUILD_ENV), debug)
12+
CXXFLAGS += -O0 -DTEST_ENV
13+
else
14+
CXXFLAGS += -O3
15+
endif
16+
17+
define add_to_lib
18+
$(AR) r $(1) $(2)
19+
endef
20+
21+
define build_cxx_obj
22+
$(CXX) $(1) $(CXXFLAGS) -c -o $(2)
23+
endef
24+
25+
define build_cxx_exe
26+
$(CXX) $(1) $(CXXFLAGS) -lpthread -ldl -lm -o $(2)
27+
endef
28+
29+
BENCHMARK_RUNNER_ASSET_NAME = rust-parser-x86_64-unknown-linux-gnu

utils.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
#include <cassert>
55
#include <cstring>
6+
#include <cstdint>
67
#include <utility>
78

89
#define BLOB(T) \

0 commit comments

Comments
 (0)