Skip to content

Rust Rewrite

Rust Rewrite #267

Workflow file for this run

name: Test
on:
push:
branches:
- main
tags:
- v*
pull_request:
branches:
- main
env:
CARGO_TERM_COLOR: always
jobs:
check-lock:
name: Check lock
runs-on: ubuntu-latest
steps:
- name: Check lock
run: cargo update --locked
check-version:
name: Check version
if: github.event_name == 'push' && startsWith('refs/tags/', github.ref)
runs-on: ubuntu-latest
steps:
- name: Get cargo version
id: get-cargo-version
shell: bash
run: echo "cargo-version=$(cargo pkgid -p portablemc | awk -F'[#@]' '{print $NF}')" >> $GITHUB_OUTPUT
- name: Match cargo version
shell: bash
run: test "v${{ steps.get-cargo-version.outputs.cargo-version }}" = "${{ github.ref_name }}"
test:
strategy:
fail-fast: false
matrix:
# Refers to
# - https://github.com/actions/runner-images
# - https://github.com/actions/partner-runner-images
image:
- ubuntu-24.04
- macos-13
- macos-15
- windows-2022
- ubuntu-24.04-arm
name: Test ${{ matrix.image }}
runs-on: ${{ matrix.image }}
steps:
- uses: actions/checkout@v4
- name: Build
run: cargo build --workspace --exclude portablemc-py
- name: Test
run: cargo test --workspace --exclude portablemc-py