-
Notifications
You must be signed in to change notification settings - Fork 156
194 lines (190 loc) · 6.48 KB
/
run-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
name: tests
on:
push:
pull_request:
workflow_dispatch:
inputs:
tests_on_ubuntu:
description: 'Tests on Ubuntu (true or false)'
required: true
default: true
tests_on_qemu:
description: 'Tests on Qemu (true or false)'
required: true
default: true
tests_on_macos:
description: 'Tests on macOS (true or false)'
required: true
default: true
tests_on_windows:
description: 'Tests on Windows (true or false)'
required: true
default: true
jobs:
tests_on_ubuntu:
name: Tests on Ubuntu (x86_64 and i686)
if: github.event.inputs.tests_on_ubuntu == 'true' || github.event.inputs.tests_on_ubuntu == ''
runs-on: ubuntu-latest
defaults:
run:
working-directory: test
steps:
- uses: actions/checkout@v4
- name: Install packages
run: |
sudo apt update
sudo apt install -y gcc-multilib libc6-dbg valgrind
sudo dpkg --add-architecture i386
sudo apt update
sudo apt install -y libc6-dbg:i386 libgcc-s1:i386
- name: x86_64 without optimization
run: |
make relro_pie_tests
- name: i686 without optimization
run: |
make relro_pie_m32_tests
- name: x86_64 on valgrind without optimization
run: |
make relro_pie_tests_on_valgrind
- name: uclibc x86_64 without optimization
run: |
./uclibc-test.sh x86_64
- name: uclibc i686 without optimization
run: |
./uclibc-test.sh i686
- name: set OPT_CLFAGS
run: |
echo OPT_CFLAGS=-O3 >> $GITHUB_ENV
- name: x86_64 with optimization
run: |
make relro_pie_tests
- name: i686 with optimization
run: |
make relro_pie_m32_tests
- name: x86_64 on valgrind with optimization
run: |
make relro_pie_tests_on_valgrind
- name: uclib x86_64 with optimization
run: |
./uclibc-test.sh x86_64
- name: uclibc i686 with optimization
run: |
./uclibc-test.sh i686
tests_on_qemu:
name: Tests on Qemu (arm, armhf, arm64, ppc, ppc64le and riscv64)
if: github.event.inputs.tests_on_qemu == 'true' || github.event.inputs.tests_on_qemu == ''
runs-on: ubuntu-latest
defaults:
run:
working-directory: test
steps:
- uses: actions/checkout@v4
- name: Install packages
run: |
sudo apt update
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
- name: arm-linux-gnueabi without optimization
run: |
make relro_pie_tests TARGET_PLATFORM=arm-linux-gnueabi
- name: arm-linux-gnueabihf without optimization
run: |
make relro_pie_tests TARGET_PLATFORM=arm-linux-gnueabihf
- name: aarch64-linux-gnu without optimization
run: |
make relro_pie_tests TARGET_PLATFORM=aarch64-linux-gnu
- name: powerpc-linux-gnu without optimization
run: |
make relro_pie_tests TARGET_PLATFORM=powerpc-linux-gnu QEMU_ARCH=ppc
- name: powerpc64le-linux-gnu without optimization
run: |
make relro_pie_tests TARGET_PLATFORM=powerpc64le-linux-gnu QEMU_ARCH=ppc64le
- name: riscv64-linux-gnu without optimization
run: |
make relro_pie_tests TARGET_PLATFORM=riscv64-linux-gnu QEMU_ARCH=riscv64
- name: set OPT_CLFAGS
run: |
echo OPT_CFLAGS=-O3 >> $GITHUB_ENV
- name: arm-linux-gnueabi with optimization
run: |
make relro_pie_tests TARGET_PLATFORM=arm-linux-gnueabi
- name: arm-linux-gnueabihf with optimization
run: |
make relro_pie_tests TARGET_PLATFORM=arm-linux-gnueabihf
- name: aarch64-linux-gnu with optimization
run: |
make relro_pie_tests TARGET_PLATFORM=aarch64-linux-gnu
- name: powerpc-linux-gnu with optimization
run: |
make relro_pie_tests TARGET_PLATFORM=powerpc-linux-gnu QEMU_ARCH=ppc
- name: powerpc64le-linux-gnu with optimization
run: |
make relro_pie_tests TARGET_PLATFORM=powerpc64le-linux-gnu QEMU_ARCH=ppc64le
- name: riscv64-linux-gnu with optimization
run: |
make relro_pie_tests TARGET_PLATFORM=riscv64-linux-gnu QEMU_ARCH=riscv64
tests_on_macos:
name: Tests on macOS
if: github.event.inputs.tests_on_macos == 'true' || github.event.inputs.tests_on_macos == ''
strategy:
matrix:
os: [macos-12, macos-13, macos-14]
runs-on: ${{ matrix.os }}
defaults:
run:
working-directory: test
steps:
- uses: actions/checkout@v4
- name: make
run: |
make clean libtest.so testprog
- name: otool -l testprog
run: |
otool -l testprog
- name: otool -l libtest.so
run: |
otool -l libtest.so
- name: dyldinfo
run: |
xcrun dyldinfo 2>&1 | tee dyldinfo-help.txt
for arg in $(awk '/^\t-/ {print $1}' dyldinfo-help.txt); do echo "======== $arg ========"; xcrun dyldinfo $arg libtest.so; done
- name: dyld_info
run: |
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
- name: tests without optimization
run: |
make run_tests
- name: set OPT_CLFAGS
run: |
echo OPT_CFLAGS=-O3 >> $GITHUB_ENV
- name: tests with optimization
run: |
make run_tests
tests_on_windows:
name: Tests on Windows (x64 and x86)
if: github.event.inputs.tests_on_windows == 'true' || github.event.inputs.tests_on_windows == ''
runs-on: windows-latest
defaults:
run:
shell: cmd
working-directory: test
steps:
- uses: actions/checkout@v4
- uses: ilammy/msvc-dev-cmd@v1
- name: x64 without optimization
run: |
run-test.bat amd64 "-LD -MD" "-MD"
- name: x86 without optimization
run: |
run-test.bat x86 "-LD -MD" "-MD"
- name: x64 with optimization
run: |
run-test.bat amd64 "-LD -MD -O2" "-MD -O2"
- name: x86 with optimization
run: |
run-test.bat x86 "-LD -MD -O2" "-MD -O2"
- name: x64 with debug
run: |
run-test.bat amd64 "-LDd -MDd" "-MDd"
- name: x86 with debug
run: |
run-test.bat x86 "-LDd -MDd" "-MDd"