moonup 0.5.2

Manage multiple MoonBit installations
Documentation
name: CI
on:
  workflow_dispatch:
  pull_request:
    paths-ignore:
      - ".vscode"
      - "*.md"
  push:
    branches:
      - main
permissions: {}
jobs:
  # format and lint check
  ci_style_check:
    name: Code Style Check
    runs-on: ubuntu-latest
    env:
      SCCACHE_GHA_ENABLED: true
      RUSTC_WRAPPER: sccache
    steps:
      - name: Checkout Source
        uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3

      - name: Rust Setup
        run: rustup component add clippy rustfmt

      - name: Cache Setup
        uses: mozilla-actions/sccache-action@9e7fa8a12102821edf02ca5dbea1acd0f89a2696 # v0.0.10

      - name: Format Check
        run: cargo fmt -- --check

      - name: Clippy Check
        run: cargo clippy

  # tests and build
  ci_test_build:
    name: Test Build
    needs: ci_style_check
    strategy:
      fail-fast: false
      matrix:
        include:
          - {
              name: "Windows",
              target: x86_64-pc-windows-msvc,
              os: windows-latest,
              zip: moonup-x86_64-pc-windows-msvc.zip,
            }
          - {
              name: "Linux x86_64",
              target: x86_64-unknown-linux-gnu,
              os: ubuntu-latest,
              zip: moonup-x86_64-unknown-linux-gnu.tar.gz,
            }
          - {
              name: "Linux Aarch64",
              target: aarch64-unknown-linux-gnu,
              os: ubuntu-24.04-arm,
              zip: moonup-aarch64-unknown-linux-gnu.tar.gz,
            }
          - {
              name: "macOS ARM",
              target: aarch64-apple-darwin,
              os: macos-latest,
              zip: moonup-aarch64-apple-darwin.tar.gz,
            }

    runs-on: ${{ matrix.os }}
    env:
      SCCACHE_GHA_ENABLED: true
      RUSTC_WRAPPER: sccache
    steps:
      - name: Checkout Source
        uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3

      - name: Cache Setup
        uses: mozilla-actions/sccache-action@9e7fa8a12102821edf02ca5dbea1acd0f89a2696 # v0.0.10
        with:
          version: "v0.12.0"

      - name: Tests Check
        if: matrix.os != 'ubuntu-latest' || matrix.os != 'macos-15-intel'
        run: cargo test

      - name: Dev Build
        run: cargo build --locked --target ${{ matrix.target }}