From 81ac095b2ac8e31e56751916e8dbc52ccd1c1717 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Thu, 28 Sep 2023 17:14:18 +0200 Subject: [PATCH] CI: add testing for -DENABLE_TIFF=OFF --- .github/workflows/clang_linux.yml | 21 ++++++++++++++++++--- travis/install.sh | 1 + 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/.github/workflows/clang_linux.yml b/.github/workflows/clang_linux.yml index 1f4e391e49..b656eb9e60 100644 --- a/.github/workflows/clang_linux.yml +++ b/.github/workflows/clang_linux.yml @@ -17,6 +17,21 @@ jobs: clang_linux: runs-on: ubuntu-latest + env: + PROJ_CMAKE_BUILD_OPTIONS: ${{ matrix.PROJ_CMAKE_BUILD_OPTIONS }} + + strategy: + fail-fast: false + matrix: + include: + - name: Regular + id: regular + PROJ_CMAKE_BUILD_OPTIONS: "" + + - name: Without TIFF + id: without_tiff + PROJ_CMAKE_BUILD_OPTIONS: "-DENABLE_TIFF=OFF" + if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')" steps: - name: Checkout @@ -28,8 +43,8 @@ jobs: with: path: | ${{ github.workspace }}/ccache.tar.gz - key: ${{ runner.os }}-cache-clang-${{ github.run_id }} - restore-keys: ${{ runner.os }}-cache-clang- + key: ${{ runner.os }}-cache-clang-${{ matrix.id }}-${{ github.run_id }} + restore-keys: ${{ runner.os }}-cache-clang-${{ matrix.id }}- - name: Run - run: docker run -e CI -e TRAVIS_BUILD_DIR="$PWD" -e WORK_DIR="$PWD" -e TRAVIS_OS_NAME=linux -e BUILD_NAME=linux_clang -v $PWD:$PWD ubuntu:20.04 $PWD/.github/workflows/clang_linux/start.sh + run: docker run -e CI -e TRAVIS_BUILD_DIR="$PWD" -e PROJ_CMAKE_BUILD_OPTIONS="$PROJ_CMAKE_BUILD_OPTIONS" -e WORK_DIR="$PWD" -e TRAVIS_OS_NAME=linux -e BUILD_NAME=linux_clang -v $PWD:$PWD ubuntu:20.04 $PWD/.github/workflows/clang_linux/start.sh diff --git a/travis/install.sh b/travis/install.sh index 026dbd481a..711f2db29b 100755 --- a/travis/install.sh +++ b/travis/install.sh @@ -56,6 +56,7 @@ cd shared_build cmake \ -D CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \ -D USE_CCACHE=${USE_CCACHE} \ + ${PROJ_CMAKE_BUILD_OPTIONS:-} \ -D PROJ_DB_CACHE_DIR=$HOME/.ccache \ -D BUILD_SHARED_LIBS=ON \ -D BUILD_EXAMPLES=ON \