Skip to content

o

o #376

Workflow file for this run

name: Compile changes
on:
push:
branches-ignore: [main]
pull_request:
branches-ignore: [main]
env:
CARGO_TERM_COLOR: always
jobs:
compile:
name: Compile for ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- name: linux
os: ubuntu-latest
artifact_name: target/debug/legion-kb-rgb
asset_name: legion-kb-rgb-linux
- name: windows
os: windows-latest
artifact_name: target/debug/legion-kb-rgb.exe
asset_name: legion-kb-rgb-windows
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up cargo cache
uses: actions/cache@v4
continue-on-error: false
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Download dependencies
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
sudo apt-get update -y
sudo apt install -y libunwind-dev
sudo apt-get install -y libx11-dev nasm libdbus-1-dev libudev-dev libxcb-randr0-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libxi-dev libxtst-dev libusb-1.0-0-dev libpango1.0-dev libgtk-3-dev libxdo-dev libappindicator3-dev libpipewire-0.3-dev
elif [ "$RUNNER_OS" == "macOS" ]; then
brew install nasm
elif [ "$RUNNER_OS" == "Windows" ]; then
echo "Nothing to do."
fi
shell: bash
- name: Build
shell: bash
run: cargo build --verbose
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.asset_name }}
path: ${{ matrix.artifact_name }}