Skip to content

Commit

Permalink
.github/workflows: Use Meson build in standard CI targets
Browse files Browse the repository at this point in the history
Signed-off-by: Daiki Ueno <[email protected]>
  • Loading branch information
ueno committed Nov 7, 2023
1 parent 9fdf913 commit b6ffc75
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 16 deletions.
17 changes: 9 additions & 8 deletions .github/workflows/address-sanitizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@ jobs:
- name: Install Dependencies
run: |
if [ -f /etc/fedora-release ]; then
dnf -y install git clang gcc automake libtool pkgconf-pkg-config \
autoconf-archive openssl-devel openssl diffutils expect \
dnf -y install git clang gcc pkgconf-pkg-config meson \
openssl-devel openssl diffutils expect \
softhsm opensc p11-kit-devel p11-kit-server gnutls-utils \
nss-softokn nss-tools nss-softokn-devel \
dnf-command\(debuginfo-install\) libasan
dnf -y debuginfo-install openssl
elif [ -f /etc/debian_version ]; then
cat .github/sid.debug.list > /etc/apt/sources.list.d/debug.list
apt-get -q update
apt-get -yq install git gcc clang make automake \
libtool pkg-config autoconf-archive libssl-dev openssl expect \
apt-get -yq install git gcc clang meson \
pkg-config libssl-dev openssl expect \
procps libnss3 libnss3-tools libnss3-dev softhsm opensc p11-kit \
libp11-kit-dev p11-kit-modules gnutls-bin \
openssl-dbgsym libssl3-dbgsym
Expand All @@ -47,16 +47,17 @@ jobs:
# that is not compabitlbe with LD_PRELOAD so we force the absolute path.
run: |
if [ -f /etc/fedora-release ]; then
autoreconf -fiv
CC=gcc \
./configure --with-address-sanitizer=/usr/lib64/libasan.so.8.0.0
meson setup _build -Db_sanitize=address -Dpreload_libasan=/usr/lib64/libasan.so.8.0.0
elif [ -f /etc/debian_version ]; then
autoreconf -fiv
CC=gcc \
./configure --with-address-sanitizer
meson setup _build -Db_sanitize=address
fi
- name: Build and Test
run: make check
run: |
meson compile -C _build
meson test -C _build
- uses: actions/upload-artifact@v3
if: failure()
with:
Expand Down
17 changes: 9 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ jobs:
- name: Install Dependencies
run: |
if [ -f /etc/fedora-release ]; then
dnf -y install git ${{ matrix.compiler }} automake libtool \
pkgconf-pkg-config autoconf-archive openssl-devel openssl \
dnf -y install git ${{ matrix.compiler }} meson \
pkgconf-pkg-config openssl-devel openssl \
diffutils expect valgrind
if [ "${{ matrix.token }}" = "softokn" ]; then
dnf -y install nss-softokn nss-tools nss-softokn-devel
Expand All @@ -38,8 +38,8 @@ jobs:
fi
elif [ -f /etc/debian_version ]; then
apt-get -q update
apt-get -yq install git ${{ matrix.compiler }} make automake \
libtool pkg-config autoconf-archive libssl-dev openssl expect \
apt-get -yq install git ${{ matrix.compiler }} meson \
pkg-config libssl-dev openssl expect \
valgrind procps
if [ "${{ matrix.token }}" = "softokn" ]; then
apt-get -yq install libnss3 libnss3-tools libnss3-dev
Expand All @@ -52,10 +52,11 @@ jobs:
uses: actions/checkout@v3
- name: Setup
run: |
autoreconf -fiv
CC=${{ matrix.compiler }} ./configure
CC=${{ matrix.compiler }} meson setup _build
- name: Build and Test
run: make check
run: |
meson compile -C _build
meson test -C _build
- uses: actions/upload-artifact@v3
if: failure()
with:
Expand All @@ -69,7 +70,7 @@ jobs:
- name: Run tests with valgrind
run: |
if [ "${{ matrix.compiler }}" = "gcc" ]; then
make check-valgrind-memcheck
meson test -C _build --setup=valgrind
fi
- uses: actions/upload-artifact@v3
if: failure()
Expand Down

0 comments on commit b6ffc75

Please sign in to comment.