WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 34 additions & 11 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,42 @@ name: Continuous Integration

on:
push:
branches:
- master
branches: [ master ]
pull_request:
branches:
- master
branches: [ master ]
workflow_dispatch: # Allows manual triggering from UI

# Security: Limit token permissions to read-only
permissions:
contents: read

jobs:
ubuntu:
runs-on: ubuntu-latest
test:
name: Test Suite (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# Test on all major platforms to ensure true cross-platform compatibility
os: [ubuntu-latest, macos-latest, windows-latest]

steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
- name: Checkout Repository
uses: actions/checkout@v4

- name: Install Rust Toolchain
# Replaces the deprecated actions-rs/toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: clippy,rustfmt
- run: ./ci.sh
components: clippy, rustfmt

- name: Rust Cache
# CRITICAL OPTIMIZATION: Caches cargo registry and build artifacts
uses: Swatinem/rust-cache@v2

- name: Run CI Script
# Using 'bash' ensures the script runs even on Windows (via Git Bash)
shell: bash
run: |
chmod +x ci.sh
./ci.sh