Skip to content

Commit cbef5ab

Browse files
authored
Build release statically on macos (#5)
1 parent 04fdbf3 commit cbef5ab

File tree

3 files changed

+23
-22
lines changed

3 files changed

+23
-22
lines changed

.github/workflows/release-macos.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ jobs:
1515
uses: Homebrew/actions/setup-homebrew@master
1616
- name: Install dependencies
1717
run: |
18-
brew install meson ninja gcc@13
18+
brew install meson ninja
1919
- name: Build
2020
run: |
21-
LDFLAGS='-static' CXX=g++-13 meson setup build --debug --warnlevel 3 --werror -Dcpp_debugstl=true
21+
LDFLAGS='-static' meson setup build --debug --warnlevel 3 --werror -Dcpp_debugstl=true
2222
ninja -C build
2323
- name: Test
2424
run: |

.github/workflows/test-macos.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
uses: Homebrew/actions/setup-homebrew@master
1717
- name: Install dependencies
1818
run: |
19-
brew install meson ninja gcc@13
19+
brew install meson ninja
2020
- name: Build
2121
run: |
22-
CXX=g++-13 meson setup build --debug --warnlevel 3 --werror -Dcpp_debugstl=true
22+
meson setup build --debug --warnlevel 3 --werror -Dcpp_debugstl=true
2323
ninja -C build
2424
- name: Test
2525
run: |

tests.hh

+19-18
Original file line numberDiff line numberDiff line change
@@ -67,47 +67,48 @@ struct test_translation_case
6767

6868
constexpr auto test_cases = std::array{
6969
// Identical
70-
test_case{success{}, ""sv, ""sv},
71-
test_case{success{}, "ABC"sv, "ABC"sv},
72-
test_case{success{}, "ABC\nDEF\n"sv, "ABC\nDEF\n"sv},
70+
test_case{{success{}}, ""sv, ""sv},
71+
test_case{{success{}}, "ABC"sv, "ABC"sv},
72+
test_case{{success{}}, "ABC\nDEF\n"sv, "ABC\nDEF\n"sv},
7373

7474
// Equivalent whitespace
75-
test_case{success{}, "A B C D E"sv, "A B\tC\0D\rE"sv},
75+
test_case{{success{}}, "A B C D E"sv, "A B\tC\0D\rE"sv},
7676

7777
// Excessive whitespace
78-
test_case{success{}, "A B"sv, "A B \t\0\r"sv},
79-
test_case{success{}, "A\0B"sv, "\0\t A \r \0B\t\t\t"sv},
78+
test_case{{success{}}, "A B"sv, "A B \t\0\r"sv},
79+
test_case{{success{}}, "A\0B"sv, "\0\t A \r \0B\t\t\t"sv},
8080

8181
// Trailing newlines
82-
test_case{success{}, "A\nB\nC"sv, "A\nB\nC\n\n\n\n\n\n\n\n\n\n"sv},
83-
test_case{success{}, "A\n\n\n"sv, "A\n\n\n\n\n"sv},
82+
test_case{{success{}}, "A\nB\nC"sv, "A\nB\nC\n\n\n\n\n\n\n\n\n\n"sv},
83+
test_case{{success{}}, "A\n\n\n"sv, "A\n\n\n\n\n"sv},
8484

8585
// Simply wrong
86-
test_case{failure{1, {token_type::eof, 0, 0}, {token_type::word, 0, 8}},
86+
test_case{{failure{1, {token_type::eof, 0, 0}, {token_type::word, 0, 8}}},
8787
""sv, "NONEMPTY"sv},
88-
test_case{failure{1, {token_type::word, 0, 3}, {token_type::word, 0, 2}},
88+
test_case{{failure{1, {token_type::word, 0, 3}, {token_type::word, 0, 2}}},
8989
"YES"sv, "NO"sv},
90-
test_case{failure{1, {token_type::word, 0, 3}, {token_type::word, 0, 3}},
90+
test_case{{failure{1, {token_type::word, 0, 3}, {token_type::word, 0, 3}}},
9191
"TAK"sv, "NIE"sv},
92-
test_case{failure{1, {token_type::word, 0, 1}, {token_type::word, 0, 1}},
92+
test_case{{failure{1, {token_type::word, 0, 1}, {token_type::word, 0, 1}}},
9393
"0"sv, "1"sv},
94-
test_case{failure{1, {token_type::word, 0, 4}, {token_type::word, 0, 2}},
94+
test_case{{failure{1, {token_type::word, 0, 4}, {token_type::word, 0, 2}}},
9595
"NONE"sv, "-1"sv},
96-
test_case{failure{1, {token_type::word, 0, 3}, {token_type::word, 0, 3}},
96+
test_case{{failure{1, {token_type::word, 0, 3}, {token_type::word, 0, 3}}},
9797
"123"sv, "456"sv},
98-
test_case{failure{1, {token_type::word, 0, 1}, {token_type::word, 0, 32}},
98+
test_case{
99+
{failure{1, {token_type::word, 0, 1}, {token_type::word, 0, 32}}},
99100
"1"sv, "1.000000000000000000000000000001"sv},
100-
test_case{failure{1, {token_type::word, 4, 5}, {token_type::word, 4, 5}},
101+
test_case{{failure{1, {token_type::word, 4, 5}, {token_type::word, 4, 5}}},
101102
"1 2 3 4"sv, "1 2 4 3"sv},
102103

103104
// Different arrangement of lines
104105
test_case{
105-
failure{1, {token_type::word, 2, 3}, {token_type::newline, 1, 2}},
106+
{failure{1, {token_type::word, 2, 3}, {token_type::newline, 1, 2}}},
106107
"A B"sv, "A\nB"sv},
107108

108109
// Bug of original compare which would consider these equal
109110
test_case{
110-
failure{1, {token_type::word, 0, 101}, {token_type::word, 0, 100}},
111+
{failure{1, {token_type::word, 0, 101}, {token_type::word, 0, 100}}},
111112
REP100 ("A"sv) "B"sv, REP100 ("A"sv) " B"sv},
112113
};
113114

0 commit comments

Comments
 (0)