Skip to content

Commit

Permalink
Fixed various CI failures (openstreetmap#328)
Browse files Browse the repository at this point in the history
* Fix `Unknown argument "--skip-broken" for command "dnf5"`

* Increase timeout for `render_list` & `render_old` tests

* Sync FreeBSD build command with others (and build Release by default)

* Fix non-default tile tests

* Fixed WEBP test for `libwebp.so.4`
  • Loading branch information
hummeltech authored Jul 21, 2023
1 parent f652ab1 commit 24a5752
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/actions/cmake/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ runs:
run: |
cmake -B build -S . \
-LA \
-DCMAKE_BUILD_TYPE:STRING=${BUILD_TYPE:-Debug} \
-DCMAKE_BUILD_TYPE:STRING=${BUILD_TYPE:-Release} \
-DCMAKE_INSTALL_PREFIX:PATH=${INSTALL_PREFIX:-/usr/local} \
-DENABLE_TESTS:BOOL=ON
shell: bash --noprofile --norc -euxo pipefail {0}
Expand Down
7 changes: 6 additions & 1 deletion .github/actions/dependencies/install/yum/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,10 @@ runs:
shell: bash --noprofile --norc -euxo pipefail {0}

- name: Install package(s)
run: yum --assumeyes --skip-broken install ${{ inputs.packages }}
run: |
if command -v dnf5 &> /dev/null; then
yum --assumeyes install ${{ inputs.packages }}
else
yum --assumeyes --skip-broken install ${{ inputs.packages }}
fi
shell: bash --noprofile --norc -euxo pipefail {0}
5 changes: 4 additions & 1 deletion .github/actions/freebsd/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,11 @@ runs:
release: 13.1
run: |
export CMAKE_BUILD_PARALLEL_LEVEL=$(sysctl -n hw.ncpu)
export LIBRARY_PATH=/usr/local/lib
cmake -B build -S . \
-DCMAKE_LIBRARY_PATH:PATH=/usr/local/lib \
-LA \
-DCMAKE_BUILD_TYPE:STRING=${BUILD_TYPE:-Release} \
-DCMAKE_INSTALL_PREFIX:PATH=${INSTALL_PREFIX:-/usr/local} \
-DENABLE_TESTS:BOOL=ON
cmake --build build
ctest --test-dir build
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ jobs:
fail-fast: false
container:
env:
BUILD_TYPE: Debug
CC: ${{ matrix.compiler == 'LLVM' && 'clang' || 'gcc' }}
CFLAGS: ${{ (matrix.build_system == 'CMake' && matrix.compiler == 'GNU') && '--coverage' || '' }}
CXX: ${{ matrix.compiler == 'LLVM' && 'clang++' || 'g++' }}
Expand Down Expand Up @@ -86,7 +85,6 @@ jobs:

macOS:
env:
BUILD_TYPE: Release
CFLAGS: -Wno-implicit-function-declaration
LDFLAGS: -undefined dynamic_lookup
LIBRARY_PATH: /usr/local/lib
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ jobs:
name: Build, Test & Report Coverage
runs-on: ubuntu-latest
env:
BUILD_TYPE: Debug
CFLAGS: --coverage
CXXFLAGS: --coverage
steps:
Expand Down
21 changes: 11 additions & 10 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@ set(TILE_PNG256_SHA256SUM "${TILE_DEFAULT_SHA256SUM}")
set(TILE_PNG32_CMD "${CURL_EXECUTABLE} --fail --silent ${TILE_PNG32_URL}")
set(TILE_PNG32_SHA256SUM "1006d92152f1e18896e0016fb43201b14bbcf7655955b74495ad3610541d325b")
set(TILE_WEBP_CMD "${CURL_EXECUTABLE} --fail --silent ${TILE_WEBP_URL}")
set(TILE_WEBP_SHA256SUM_6 "96fc0455b2269a7bcd4a5b3c9844529c3c77e3bb15f56e72f78a5af3bc15b6b5") # libwebp6
set(TILE_WEBP_SHA256SUM_7 "a82ef9ba5dc333de88af7b645084c30ab2b01c664e17162cbf6659c287cc4df4") # libwebp7
set(TILE_WEBP_SHA256SUM_4 "ef3862a57831b21ec69c15be196e1e2b4fea66246c361142631b9fa22b85decc") # libwebp.so.4
set(TILE_WEBP_SHA256SUM_6 "96fc0455b2269a7bcd4a5b3c9844529c3c77e3bb15f56e72f78a5af3bc15b6b5") # libwebp.so.6
set(TILE_WEBP_SHA256SUM_7 "a82ef9ba5dc333de88af7b645084c30ab2b01c664e17162cbf6659c287cc4df4") # libwebp.so.7

configure_file(
renderd.conf.in
Expand Down Expand Up @@ -146,23 +147,23 @@ add_test(
NAME download_tiles
COMMAND ${BASH} -c "
until $(${TILE_DEFAULT_CMD} --output tile.png); do
echo 'Sleeping 1s';
echo 'Sleeping 1s (DEFAULT)';
sleep 1;
done
until $(${TILE_JPG_CMD} --output tile.jpg); do
echo 'Sleeping 1s';
echo 'Sleeping 1s (JPG)';
sleep 1;
done
until $(${TILE_PNG256_CMD} --output tile.png256); do
echo 'Sleeping 1s';
echo 'Sleeping 1s (PNG256)';
sleep 1;
done
until $(${TILE_PNG32_CMD} --output tile.png32); do
echo 'Sleeping 1s';
echo 'Sleeping 1s (PNG32)';
sleep 1;
done
until $(${TILE_WEBP_CMD} --output tile.webp); do
echo 'Sleeping 1s';
echo 'Sleeping 1s (WEBP)';
sleep 1;
done
"
Expand All @@ -174,7 +175,7 @@ add_test(
(echo '${TILE_JPG_SHA256SUM} tile.jpg' | ${SHA256SUM_EXECUTABLE} -c) && \
(echo '${TILE_PNG256_SHA256SUM} tile.png256' | ${SHA256SUM_EXECUTABLE} -c) && \
(echo '${TILE_PNG32_SHA256SUM} tile.png32' | ${SHA256SUM_EXECUTABLE} -c) && \
((echo '${TILE_WEBP_SHA256SUM_6} tile.webp' | ${SHA256SUM_EXECUTABLE} -c) || (echo '${TILE_WEBP_SHA256SUM_7} tile.webp' | ${SHA256SUM_EXECUTABLE} -c))
((echo '${TILE_WEBP_SHA256SUM_7} tile.webp' | ${SHA256SUM_EXECUTABLE} -c) || (echo '${TILE_WEBP_SHA256SUM_6} tile.webp' | ${SHA256SUM_EXECUTABLE} -c) || (echo '${TILE_WEBP_SHA256SUM_4} tile.webp' | ${SHA256SUM_EXECUTABLE} -c))
"
)
add_test(
Expand Down Expand Up @@ -255,12 +256,12 @@ set_tests_properties(render_expired PROPERTIES
set_tests_properties(render_list PROPERTIES
DEPENDS render_speedtest
FIXTURES_REQUIRED httpd_started
TIMEOUT 20
TIMEOUT 60
)
set_tests_properties(render_old PROPERTIES
DEPENDS render_speedtest
FIXTURES_REQUIRED httpd_started
TIMEOUT 20
TIMEOUT 60
)
set_tests_properties(download_tiles PROPERTIES
FIXTURES_REQUIRED httpd_started
Expand Down
8 changes: 4 additions & 4 deletions tests/renderd.conf.in
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,25 @@ XML=@PROJECT_SOURCE_DIR@/utils/example-map/mapnik.xml
TILEDIR=@PROJECT_BINARY_DIR@/tests/tiles
TYPE=jpg image/jpeg jpeg
URI=/tiles/renderd-example-jpg
XML=@PROJECT_BINARY_DIR@/tests/www/mapnik.xml
XML=@PROJECT_SOURCE_DIR@/utils/example-map/mapnik.xml

[@MAP_NAME@_png256]
TILEDIR=@PROJECT_BINARY_DIR@/tests/tiles
TYPE=png image/png png256
URI=/tiles/renderd-example-png256
XML=@PROJECT_BINARY_DIR@/tests/www/mapnik.xml
XML=@PROJECT_SOURCE_DIR@/utils/example-map/mapnik.xml

[@MAP_NAME@_png32]
TILEDIR=@PROJECT_BINARY_DIR@/tests/tiles
TYPE=png image/png png32
URI=/tiles/renderd-example-png32
XML=@PROJECT_BINARY_DIR@/tests/www/mapnik.xml
XML=@PROJECT_SOURCE_DIR@/utils/example-map/mapnik.xml

[@MAP_NAME@_webp]
TILEDIR=@PROJECT_BINARY_DIR@/tests/tiles
TYPE=webp image/webp webp
URI=/tiles/renderd-example-webp
XML=@PROJECT_BINARY_DIR@/tests/www/mapnik.xml
XML=@PROJECT_SOURCE_DIR@/utils/example-map/mapnik.xml

[renderd1]
iphostname=127.0.0.1
Expand Down

0 comments on commit 24a5752

Please sign in to comment.