-
Notifications
You must be signed in to change notification settings - Fork 0
94 lines (75 loc) · 2.59 KB
/
Copy pathlinux-build.yml
File metadata and controls
94 lines (75 loc) · 2.59 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: Linux Release
on:
workflow_dispatch:
push:
tags:
- "v*.*.*"
jobs:
build-linux:
runs-on: ubuntu-latest
container:
image: fedora:latest
steps:
- name: Install Git (Required for Checkout)
run: |
dnf update -y
dnf install -y git
- uses: actions/checkout@v5
- name: Install System Dependencies
run: |
# Enable RPMFusion for ffmpeg-devel
dnf install -y https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
# Install build tools and library dependencies
dnf install -y gcc gcc-c++ binutils pkgconfig alsa-lib-devel wayland-devel libX11-devel libxkbcommon-devel systemd-devel ffmpeg-devel libopenmpt-devel clang clang-devel
- name: Install Rust
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
- name: Build RustTracker
env:
CARGO_PROFILE_RELEASE_LTO: "true"
CARGO_PROFILE_RELEASE_CODEGEN_UNITS: "1"
CARGO_PROFILE_RELEASE_STRIP: "true"
run: |
source "$HOME/.cargo/env"
cargo build --release
strip target/release/rusttracker
- name: Install cargo-generate-rpm
run: |
source "$HOME/.cargo/env"
cargo install cargo-generate-rpm
- name: Package Release (RPM)
run: |
source "$HOME/.cargo/env"
cargo generate-rpm
- name: Upload Artifact
uses: actions/upload-artifact@v5
with:
name: RustTracker-Linux-RPM
path: target/generate-rpm/*.rpm
build-ubuntu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Install System Dependencies
run: |
sudo apt-get update
sudo apt-get install -y gcc g++ binutils pkg-config libasound2-dev libwayland-dev libx11-dev libxkbcommon-x11-dev libudev-dev libavcodec-dev libavformat-dev libavutil-dev libavdevice-dev libavfilter-dev libopenmpt-dev clang libclang-dev
- name: Build RustTracker
env:
CARGO_PROFILE_RELEASE_LTO: "true"
CARGO_PROFILE_RELEASE_CODEGEN_UNITS: "1"
CARGO_PROFILE_RELEASE_STRIP: "true"
run: |
cargo build --release
strip target/release/rusttracker
- name: Install cargo-deb
run: |
cargo install cargo-deb
- name: Package Release (DEB)
run: |
cargo deb
- name: Upload Artifact
uses: actions/upload-artifact@v5
with:
name: RustTracker-Linux-DEB
path: target/debian/*.deb