This repository has been archived by the owner on Jul 2, 2024. It is now read-only.
Optimize Upgrade
#17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Rust | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
env: | |
CARGO_TERM_COLOR: always | |
RUST_BACKTRACE: 1 | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Rust | |
uses: dtolnay/rust-toolchain@stable | |
- name: Clippy | |
run: cargo clippy | |
- name: Test | |
run: cargo test | |
build: | |
name: Build | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
build: [linux-x86_64, windows-x86_64, macos-x86_64, macos-aarch64] | |
include: | |
- build: linux-x86_64 | |
os: ubuntu-latest | |
- build: windows-x86_64 | |
os: windows-latest | |
- build: macos-x86_64 | |
os: macos-13 | |
- build: macos-aarch64 | |
os: macos-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Rust | |
uses: dtolnay/rust-toolchain@stable | |
- name: Build | |
run: cargo build --package mrepo-cli --release | |
- name: Upload | |
if: success() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: mrepo-${{ matrix.build }} | |
path: target/release/mrepo* | |
- name: Build (git) | |
run: cargo build --package mrepo-cli --release --features git |