Skip to content

Commit

Permalink
ci: Use Ubuntu 24.10 for building
Browse files Browse the repository at this point in the history
Signed-off-by: Artem Senichev <[email protected]>
  • Loading branch information
artemsen committed Oct 20, 2024
1 parent 5191cbf commit 69f740b
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 24 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/Dockerfile.Ubuntu
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
FROM ubuntu:24.10

ENV DEBIAN_FRONTEND=noninteractive
RUN apt update && apt upgrade --yes && apt install --no-install-recommends --yes \
build-essential \
cmake \
libavif-dev \
libexif-dev \
libfontconfig-dev \
libfreetype-dev \
libgif-dev \
libgtest-dev \
libheif-dev \
libjpeg-dev \
libjson-c-dev \
libjxl-dev \
libopenexr-dev \
libopenexr-dev \
librsvg2-dev \
libtiff-dev \
libwayland-dev \
libwebp-dev \
libxkbcommon-dev \
meson \
pkg-config \
wayland-protocols

# install gtest
RUN mkdir /tmp/gtest && \
cd /tmp/gtest && \
cmake /usr/src/gtest && \
make -j8 && \
cp /tmp/gtest/lib/* /usr/lib/

USER ubuntu
44 changes: 20 additions & 24 deletions .github/workflows/Ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,6 @@ jobs:

steps:

- name: Update package info
run: sudo apt update

- name: Install dependencies
run: >
sudo apt install --no-install-recommends --yes
build-essential meson pkg-config wayland-protocols
libwayland-dev libjson-c-dev libxkbcommon-dev
libfreetype-dev libfontconfig-dev libexif-dev
libopenexr-dev libgif-dev libheif-dev libavif-dev
libjpeg-dev librsvg2-dev libtiff-dev libwebp-dev
libopenexr-dev libjxl-dev
libgtest-dev cmake
- name: Install gtest
run: |
mkdir /tmp/gtest
cd /tmp/gtest && cmake /usr/src/gtest && make -j$(nproc)
sudo cp /tmp/gtest/lib/* /usr/lib/
- name: Check out source code
uses: actions/checkout@v4
with:
Expand All @@ -39,8 +19,15 @@ jobs:
run: echo "VERSION=$(git describe --tags --long --always | sed 's/^v//;s/-/./')" >> $GITHUB_OUTPUT
id: version

- name: Build docker image
run: docker build --tag=swayimg --file=.github/workflows/Dockerfile.Ubuntu .

- name: Run docker container
run: docker run --tty --detach --name=swayimg --volume=$PWD:$PWD:ro --workdir=$PWD swayimg

- name: Configure
run: >
docker exec swayimg
meson setup
-D version=${{steps.version.outputs.VERSION}}
-D tests=enabled
Expand All @@ -50,13 +37,22 @@ jobs:
${{ env.BUILD_PATH }}
- name: Compile and link
run: meson compile -C ${{ env.BUILD_PATH }}
run: >
docker exec swayimg
meson compile -C ${{ env.BUILD_PATH }}
- name: Install
run: env DESTDIR=${{ env.INSTALL_PATH }} meson install -C ${{ env.BUILD_PATH }}
run: >
docker exec swayimg
env DESTDIR=${{ env.INSTALL_PATH }}
meson install -C ${{ env.BUILD_PATH }}
- name: Run installed
run: ${{ env.INSTALL_PATH }}/usr/bin/swayimg --version
run: >
docker exec swayimg
${{ env.INSTALL_PATH }}/usr/bin/swayimg --version
- name: Run unit tests
run: meson test --verbose -C ${{ env.BUILD_PATH }}
run: >
docker exec swayimg
meson test --verbose -C ${{ env.BUILD_PATH }}

0 comments on commit 69f740b

Please sign in to comment.