2626 tests_on_ubuntu :
2727 name : Tests on Ubuntu (x86_64 and i686)
2828 if : github.event.inputs.tests_on_ubuntu == 'true' || github.event.inputs.tests_on_ubuntu == ''
29+ strategy :
30+ fail-fast : false
31+ matrix :
32+ optimization : ["", "-O3"]
33+ sanitize : ["", "-g -fsanitize=address -fsanitize=undefined"]
2934 runs-on : ubuntu-latest
3035 defaults :
3136 run :
@@ -39,43 +44,37 @@ jobs:
3944 sudo dpkg --add-architecture i386
4045 sudo apt update
4146 sudo apt install -y libc6-dbg:i386 libgcc-s1:i386
42- - name : x86_64 without optimization
43- run : |
44- make relro_pie_tests
45- - name : i686 without optimization
46- run : |
47- make relro_pie_m32_tests
48- - name : x86_64 on valgrind without optimization
49- run : |
50- make relro_pie_tests_on_valgrind
51- - name : uclibc x86_64 without optimization
52- run : |
53- ./uclibc-test.sh x86_64
54- - name : uclibc i686 without optimization
55- run : |
56- ./uclibc-test.sh i686
5747 - name : set OPT_CLFAGS
5848 run : |
59- echo OPT_CFLAGS=-O3 >> $GITHUB_ENV
60- - name : x86_64 with optimization
49+ echo OPT_CFLAGS="${{ matrix.optimization }} ${{ matrix.sanitize }}" >> $GITHUB_ENV
50+ - name : x86_64
6151 run : |
6252 make relro_pie_tests
63- - name : i686 with optimization
53+ - name : i686
6454 run : |
6555 make relro_pie_m32_tests
66- - name : x86_64 on valgrind with optimization
56+ - name : x86_64 on valgrind
57+ if : ${{ matrix.sanitize == '' }} # Run without sanitizers only
6758 run : |
6859 make relro_pie_tests_on_valgrind
69- - name : uclib x86_64 with optimization
60+ - name : uclibc x86_64
61+ if : ${{ matrix.sanitize == '' }} # Run without sanitizers only
7062 run : |
7163 ./uclibc-test.sh x86_64
72- - name : uclibc i686 with optimization
64+ - name : uclibc i686
65+ if : ${{ matrix.sanitize == '' }} # Run without sanitizers only
7366 run : |
7467 ./uclibc-test.sh i686
7568
7669 tests_on_qemu :
7770 name : Tests on Qemu (arm, armhf, arm64, ppc, ppc64le and riscv64)
7871 if : github.event.inputs.tests_on_qemu == 'true' || github.event.inputs.tests_on_qemu == ''
72+ strategy :
73+ fail-fast : false
74+ matrix :
75+ optimization : ["", "-O2", "-O3"]
76+ # TODO: Sanitizer fails in armhf and aarch64
77+ # sanitize: ["", "-g -fsanitize=address -fsanitize=undefined"]
7978 runs-on : ubuntu-latest
8079 defaults :
8180 run :
@@ -86,53 +85,46 @@ jobs:
8685 run : |
8786 sudo apt update
8887 sudo apt install -y qemu-user gcc-arm-linux-gnueabi gcc-arm-linux-gnueabihf gcc-aarch64-linux-gnu gcc-powerpc-linux-gnu gcc-powerpc64le-linux-gnu gcc-riscv64-linux-gnu libc6-dev-armhf-cross libc6-dev-ppc64el-cross libc6-dev-powerpc-cross libc6-dev-armel-cross libc6-dev-arm64-cross
89- - name : arm-linux-gnueabi without optimization
88+ - name : Set OPT_CLFAGS
89+ run : |
90+ echo OPT_CFLAGS="${{ matrix.optimization }}" >> $GITHUB_ENV
91+ # TODO: Sanitizer fails in armhf and aarch64
92+ # echo OPT_CFLAGS="${{ matrix.optimization }} ${{ matrix.sanitize }}" >> $GITHUB_ENV
93+ - name : arm-linux-gnueabi
94+ env :
95+ OPT_CFLAGS : " -latomic"
9096 run : |
9197 make relro_pie_tests TARGET_PLATFORM=arm-linux-gnueabi
92- - name : arm-linux-gnueabihf without optimization
98+ - name : arm-linux-gnueabihf
99+ env :
100+ # TODO: detect_leaks=0 because it fails to create the ptrace thread
101+ LSAN_OPTIONS : " verbosity=1:log_threads=1:detect_leaks=0"
93102 run : |
94103 make relro_pie_tests TARGET_PLATFORM=arm-linux-gnueabihf
95- - name : aarch64-linux-gnu without optimization
104+ - name : aarch64-linux-gnu
105+ # TODO: aarch64 fails with optimizations https://github.com/kubo/plthook/issues/51
106+ if : ${{ matrix.optimization == '' }}
96107 run : |
97108 make relro_pie_tests TARGET_PLATFORM=aarch64-linux-gnu
98- - name : powerpc-linux-gnu without optimization
99- run : |
100- make relro_pie_tests TARGET_PLATFORM=powerpc-linux-gnu QEMU_ARCH=ppc
101- - name : powerpc64le-linux-gnu without optimization
102- run : |
103- make relro_pie_tests TARGET_PLATFORM=powerpc64le-linux-gnu QEMU_ARCH=ppc64le
104- - name : riscv64-linux-gnu without optimization
105- run : |
106- make relro_pie_tests TARGET_PLATFORM=riscv64-linux-gnu QEMU_ARCH=riscv64
107- - name : set OPT_CLFAGS
108- run : |
109- echo OPT_CFLAGS=-O3 >> $GITHUB_ENV
110- - name : arm-linux-gnueabi with optimization
111- run : |
112- make relro_pie_tests TARGET_PLATFORM=arm-linux-gnueabi
113- - name : arm-linux-gnueabihf with optimization
114- run : |
115- make relro_pie_tests TARGET_PLATFORM=arm-linux-gnueabihf
116- # TODO: https://github.com/kubo/plthook/issues/51
117- # - name: aarch64-linux-gnu with optimization
118- # run: |
119- # make relro_pie_tests TARGET_PLATFORM=aarch64-linux-gnu
120- - name : powerpc-linux-gnu with optimization
109+ - name : powerpc-linux-gnu
121110 run : |
122111 make relro_pie_tests TARGET_PLATFORM=powerpc-linux-gnu QEMU_ARCH=ppc
123- - name : powerpc64le-linux-gnu with optimization
112+ - name : powerpc64le-linux-gnu
124113 run : |
125114 make relro_pie_tests TARGET_PLATFORM=powerpc64le-linux-gnu QEMU_ARCH=ppc64le
126- - name : riscv64-linux-gnu with optimization
115+ - name : riscv64-linux-gnu
127116 run : |
128117 make relro_pie_tests TARGET_PLATFORM=riscv64-linux-gnu QEMU_ARCH=riscv64
129118
130119 tests_on_macos :
131120 name : Tests on macOS
132121 if : github.event.inputs.tests_on_macos == 'true' || github.event.inputs.tests_on_macos == ''
133122 strategy :
123+ fail-fast : false
134124 matrix :
135125 os : [macos-13, macos-14, macos-15]
126+ optimization : ["", "-O3"]
127+ sanitize : ["", "-g -fsanitize=address -fsanitize=undefined"]
136128 runs-on : ${{ matrix.os }}
137129 defaults :
138130 run :
@@ -155,42 +147,35 @@ jobs:
155147 - name : dyld_info
156148 run : |
157149 for arg in -segments -dependents -inits -exports -imports -objc -fixups -fixup_chains -fixup_chain_details -symbolic_fixups; do echo "======== $arg ========"; xcrun dyld_info $arg libtest.so; done; true
158- - name : tests without optimization
159- run : |
160- make run_tests
161150 - name : set OPT_CLFAGS
162151 run : |
163- echo OPT_CFLAGS=-O3 >> $GITHUB_ENV
164- - name : tests with optimization
152+ echo OPT_CFLAGS="${{ matrix.optimization }} ${{ matrix.sanitize }}" >> $GITHUB_ENV
153+ - name : Tests
165154 run : |
166155 make run_tests
167156
168157 tests_on_windows :
169158 name : Tests on Windows (x64 and x86)
170159 if : github.event.inputs.tests_on_windows == 'true' || github.event.inputs.tests_on_windows == ''
171- runs-on : windows-latest
160+ strategy :
161+ fail-fast : false
162+ matrix :
163+ os : [2019, 2022, 2025]
164+ architecture : [x86, amd64]
165+ options : [
166+ { dll: "/LD /MD", exe: "/MD" },
167+ { dll: "/LD /MD /O2", exe: "/MD /O2" },
168+ { dll: "/LDd /MDd", exe: "/MDd" },
169+ { dll: "/LDd /MDd /Z7 /fsanitize=address", exe: "/MDd /Z7 /fsanitize=address" }
170+ ]
171+ runs-on : windows-${{ matrix.os }}
172172 defaults :
173173 run :
174174 shell : cmd
175175 working-directory : test
176176 steps :
177177 - uses : actions/checkout@v4
178178 - uses : ilammy/msvc-dev-cmd@v1
179- - name : x64 without optimization
180- run : |
181- run-test.bat amd64 "-LD -MD" "-MD"
182- - name : x86 without optimization
183- run : |
184- run-test.bat x86 "-LD -MD" "-MD"
185- - name : x64 with optimization
186- run : |
187- run-test.bat amd64 "-LD -MD -O2" "-MD -O2"
188- - name : x86 with optimization
189- run : |
190- run-test.bat x86 "-LD -MD -O2" "-MD -O2"
191- - name : x64 with debug
192- run : |
193- run-test.bat amd64 "-LDd -MDd" "-MDd"
194- - name : x86 with debug
179+ - name : Test
195180 run : |
196- run-test.bat x86 "-LDd -MDd" "-MDd "
181+ run-test.bat ${{ matrix.os }} ${{ matrix.architecture }} "${{ matrix.options.dll }}" "${{ matrix.options.exe }} "
0 commit comments