mirror of
https://github.com/eclipse-mosquitto/mosquitto.git
synced 2026-08-18 11:45:08 +08:00
85 lines
1.7 KiB
YAML
85 lines
1.7 KiB
YAML
name: Linux
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- master
|
|
- fixes
|
|
- develop
|
|
- release/*
|
|
tags:
|
|
- 'v[0-9]+.*'
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
- fixes
|
|
- develop
|
|
- release/*
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Install third party dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y \
|
|
docbook-xsl \
|
|
ccache \
|
|
lcov \
|
|
libargon2-dev \
|
|
libc-ares-dev \
|
|
libcjson-dev \
|
|
libcjson1 \
|
|
libcunit1-dev \
|
|
libedit-dev \
|
|
libgmock-dev \
|
|
libmicrohttpd-dev \
|
|
libssl-dev \
|
|
libwrap0-dev \
|
|
ninja-build \
|
|
microsocks \
|
|
python3-all \
|
|
python3-paho-mqtt \
|
|
python3-psutil \
|
|
uthash-dev \
|
|
xsltproc
|
|
|
|
- uses: actions/checkout@v6
|
|
|
|
- name: Configure ccache
|
|
run: |
|
|
mkdir "$GITHUB_WORKSPACE/ccache"
|
|
echo "CCACHE_DIR=$GITHUB_WORKSPACE/ccache" >> $GITHUB_ENV
|
|
|
|
- name: Restore ccache
|
|
uses: actions/cache@v5
|
|
with:
|
|
path: ccache
|
|
key: ${{ runner.os }}-cmake-ccache
|
|
|
|
- run: cmake -E make_directory build
|
|
|
|
- run: |
|
|
cmake \
|
|
-G Ninja \
|
|
-DCMAKE_BUILD_TYPE=Debug \
|
|
-S . \
|
|
-B build
|
|
env:
|
|
CC: "ccache gcc"
|
|
CXX: "ccache g++"
|
|
|
|
- run: cmake --build build --parallel $(nproc)
|
|
|
|
- name: Report ccache stats
|
|
run: ccache -s
|
|
|
|
- working-directory: build/
|
|
run: ctest -j20 --resource-spec-file ../test/resource.json --output-on-failure --repeat until-pass:5
|