X Tutup
Skip to content

Commit aa22e69

Browse files
committed
ci: Build test with different linkers
1 parent 3abdd4b commit aa22e69

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

.github/workflows/build_test.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ PACKAGES=(
6262
)
6363
COMPILER="${COMPILER:?}"
6464
COMPILER_VERSION="${COMPILER_VERSION:?}"
65+
LINKER="${LINKER:?}"
6566
RELEASE="$(lsb_release -cs)"
6667

6768
bash -c "echo 'deb-src http://archive.ubuntu.com/ubuntu/ $RELEASE main restricted universe multiverse' >>/etc/apt/sources.list"
@@ -117,7 +118,12 @@ for args in "${ARGS[@]}"; do
117118

118119
info "Checking build with $args"
119120
# shellcheck disable=SC2086
120-
if ! AR="$AR" CC="$CC" CXX="$CXX" CFLAGS="-Werror" CXXFLAGS="-Werror" meson -Dtests=unsafe -Dslow-tests=true -Dfuzz-tests=true --werror $args build; then
121+
if ! AR="$AR" \
122+
CC="$CC" CC_LD="$LINKER" CFLAGS="-Werror" \
123+
CXX="$CXX" CXX_LD="$LINKER" CXXFLAGS="-Werror" \
124+
meson -Dtests=unsafe -Dslow-tests=true -Dfuzz-tests=true --werror \
125+
$args build; then
126+
121127
fatal "meson failed with $args"
122128
fi
123129

.github/workflows/build_test.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,20 @@ jobs:
1919
build:
2020
runs-on: ubuntu-20.04
2121
concurrency:
22-
group: ${{ github.workflow }}-${{ matrix.env.COMPILER }}-${{ matrix.env.COMPILER_VERSION }}-${{ github.ref }}
22+
group: ${{ github.workflow }}-${{ matrix.env.COMPILER }}-${{ matrix.env.COMPILER_VERSION }}-${{ matrix.env.LINKER }}-${{ github.ref }}
2323
cancel-in-progress: true
2424
strategy:
2525
fail-fast: false
2626
matrix:
2727
env:
28-
- { COMPILER: "gcc", COMPILER_VERSION: "10" }
29-
- { COMPILER: "gcc", COMPILER_VERSION: "11" }
30-
- { COMPILER: "clang", COMPILER_VERSION: "11" }
31-
- { COMPILER: "clang", COMPILER_VERSION: "12" }
32-
- { COMPILER: "clang", COMPILER_VERSION: "13" }
28+
- { COMPILER: "gcc", COMPILER_VERSION: "10", LINKER: "bfd" }
29+
- { COMPILER: "gcc", COMPILER_VERSION: "11", LINKER: "gold" }
30+
- { COMPILER: "clang", COMPILER_VERSION: "11", LINKER: "bfd" }
31+
- { COMPILER: "clang", COMPILER_VERSION: "12", LINKER: "gold" }
32+
- { COMPILER: "clang", COMPILER_VERSION: "13", LINKER: "lld" }
3333
env: ${{ matrix.env }}
3434
steps:
3535
- name: Repository checkout
3636
uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
37-
- name: Build check (${{ env.COMPILER }}-${{ env.COMPILER_VERSION }})
37+
- name: Build check (${{ env.COMPILER }}-${{ env.COMPILER_VERSION }}-${{ env.LINKER }})
3838
run: sudo -E .github/workflows/build_test.sh

0 commit comments

Comments
 (0)
X Tutup