1
Fork 0
mirror of https://github.com/RGBCube/superfreq synced 2025-07-29 01:47:44 +00:00

ci: set up build and release workflows

This commit is contained in:
NotAShelf 2025-05-17 08:04:48 +03:00
parent c57c82ab71
commit c5ec148001
No known key found for this signature in database
GPG key ID: 29D95B64378DB4BF
3 changed files with 152 additions and 0 deletions

53
.github/workflows/build.yml vendored Normal file
View file

@ -0,0 +1,53 @@
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 }}