Skip to content

Create rust.yml

Create rust.yml #1

Workflow file for this run

name: build
on: [push, pull_request]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
targets: x86_64-unknown-linux-musl,aarch64-unknown-linux-musl
components: rust-src
- uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: lld
version: 1.0
- name: Build x86_64
run: cargo build --target x86_64-unknown-linux-musl --release
- name: Upload x86_64 Building
uses: actions/upload-artifact@v4
with:
name: pwatch-x86_64-unknown-linux-musl
path: target/x86_64-unknown-linux-musl/release/pwatch
- name: Build AArch64
run: cargo build --target aarch64-unknown-linux-musl --release
- name: Upload AArch64 Building
uses: actions/upload-artifact@v4
with:
name: pwatch-aarch64-unknown-linux-musl
path: target/aarch64-unknown-linux-musl/release/pwatch