Skip to content

Commit 43eb231

Browse files
authored
Merge pull request espeak-ng#1150 from sthibaul/CI-32bits
Add x86-32 CI
2 parents a34d74e + 36feb2d commit 43eb231

File tree

1 file changed

+53
-12
lines changed

1 file changed

+53
-12
lines changed

.github/workflows/ci.yml

Lines changed: 53 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@ jobs:
1111

1212
runs-on: ubuntu-latest
1313

14-
name: Build with ${{ matrix.sanitizer }} sanitizer
14+
name: Build with ${{ matrix.sanitizer }} sanitizer on ${{ matrix.arch }}
1515
strategy:
1616
fail-fast: false
1717
matrix:
18+
arch: [x86-32, x86-64]
1819
sanitizer: [no, address, leak, memory, thread, undefined, valgrind]
1920

2021
include:
@@ -27,35 +28,36 @@ jobs:
2728

2829
- sanitizer: "address"
2930
deps: ""
30-
configflags: 'CFLAGS="-fsanitize=address -g -Og" CXXFLAGS="-fsanitize=address -g -Og"'
31+
configflags: "-fsanitize=address -g -Og"
3132
config: ""
3233
build_env: "ASAN_OPTIONS=detect_leaks=0"
3334
check_env: "ASAN_OPTIONS=detect_leaks=0"
3435

3536
- sanitizer: "leak"
3637
deps: ""
37-
configflags: 'CFLAGS="-fsanitize=leak -g -Og" CXXFLAGS="-fsanitize=leak -g -Og"'
38+
configflags: '-fsanitize=leak -g -Og'
3839
config: ""
3940
build_env: "LSAN_OPTIONS=fast_unwind_on_malloc=0"
4041
check_env: "LSAN_OPTIONS=fast_unwind_on_malloc=0"
4142

4243
- sanitizer: "memory"
4344
deps: "clang"
44-
configflags: 'CC=clang CXX=clang++ CFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -g -Og" CXXFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -g -Og"'
45+
configenv: "CC=clang CXX=clang++"
46+
configflags: "-fsanitize=memory -fsanitize-memory-track-origins=2 -g -Og"
4547
config: "--without-pcaudiolib"
4648
build_env: "MSAN_OPTIONS=exitcode=42"
4749
check_env: "MSAN_OPTIONS=exitcode=42"
4850

4951
- sanitizer: "thread"
5052
deps: ""
51-
configflags: 'CFLAGS="-fsanitize=thread -g -Og" CXXFLAGS="-fsanitize=thread -g -Og"'
53+
configflags: "-fsanitize=thread -g -Og"
5254
config: ""
5355
build_env: ""
5456
check_env: ""
5557

5658
- sanitizer: "undefined"
5759
deps: ""
58-
configflags: 'CFLAGS="-fsanitize=undefined -g -Og" CXXFLAGS="-fsanitize=undefined -g -Og"'
60+
configflags: "-fsanitize=undefined -g -Og"
5961
config: ""
6062
build_env: "UBSAN_OPTIONS=halt_on_error=1"
6163
check_env: "UBSAN_OPTIONS=halt_on_error=1"
@@ -67,19 +69,42 @@ jobs:
6769
build_env: 'VALGRIND="libtool --mode=execute valgrind --track-origins=yes --leak-check=full --error-exitcode=1" '
6870
check_env: 'VALGRIND="libtool --mode=execute valgrind --track-origins=yes --leak-check=full --error-exitcode=1" '
6971

72+
- arch: x86-32
73+
archdeps: "gcc-multilib g++-multilib libpcaudio-dev:i386 libsonic-dev:i386 libc6-dbg:i386"
74+
archconfigflags: "-m32"
75+
76+
- arch: x86-64
77+
archdeps: ""
78+
archconfigflags: ''
79+
80+
exclude:
81+
# These are not supported on 32bit
82+
- arch: x86-32
83+
sanitizer: leak
84+
- arch: x86-32
85+
sanitizer: memory
86+
- arch: x86-32
87+
sanitizer: thread
88+
7089
steps:
7190
- uses: actions/checkout@v2
91+
- name: enable 32bit architecture
92+
run: sudo dpkg --add-architecture i386
93+
if: matrix.arch == 'x86-32'
7294
- name: dependencies
73-
run: sudo apt-get update && sudo apt-get install libpcaudio-dev libsonic-dev ronn kramdown ${{ matrix.deps }}
95+
run: sudo apt-get update && sudo apt-get install libpcaudio-dev libsonic-dev ronn kramdown ${{ matrix.deps }} ${{ matrix.archdeps }}
7496
- name: autoconf
7597
run: ./autogen.sh ; chmod -x INSTALL m4/*.m4
7698
- name: configure
77-
run: ${{ matrix.configflags }} ./configure ${{ matrix.config }}
99+
run: ${{ matrix.configenv }}
100+
CFLAGS="${{ matrix.configflags }} ${{ matrix.archconfigflags }}"
101+
CXXFLAGS="${{ matrix.configflags }} ${{ matrix.archconfigflags }}"
102+
./configure ${{ matrix.config }}
78103
- name: Store the config
79104
if: ${{ failure() }}
80105
uses: actions/upload-artifact@v2
81106
with:
82-
name: config-${{ matrix.sanitizer }}.log
107+
name: config-${{ matrix.arch }}-${{ matrix.sanitizer }}.log
83108
path: config.log
84109
- name: make
85110
run: ${{ matrix.build_env }} make
@@ -89,13 +114,29 @@ jobs:
89114
reprotest:
90115

91116
runs-on: ubuntu-latest
92-
name: Build with reprotest
117+
name: Build with reprotest on ${{ matrix.arch }}
118+
strategy:
119+
fail-fast: false
120+
matrix:
121+
arch: [x86-32, x86-64]
122+
123+
include:
124+
- arch: x86-32
125+
archdeps: "gcc-multilib g++-multilib libpcaudio-dev:i386 libsonic-dev:i386 libc6-dbg:i386"
126+
archconfigflags: "-m32"
127+
128+
- arch: x86-64
129+
archdeps: ""
130+
archconfigflags: ''
93131

94132
steps:
95133
- uses: actions/checkout@v2
134+
- name: enable 32bit architecture
135+
run: sudo dpkg --add-architecture i386
136+
if: matrix.arch == 'x86-32'
96137
- name: dependencies
97-
run: sudo apt-get update && sudo apt-get install libpcaudio-dev libsonic-dev ronn kramdown reprotest
138+
run: sudo apt-get update && sudo apt-get install libpcaudio-dev libsonic-dev ronn kramdown reprotest ${{ matrix.archdeps }}
98139
- name: autoconf
99140
run: ./autogen.sh ; chmod -x INSTALL m4/*.m4
100141
- name: run
101-
run: reprotest "./configure && make clean && make && make check && touch success" success
142+
run: reprotest 'CFLAGS="${{ matrix.archconfigflags }}" CXXFLAGS="${{ matrix.archconfigflags }}" ./configure && make clean && make && make check && touch success' success

0 commit comments

Comments
 (0)