Skip to content

Commit 8c8f4f5

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 9477bce commit 8c8f4f5

File tree

1 file changed

+20
-7
lines changed

1 file changed

+20
-7
lines changed

.github/workflows/main.yml

Lines changed: 20 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,30 @@ 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-gnueabi
2130
- name: Build artifacts
2231
env:
2332
CC: ${{ matrix.compiler }}
2433
run: |
25-
make distclean config ARCH=${{ matrix.architecture }}
34+
make distclean config ARCH=${{ matrix.architecture }} \
35+
LINK_MODE=${{ matrix.link_mode }}
2636
- name: IR regression tests
2737
run: |
28-
make check-snapshot || exit 1
38+
make check-snapshot LINK_MODE=${{ matrix.link_mode }} || exit 1
2939
- name: Sanitizer-enabled stage 0 tests
3040
env:
3141
CC: ${{ matrix.compiler }}
3242
run: |
33-
make check-sanitizer || exit 1
43+
make check-sanitizer LINK_MODE=${{ matrix.link_mode }} || exit 1
3444
- name: Unit tests
3545
run: |
36-
make check || exit 1
46+
make check LINK_MODE=${{ matrix.link_mode }} || exit 1
3747
3848
host-arm:
3949
runs-on: ubuntu-24.04
50+
strategy:
51+
matrix:
52+
link_mode: [static, dynamic]
4053
steps:
4154
- name: Checkout code
4255
uses: actions/checkout@v4
@@ -52,9 +65,9 @@ jobs:
5265
apt-get update -qq -y
5366
apt-get install -yqq build-essential
5467
run: |
55-
make config ARCH=arm
56-
make check-sanitizer || exit 1
57-
make check || exit 1
68+
make config ARCH=arm LINK_MODE=${{ matrix.link_mode }}
69+
make check-sanitizer LINK_MODE=${{ matrix.link_mode }} || exit 1
70+
make check LINK_MODE=${{ matrix.link_mode }} || exit 1
5871
5972
coding-style:
6073
runs-on: ubuntu-24.04

0 commit comments

Comments
 (0)