Skip to content

Commit

Permalink
Initial Github workflows (#1)
Browse files Browse the repository at this point in the history
* Draft of workflow for build on ubuntu

* Fixes for Ubuntu 22.04

* Renamed job
  • Loading branch information
2hdddg authored Jan 15, 2024
1 parent f592ee8 commit 504dc68
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 6 deletions.
17 changes: 17 additions & 0 deletions .github/actions/build-ubuntu-22.04/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM ubuntu:22.04

# Baseline and software-properties-common to be able to add new repository
RUN apt-get update && \
apt-get install -y software-properties-common build-essential pkg-config meson ninja-build && \
apt-get clean
# Build dependencies
RUN add-apt-repository universe && apt-get update && \
apt-get install -y libfmt-dev wayland-protocols libwayland-client0 libwayland-dev libcairo2-dev libpango1.0-dev libxkbcommon-dev liblua5.4-dev libpulse-dev && \
apt-get clean

# Set manually when running locally or set by Github actions/checkout
ENV GITHUB_WORKSPACE=/code

COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
CMD ["/entrypoint.sh"]
4 changes: 4 additions & 0 deletions .github/actions/build-ubuntu-22.04/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name: 'Build on Ubuntu-22.04'
runs:
using: 'docker'
image: 'Dockerfile'
5 changes: 5 additions & 0 deletions .github/actions/build-ubuntu-22.04/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh -l
set -e
cd $GITHUB_WORKSPACE
meson build-docker-ubuntu
ninja -C build-docker-ubuntu
11 changes: 11 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# https://docs.github.com/en/actions/creating-actions/creating-a-docker-container-action
name: build
on: [push]
jobs:
ubuntu-22.04:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build
uses: ./.github/actions/build-ubuntu-22.04/
3 changes: 3 additions & 0 deletions build-ubuntu-22.04
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh -l
docker build -t zenway/ubuntu:latest .github/actions/build-ubuntu
docker run -v $(pwd):/code -u $(id -u ${USER}):$(id -g ${USER}) zenway/ubuntu:latest
1 change: 1 addition & 0 deletions src/PowerSource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <sys/timerfd.h>

#include <filesystem>
#include <optional>
#include <string>

std::shared_ptr<PowerSource> PowerSource::Create(std::string_view name, MainLoop& mainLoop,
Expand Down
4 changes: 2 additions & 2 deletions src/Seat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ static const wl_pointer_listener pointer_listener = {
.axis_source = nullptr,
.axis_stop = nullptr,
.axis_discrete = nullptr,
.axis_value120 = nullptr,
.axis_relative_direction = nullptr,
//.axis_value120 = nullptr,
//.axis_relative_direction = nullptr,
};

std::unique_ptr<Pointer> Pointer::Create(wl_seat* seat) {
Expand Down
7 changes: 3 additions & 4 deletions src/ShellSurface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,9 @@ static const zwlr_layer_surface_v1_listener layer_listener = {.configure = on_co
.closed = on_closed};

static const wl_surface_listener surface_listener = {
.enter = on_enter,
.leave = nullptr,
.preferred_buffer_scale = nullptr,
.preferred_buffer_transform = nullptr,
.enter = on_enter, .leave = nullptr,
//.preferred_buffer_scale = nullptr,
//.preferred_buffer_transform = nullptr,
};

std::unique_ptr<ShellSurface> ShellSurface::Create(const Registry &registry, wl_output *output,
Expand Down
1 change: 1 addition & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include <spdlog/spdlog.h>

#include <filesystem>
#include <optional>

#include "DateTimeSources.h"
#include "MainLoop.h"
Expand Down

0 comments on commit 504dc68

Please sign in to comment.