Skip to content

Commit

Permalink
ci: also build on Ubuntu 24.04
Browse files Browse the repository at this point in the history
  • Loading branch information
striezel committed Jun 9, 2024
1 parent bad76a3 commit c720c4d
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 7 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/clang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,23 @@ on: push

jobs:
clang:
runs-on: ubuntu-22.04
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version: [11, 12, 13, 14]
include:
- version: 11
os: ubuntu-22.04
- version: 12
os: ubuntu-22.04
- version: 13
os: ubuntu-22.04
- version: 14
os: ubuntu-22.04
- version: 16
os: ubuntu-24.04
- version: 18
os: ubuntu-24.04
steps:
# Checks-out the repository under $GITHUB_WORKSPACE.
- uses: actions/checkout@v4
Expand Down
16 changes: 14 additions & 2 deletions .github/workflows/gcc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,23 @@ on: push

jobs:
gcc:
runs-on: ubuntu-22.04
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version: [9, 10, 11, 12]
include:
- version: 9
os: ubuntu-22.04
- version: 10
os: ubuntu-22.04
- version: 11
os: ubuntu-22.04
- version: 12
os: ubuntu-22.04
- version: 13
os: ubuntu-24.04
- version: 14
os: ubuntu-24.04
steps:
# Checks-out the repository under $GITHUB_WORKSPACE.
- uses: actions/checkout@v4
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-20.04, ubuntu-22.04 ]
os: [ ubuntu-20.04, ubuntu-22.04, ubuntu-24.04 ]
runs-on: ${{ matrix.os }}
steps:
# Checks-out the repository under $GITHUB_WORKSPACE.
Expand All @@ -24,7 +24,15 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends build-essential bzip2 ca-certificates debhelper devscripts fakeroot g++ git lsb-release tar wget
sudo apt-get install -y --no-install-recommends catch cmake g++ libgl-dev libglfw3-dev libwebp-dev pkg-config
sudo apt-get install -y --no-install-recommends cmake g++ libgl-dev libglfw3-dev libwebp-dev pkg-config
- name: Install Catch v1
run: |
sudo apt-get install -y --no-install-recommends catch
if: matrix.os != 'ubuntu-24.04'
- name: Install Catch v2 / v3
run: |
sudo apt-get install -y --no-install-recommends catch2
if: matrix.os == 'ubuntu-24.04'
- name: Build package
run: |
export CXX=g++
Expand Down
6 changes: 5 additions & 1 deletion tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ else ()
set(HAS_CATCH_V3 OFF)
endif ()

# Fedora 38 also uses Catch 3.x.
# Some newer distros like Fedora 38+ or Ubuntu 24.04+ also use Catch 3.x.
if (UNIX AND CMAKE_VERSION VERSION_GREATER_EQUAL "3.22.0")
cmake_host_system_information(RESULT DIST_NAME QUERY DISTRIB_NAME)
cmake_host_system_information(RESULT DIST_VERSION_ID QUERY DISTRIB_VERSION_ID)
Expand All @@ -16,6 +16,10 @@ if (UNIX AND CMAKE_VERSION VERSION_GREATER_EQUAL "3.22.0")
# Fedora 38 or later detected, set flag for Catch 3.x.
set(HAS_CATCH_V3 ON)
endif ()
if (DIST_NAME STREQUAL "Ubuntu" AND DIST_VERSION_ID VERSION_GREATER_EQUAL "24.04")
# Ubuntu 24.04 or later detected, set flag for Catch 3.x.
set(HAS_CATCH_V3 ON)
endif ()
endif()

add_subdirectory (webp-viewer-tests)

0 comments on commit c720c4d

Please sign in to comment.