Skip to content

Commit 3a62757

Browse files
committed
Make GitHub Actions validate the dynamic linking mode
Enable the GitHub Actions to validate the compiler under the dynamic linking mode. However, if the target architecture is RISC-V, the workflow will skip validation because because this mode has not been implemented for it.
1 parent ed0ff90 commit 3a62757

File tree

1 file changed

+19
-7
lines changed

1 file changed

+19
-7
lines changed

.github/workflows/main.yml

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ jobs:
99
matrix:
1010
compiler: [gcc, clang]
1111
architecture: [arm, riscv]
12+
link_mode: [static]
13+
include:
14+
- compiler: gcc
15+
architecture: arm
16+
link_mode: dynamic
17+
- compiler: clang
18+
architecture: arm
19+
link_mode: dynamic
1220
steps:
1321
- name: Checkout code
1422
uses: actions/checkout@v4
@@ -18,25 +26,29 @@ jobs:
1826
sudo apt-get install -q -y graphviz jq
1927
sudo apt-get install -q -y qemu-user
2028
sudo apt-get install -q -y build-essential
29+
sudo apt-get install -q -y gcc-arm-linux-gnueabihf
2130
- name: Build artifacts
2231
env:
2332
CC: ${{ matrix.compiler }}
2433
run: |
25-
make distclean config ARCH=${{ matrix.architecture }}
34+
make ARCH=${{ matrix.architecture }} LINK_MODE=${{ matrix.link_mode }}
2635
- name: IR regression tests
2736
run: |
28-
make check-snapshot || exit 1
37+
make check-snapshot LINK_MODE=${{ matrix.link_mode }} || exit 1
2938
- name: Sanitizer-enabled stage 0 tests
3039
env:
3140
CC: ${{ matrix.compiler }}
3241
run: |
33-
make check-sanitizer || exit 1
42+
make check-sanitizer LINK_MODE=${{ matrix.link_mode }} || exit 1
3443
- name: Unit tests
3544
run: |
36-
make check || exit 1
45+
make check LINK_MODE=${{ matrix.link_mode }} || exit 1
3746
3847
host-arm:
3948
runs-on: ubuntu-24.04
49+
strategy:
50+
matrix:
51+
link_mode: [static, dynamic]
4052
steps:
4153
- name: Checkout code
4254
uses: actions/checkout@v4
@@ -52,9 +64,9 @@ jobs:
5264
apt-get update -qq -y
5365
apt-get install -yqq build-essential
5466
run: |
55-
make config ARCH=arm
56-
make check-sanitizer || exit 1
57-
make check || exit 1
67+
make ARCH=arm LINK_MODE=${{ matrix.link_mode }}
68+
make check-sanitizer LINK_MODE=${{ matrix.link_mode }} || exit 1
69+
make check LINK_MODE=${{ matrix.link_mode }} || exit 1
5870
5971
coding-style:
6072
runs-on: ubuntu-24.04

0 commit comments

Comments
 (0)