1
Fork 0
mirror of https://github.com/RGBCube/superfreq synced 2025-07-28 01:17:45 +00:00
superfreq/.github/workflows/build.yml
2025-05-17 08:06:14 +03:00

53 lines
1.1 KiB
YAML

name: Build & Test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache dependencies
uses: Swatinem/rust-cache@v2
- name: Run tests
run: cargo test
build:
name: Build
strategy:
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
# TODO: eventually we'd like to gate certain features
# behind target OS, at which point this may be usable.
#- os: macos-latest
# target: x86_64-apple-darwin
#- os: windows-latest
# target: x86_64-pc-windows-msvc
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Cache dependencies
uses: Swatinem/rust-cache@v2
- name: Build
run: cargo build --release --target ${{ matrix.target }}