63 lines
1.7 KiB
YAML
63 lines
1.7 KiB
YAML
name: Rust
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
build_type:
|
|
description: 'Build configuration'
|
|
required: true
|
|
default: 'release'
|
|
type: choice
|
|
options:
|
|
- debug
|
|
- release
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
build-m1:
|
|
runs-on: macos-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: arduino/setup-protoc@v3
|
|
with:
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
targets: aarch64-apple-darwin
|
|
- run: cargo build --manifest-path nyash_client/Cargo.toml --target aarch64-apple-darwin --release
|
|
|
|
- name: Upload Binary
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: nyash-client-aarch64-apple-darwin
|
|
path: nyash_client/target/aarch64-apple-darwin/release/nyash-client
|
|
|
|
build-freebsd:
|
|
name: Release - FreeBSD-x86_64
|
|
strategy:
|
|
matrix:
|
|
platform:
|
|
- os-name: FreeBSD-x86_64
|
|
runs-on: ubuntu-24.04
|
|
target: x86_64-unknown-freebsd
|
|
runs-on: ${{ matrix.platform.runs-on }}
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
- name: Build binary
|
|
uses: houseabsolute/actions-rust-cross@v1
|
|
with:
|
|
command: build
|
|
target: x86_64-unknown-freebsd
|
|
args: "--locked --release --manifest-path nyash_server/Cargo.toml"
|
|
strip: true
|
|
name: Build binary
|
|
|
|
- name: Upload Server Binary
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: nyash-server-x86_64-unknown-freebsd
|
|
path: nyash_server/target/x86_64-unknown-freebsd/release/nyash-server
|