Skip to content

cargo +nightly fmt

cargo +nightly fmt #2

Workflow file for this run

name: Rust
on:
push:
branches: ["main"]
tags:
- "v*"
pull_request:
branches: ["main"]
env:
CARGO_TERM_COLOR: always
jobs:
linux-build-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install latest rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
override: true
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --all-features --verbose
mac-build-test:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --all-features --verbose
windows-build-test:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --all-features --verbose
create-release:
runs-on: ubuntu-latest
if: startsWith(github.event.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v4
- uses: taiki-e/create-gh-release-action@v1
with:
changelog: CHANGELOG.md
token: ${{ secrets.GITHUB_TOKEN }}
upload-assets:
if: startsWith(github.event.ref, 'refs/tags/v')
needs: create-release
strategy:
matrix:
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
- target: x86_64-apple-darwin
os: macos-latest
- target: x86_64-pc-windows-msvc
os: windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: taiki-e/upload-rust-binary-action@v1
with:
bin: mpm
target: ${{ matrix.target }}
tar: unix
zip: windows
token: ${{ secrets.CARGO_REGISTRY_TOKEN }}