forked from Kistler-Group/sdbus-cpp
refactor(ci): use newer github actions and ubuntu v22 image
This commit is contained in:
committed by
Stanislav Angelovič
parent
8bbeeeb4ce
commit
6c5e72326c
28
.github/workflows/ci.yml
vendored
28
.github/workflows/ci.yml
vendored
@ -12,7 +12,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-18.04, ubuntu-20.04]
|
os: [ubuntu-18.04, ubuntu-20.04, ubuntu-22.04]
|
||||||
compiler: [g++, clang]
|
compiler: [g++, clang]
|
||||||
build: [shared-libsystemd]
|
build: [shared-libsystemd]
|
||||||
include:
|
include:
|
||||||
@ -20,7 +20,7 @@ jobs:
|
|||||||
compiler: g++
|
compiler: g++
|
||||||
build: embedded-static-libsystemd
|
build: embedded-static-libsystemd
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- name: install-libsystemd-toolchain
|
- name: install-libsystemd-toolchain
|
||||||
if: matrix.build == 'embedded-static-libsystemd'
|
if: matrix.build == 'embedded-static-libsystemd'
|
||||||
run: |
|
run: |
|
||||||
@ -39,28 +39,32 @@ jobs:
|
|||||||
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/clang 10
|
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/clang 10
|
||||||
sudo update-alternatives --remove-all c++
|
sudo update-alternatives --remove-all c++
|
||||||
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++ 10
|
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++ 10
|
||||||
- name: configure-debug
|
- name: install-googletest
|
||||||
if: matrix.build == 'shared-libsystemd' && matrix.os == 'ubuntu-18.04'
|
if: matrix.os == 'ubuntu-22.04' # On older ubuntus the libgmock-dev package is either unavailable or has faulty pkg-config file
|
||||||
run: |
|
run: |
|
||||||
mkdir build
|
sudo apt-get install -y libgmock-dev
|
||||||
cd build
|
- name: configure-debug
|
||||||
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="-O0 -g -W -Wextra -Wall -Wnon-virtual-dtor -Werror" -DBUILD_TESTS=ON -DENABLE_PERF_TESTS=ON -DENABLE_STRESS_TESTS=ON -DBUILD_CODE_GEN=ON ..
|
|
||||||
- name: configure-release
|
|
||||||
if: matrix.build == 'shared-libsystemd' && matrix.os == 'ubuntu-20.04'
|
if: matrix.build == 'shared-libsystemd' && matrix.os == 'ubuntu-20.04'
|
||||||
run: |
|
run: |
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_CXX_FLAGS="-O3 -DNDEBUG -W -Wextra -Wall -Wnon-virtual-dtor -Werror" -DBUILD_TESTS=ON -DENABLE_PERF_TESTS=ON -DENABLE_STRESS_TESTS=ON -DBUILD_CODE_GEN=ON ..
|
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="-O0 -g -W -Wextra -Wall -Wnon-virtual-dtor -Werror" -DCMAKE_VERBOSE_MAKEFILE=ON -DBUILD_TESTS=ON -DENABLE_PERF_TESTS=ON -DENABLE_STRESS_TESTS=ON -DBUILD_CODE_GEN=ON ..
|
||||||
|
- name: configure-release
|
||||||
|
if: matrix.build == 'shared-libsystemd' && (matrix.os == 'ubuntu-18.04' || matrix.os == 'ubuntu-22.04')
|
||||||
|
run: |
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_CXX_FLAGS="-O3 -DNDEBUG -W -Wextra -Wall -Wnon-virtual-dtor -Werror" -DCMAKE_VERBOSE_MAKEFILE=ON -DBUILD_TESTS=ON -DENABLE_PERF_TESTS=ON -DENABLE_STRESS_TESTS=ON -DBUILD_CODE_GEN=ON ..
|
||||||
- name: configure-with-embedded-libsystemd
|
- name: configure-with-embedded-libsystemd
|
||||||
if: matrix.build == 'embedded-static-libsystemd'
|
if: matrix.build == 'embedded-static-libsystemd'
|
||||||
run: |
|
run: |
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=ON -DENABLE_PERF_TESTS=ON -DENABLE_STRESS_TESTS=ON -DBUILD_CODE_GEN=ON -DBUILD_LIBSYSTEMD=ON -DLIBSYSTEMD_VERSION=244 ..
|
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE=ON -DBUILD_TESTS=ON -DENABLE_PERF_TESTS=ON -DENABLE_STRESS_TESTS=ON -DBUILD_CODE_GEN=ON -DBUILD_LIBSYSTEMD=ON -DLIBSYSTEMD_VERSION=244 ..
|
||||||
- name: make
|
- name: make
|
||||||
run: |
|
run: |
|
||||||
cd build
|
cd build
|
||||||
cmake --build . -j2
|
cmake --build . -j4
|
||||||
- name: verify
|
- name: verify
|
||||||
run: |
|
run: |
|
||||||
cd build
|
cd build
|
||||||
@ -73,7 +77,7 @@ jobs:
|
|||||||
cpack -G DEB
|
cpack -G DEB
|
||||||
- name: 'Upload Artifact'
|
- name: 'Upload Artifact'
|
||||||
if: matrix.build == 'shared-libsystemd' && matrix.os == 'ubuntu-20.04' && matrix.compiler == 'g++'
|
if: matrix.build == 'shared-libsystemd' && matrix.os == 'ubuntu-20.04' && matrix.compiler == 'g++'
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: "debian-packages-${{ matrix.os }}-${{ matrix.compiler }}"
|
name: "debian-packages-${{ matrix.os }}-${{ matrix.compiler }}"
|
||||||
path: |
|
path: |
|
||||||
|
Reference in New Issue
Block a user