Skip to content

Instantly share code, notes, and snippets.

@Thearas
Last active March 27, 2023 16:46
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Thearas/8a656c2e3783ec1a623146f672e21ee3 to your computer and use it in GitHub Desktop.
Save Thearas/8a656c2e3783ec1a623146f672e21ee3 to your computer and use it in GitHub Desktop.
GitHub Action Rust Zero-Dependency Binary
name: Rust
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
jobs:
build-test-runner:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install nightly toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
target: x86_64-unknown-linux-musl
- name: Install Cross
run: cargo install cross
- name: Build
run: cross build --target x86_64-unknown-linux-musl --release -Z unstable-options --out-dir output
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment