-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
149 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: CMake | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
|
||
env: | ||
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | ||
BUILD_TYPE: Release | ||
|
||
jobs: | ||
build: | ||
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac. | ||
# You can convert this to a matrix build if you need cross-platform coverage. | ||
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Add PPA | ||
run: sudo apt-add-repository ppa:mir-team/release | ||
|
||
- name: Install dependencies | ||
run: sudo apt-get install libmiral-dev | ||
|
||
- name: Configure CMake | ||
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | ||
|
||
- name: Build | ||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
name: miracle-wm | ||
adopt-info: miracle-wm | ||
summary: "miracle-wm: a tiling window manager built on Mir" | ||
description: | | ||
miracle-wm is a tiling window manager based off the Mir library. | ||
It is intended to provide an i3/sway-like experience. | ||
confinement: classic | ||
base: core22 | ||
|
||
architectures: | ||
- build-on: amd64 | ||
- build-on: arm64 | ||
- build-on: armhf | ||
|
||
package-repositories: | ||
- type: apt | ||
ppa: mir-team/release | ||
|
||
apps: | ||
miracle-wm: | ||
command: &_command usr/local/bin/miracle-wm | ||
environment: &_environment | ||
# Prep for Mir | ||
MIR_SERVER_PLATFORM_PATH: ${SNAP}/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/mir/server-platform | ||
__EGL_VENDOR_LIBRARY_DIRS: $SNAP/etc/glvnd/egl_vendor.d:$SNAP/usr/share/glvnd/egl_vendor.d | ||
LIBGL_DRIVERS_PATH: $SNAP/usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/dri | ||
LIBINPUT_QUIRKS_DIR: ${SNAP}/usr/share/libinput | ||
PATH: ${SNAP}/usr/local/bin/:${PATH} | ||
# For "reasons" this is being set despite this being a classic snap. This overwrites the nonsense | ||
LD_LIBRARY_PATH: "" | ||
|
||
parts: | ||
miracle-wm: | ||
build-attributes: | ||
- enable-patchelf | ||
override-pull: | | ||
craftctl default | ||
# work around https://github.com/diddlesnaps/snapcraft-multiarch-action/issues/22 | ||
git config --global --add safe.directory ${CRAFT_PART_SRC} | ||
server_version=`git rev-list --count HEAD` | ||
mir_version=`LANG=C apt-cache policy mir-graphics-drivers-desktop | sed -rne 's/^\s+Candidate:\s+([^-]*)-.+$/\1/p'` | ||
craftctl set version=$server_version-mir$mir_version | ||
if echo $mir_version | grep -e '+dev' -e '~rc' -q; then craftctl set grade=devel; else craftctl set grade=stable; fi | ||
plugin: cmake | ||
source: . | ||
build-packages: | ||
- pkg-config | ||
- libmiral-dev | ||
- libboost-filesystem-dev | ||
- libfreetype6-dev | ||
- libwayland-dev | ||
- libxkbcommon-dev | ||
- g++ | ||
- make | ||
stage-packages: | ||
- libmiral6 | ||
- mir-graphics-drivers-desktop | ||
- libfreetype6 | ||
prime: | ||
- -lib/udev | ||
- -usr/doc | ||
- -usr/doc-base | ||
- -usr/share/applications | ||
- -usr/share/apport | ||
- -usr/share/bug | ||
- -usr/share/doc | ||
- -usr/share/doc-base | ||
- -usr/share/icons | ||
- -usr/share/libdrm | ||
- -usr/share/libwacom | ||
- -usr/share/lintian | ||
- -usr/share/man | ||
- -usr/share/pkgconfig | ||
|
||
mesa-patchelf: | ||
build-attributes: | ||
- enable-patchelf | ||
plugin: nil | ||
stage-packages: | ||
- libgl1-mesa-dri | ||
- libtinfo5 | ||
# included in this part because it tries to pull in mesa bits | ||
- gvncviewer | ||
- swaybg | ||
- synapse | ||
- xvfb | ||
- xwayland | ||
stage: | ||
# The libraries in .../dri need no-patchelf, so they come from the mesa-unpatched part | ||
- -usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/dri | ||
|
||
mesa-no-patchelf: | ||
plugin: nil | ||
stage-packages: | ||
- libgl1-mesa-dri | ||
build-attributes: | ||
- no-patchelf # Otherwise snapcraft may strip the build ID and cause the driver to crash | ||
stage: | ||
# Only the libraries in .../dri need to not be patched, the rest come from the mesa part | ||
- usr/lib/${SNAPCRAFT_ARCH_TRIPLET}/dri |