Skip to content

Commit

Permalink
automated build attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
sdumetz committed May 15, 2024
1 parent 8691e08 commit e3ee7af
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 10 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/compile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Artefact builder
on:
push:
branches:
- internal
tags:
- v*.*.*
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build
run: |
docker buildx build --platform linux/amd64,linux/arm64 --tag holusion-cage .
docker container create --platform "linux/amd64" --name "cage-amd64" holusion-cage
docker container cp cage-amd64:/app/build/cage ./build/cage-amd64
docker container rm cage-amd64
docker container create --platform "linux/arm64/v7" --name "cage-arm64" holusion-cage
docker container cp cage-arm64:/app/build/cage ./build/cage-arm64
docker container rm cage-arm64
- name: Upload
uses: actions/upload-artifact@v4
with:
name: cage
path: build/cage-*
retention-days: 1

26 changes: 16 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,9 @@ RUN apt-get -qqy update \
quilt \
libexpat1-dev \
libffi-dev \
libxml2-dev \
liblzma-dev \
&& rm -rf /var/lib/apt/lists/*

# wlroots build-deps (https://packages.debian.org/source/bookworm/wlroots)
# - libwayland-dev is required for wayland-scanner, which is set as "native" but could probablyt be force to use the local file.
# (https://gitlab.freedesktop.org/wlroots/wlroots/-/blob/master/protocol/meson.build#L8)
RUN apt-get -qqy update \
&& apt-get -qqy --no-install-recommends install \
libavformat-dev \
Expand Down Expand Up @@ -69,13 +65,23 @@ RUN apt-get -qqy update \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /app
COPY . /app

RUN rm -rf /app/build
RUN mkdir -p /app/subprojects

RUN meson setup build --prefer-static --default-library=static --buildtype=release -Dwerror=false -Doptimization=2 \
-Dxwayland=enabled \
COPY meson_options.txt meson.build /app/
COPY *.in *.scd .clang-format .clang-format-ignore /app/

COPY subprojects/*.wrap /app/subprojects/
COPY ./protocol /app/protocol
COPY *.[ch] /app/


# Fix for the use of local wayland-scanner in subsequent builds
ENV PATH="${PATH}:/app/build/subprojects/wayland-1.22.0/src/wayland-scanner"

RUN meson setup build --prefer-static --default-library=static --buildtype=release -Dwerror=false \
-Dxwayland=enabled -Dinput_calibration=enabled -Dman-pages=disabled \
-Dwlroots:auto_features=enabled -Dwlroots:backends=auto -Dwlroots:renderers=auto \
-Dwayland:documentation=false -Dwayland:tests=false
-Dwayland:documentation=false -Dwayland:dtd_validation=false

RUN ninja -C build
RUN ninja -C build

0 comments on commit e3ee7af

Please sign in to comment.