-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (66 loc) · 2.34 KB
/
Copy pathbuild.yml
File metadata and controls
75 lines (66 loc) · 2.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: Build
# Builds hackeros-comp from source: installs the system libraries the
# Smithay-based compositor links against (Wayland, xkbcommon, libinput,
# libseat, DRM/GBM, EGL/GLES, Vulkan headers, pixman - see this
# workspace's own `build.hl` and `Cargo.toml`'s `smithay = { ... features
# = [...] }` block for why each one is there), then runs the same build
# `build.hl`'s own `> cargo build --release` target runs locally.
#
# Deliberately builds the root package only (`cargo build --release`,
# no `--workspace`) - same reasoning `build.hl` documents: the reference-
# copy crates (`hacker-mode/`, `penetration-mode/`) are workspace members
# for `cargo metadata`/dependency-resolution purposes, not things this
# repository ships a binary for. `test.yml` is what actually builds and
# tests those.
on:
push:
branches: [main]
paths-ignore:
- "docs/**"
- "**.md"
pull_request:
branches: [main]
paths-ignore:
- "docs/**"
- "**.md"
workflow_dispatch: {}
env:
CARGO_TERM_COLOR: always
jobs:
build:
name: cargo build --release
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
build-essential pkg-config \
libwayland-dev wayland-protocols \
libxkbcommon-dev \
libinput-dev libudev-dev libseat-dev \
libdrm-dev libgbm-dev \
libegl1-mesa-dev libgles2-mesa-dev \
libvulkan-dev \
libpixman-1-dev \
libssl-dev
- name: Install Rust (stable)
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo registry/build artifacts
uses: Swatinem/rust-cache@v2
with:
# Keyed off Cargo.lock so a bump of the pinned Smithay `rev` (or
# any other dependency) invalidates the cache instead of
# silently reusing a stale build.
shared-key: hackeros-comp-build
- name: cargo build --release
run: cargo build --release
- name: Upload built binary
uses: actions/upload-artifact@v4
with:
name: hackeros-comp-${{ github.sha }}
path: target/release/hackeros-comp
if-no-files-found: error
retention-days: 14