Files
microw8/.github/workflows/ci.yml

51 lines
1.1 KiB
YAML

name: Rust
on:
push:
branches: [ master ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
strategy:
matrix:
build: [ linux, windows, macos ]
include:
- build: linux
os: ubuntu-latest
exe: uw8
- build: windows
os: windows-latest
exe: uw8.exe
- build: macos
os: macos-latest
exe: uw8
runs-on: ${{ matrix.os }}
steps:
- name: Install dependencies
run: sudo apt-get install -y libxkbcommon-dev libasound2-dev
if: matrix.os == 'ubuntu-latest'
- name: Checkout
uses: actions/checkout@v3
- name: Cache build dirs
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Build
run: cargo build --release --verbose
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: uw8-${{ matrix.build }}
path: target/release/${{ matrix.exe }}