e58f06d9fa
Stripped upstream git history; starting point for replacing the native SWELL/Win32 mapping UI with something more suited to bulk editing. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
50 lines
1.2 KiB
YAML
50 lines
1.2 KiB
YAML
name: Build
|
|
description: Build and optionally Rust code
|
|
inputs:
|
|
args:
|
|
description: 'Cargo arguments'
|
|
required: false
|
|
default: ''
|
|
targets:
|
|
description: 'Additional Rust targets'
|
|
required: false
|
|
default: ''
|
|
test:
|
|
description: 'Test?'
|
|
required: false
|
|
default: 'true'
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- name: Install Rust
|
|
uses: dtolnay/rust-toolchain@1.84.0
|
|
with:
|
|
targets: ${{ inputs.targets }}
|
|
|
|
- name: Set up dependencies
|
|
if: runner.os == 'Linux'
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install nasm php libudev-dev libxdo-dev libx11-dev libxcursor-dev libxcb-dri2-0-dev libxcb-icccm4-dev libx11-xcb-dev mesa-common-dev libgl1-mesa-dev libglu1-mesa-dev libspeechd-dev libgtk-3-dev
|
|
shell: sh
|
|
- name: Set up dependencies
|
|
run: brew install php
|
|
if: runner.os == 'macOS'
|
|
shell: sh
|
|
|
|
- name: Rust cache
|
|
uses: swatinem/rust-cache@v2
|
|
|
|
- name: cargo build
|
|
env:
|
|
ARGS: ${{ inputs.args }}
|
|
run: cargo build $ARGS
|
|
shell: sh
|
|
|
|
- name: cargo test
|
|
if: ${{ inputs.test == 'true' }}
|
|
env:
|
|
RUST_MIN_STACK: 5242880
|
|
ARGS: ${{ inputs.args }}
|
|
run: cargo test $ARGS -- --nocapture
|
|
shell: sh |