exiv2/.github/workflows/nightly_Linux_distributions.yml
2023-06-02 00:25:13 +08:00

47 lines
1.7 KiB
YAML

# To trigger this workflow manually, go to this url and click "Run workflow":
# https://github.com/Exiv2/exiv2/actions/workflows/nightly_Linux_distributions.yml
on:
workflow_dispatch:
# Uncomment to run this workflow daily at 4am.
#
# schedule:
# - cron: 0 4 * * *
name: CI for different Linux distributions
jobs:
distros:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# arch suffering this issue: https://github.com/abseil/abseil-cpp/issues/709
# centos:8 had linking issues with gtest
container_image: ["fedora:latest", "debian:10", "archlinux:base", "ubuntu:20.04", "centos:8", "opensuse/tumbleweed", "alpine:3.13"]
compiler: [g++, clang++]
build_type: [Release, Debug]
shared_libraries: [ON, OFF]
container:
image: ${{ matrix.container_image }}
env:
CMAKE_FLAGS: -DEXIV2_TEAM_EXTRA_WARNINGS=OFF -DEXIV2_ENABLE_WEBREADY=ON -DEXIV2_ENABLE_CURL=ON -DEXIV2_BUILD_UNIT_TESTS=OFF -DEXIV2_ENABLE_BMFF=ON -DEXIV2_TEAM_WARNINGS_AS_ERRORS=OFF -DEXIV2_ENABLE_PNG=ON -DCMAKE_INSTALL_PREFIX=install
steps:
- name: install tar in opensuse
run: |
distro_id=$(grep '^ID=' /etc/os-release|awk -F = '{print $2}'|sed 's/\"//g')
echo $distro_id
if [[ "$distro_id" == "opensuse-tumbleweed" ]]; then zypper --non-interactive install tar gzip; fi
- uses: actions/checkout@v3
- name: install dependencies
run: ./ci/install_dependencies.sh
- name: build and compile
run: |
mkdir build && cd build
cmake $CMAKE_FLAGS -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DBUILD_SHARED_LIBS=${{ matrix.shared_libraries }} -DCMAKE_CXX_COMPILER=${{ matrix.compiler }} ..
make -j $(nproc)
make install