mirror of
https://github.com/veeso/termscp.git
synced 2026-09-26 05:51:20 -07:00
ci: unify os workflows into one
This commit is contained in:
@@ -0,0 +1,67 @@
|
|||||||
|
name: CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
paths-ignore:
|
||||||
|
- "*.md"
|
||||||
|
- "./site/**/*"
|
||||||
|
push:
|
||||||
|
branches: [ main ]
|
||||||
|
paths-ignore:
|
||||||
|
- "*.md"
|
||||||
|
- "./site/**/*"
|
||||||
|
|
||||||
|
env:
|
||||||
|
CARGO_TERM_COLOR: always
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build (${{ matrix.os }})
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- name: Install Linux dependencies
|
||||||
|
if: runner.os == 'Linux'
|
||||||
|
run: sudo apt update && sudo apt install -y libdbus-1-dev libsmbclient-dev
|
||||||
|
- name: Install macOS dependencies
|
||||||
|
if: runner.os == 'macOS'
|
||||||
|
run: |
|
||||||
|
brew update
|
||||||
|
brew install \
|
||||||
|
pkg-config \
|
||||||
|
samba
|
||||||
|
brew link --force samba
|
||||||
|
- name: Install nightly toolchain
|
||||||
|
if: runner.os == 'Linux'
|
||||||
|
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
|
||||||
|
with:
|
||||||
|
toolchain: nightly
|
||||||
|
components: rustfmt
|
||||||
|
- name: Format
|
||||||
|
if: runner.os == 'Linux'
|
||||||
|
run: cargo +nightly fmt --all -- --check
|
||||||
|
- name: Install stable toolchain
|
||||||
|
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
components: clippy
|
||||||
|
- name: Build
|
||||||
|
if: runner.os != 'Linux'
|
||||||
|
run: cargo build
|
||||||
|
- name: Run tests (Linux)
|
||||||
|
if: runner.os == 'Linux'
|
||||||
|
run: cargo test --no-default-features --features github-actions --no-fail-fast
|
||||||
|
- name: Run tests
|
||||||
|
if: runner.os != 'Linux'
|
||||||
|
run: cargo test --verbose --features github-actions
|
||||||
|
- name: Clippy
|
||||||
|
run: cargo clippy -- -Dwarnings
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
name: Linux
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
paths-ignore:
|
|
||||||
- "*.md"
|
|
||||||
- "./site/**/*"
|
|
||||||
push:
|
|
||||||
branches: [ main ]
|
|
||||||
paths-ignore:
|
|
||||||
- "*.md"
|
|
||||||
- "./site/**/*"
|
|
||||||
|
|
||||||
env:
|
|
||||||
CARGO_TERM_COLOR: always
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-linux:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
- name: Install dependencies
|
|
||||||
run: sudo apt update && sudo apt install -y libdbus-1-dev libsmbclient-dev
|
|
||||||
- uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
|
|
||||||
with:
|
|
||||||
toolchain: nightly
|
|
||||||
components: rustfmt, clippy
|
|
||||||
- name: Format
|
|
||||||
run: cargo +nightly fmt --all -- --check
|
|
||||||
- uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
components: rustfmt, clippy
|
|
||||||
- name: Run tests
|
|
||||||
run: cargo test --no-default-features --features github-actions --no-fail-fast
|
|
||||||
- name: Clippy
|
|
||||||
run: cargo clippy -- -Dwarnings
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
name: MacOS
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
paths-ignore:
|
|
||||||
- "*.md"
|
|
||||||
- "./site/**/*"
|
|
||||||
push:
|
|
||||||
branches: [ main ]
|
|
||||||
paths-ignore:
|
|
||||||
- "*.md"
|
|
||||||
- "./site/**/*"
|
|
||||||
|
|
||||||
env:
|
|
||||||
CARGO_TERM_COLOR: always
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-macos:
|
|
||||||
runs-on: macos-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
- uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
components: rustfmt, clippy
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
brew update
|
|
||||||
brew install \
|
|
||||||
pkg-config \
|
|
||||||
samba
|
|
||||||
brew link --force samba
|
|
||||||
- name: Build
|
|
||||||
run: cargo build
|
|
||||||
- name: Run tests
|
|
||||||
run: cargo test --verbose --features github-actions
|
|
||||||
- name: Clippy
|
|
||||||
run: cargo clippy -- -Dwarnings
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
name: Windows
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
paths-ignore:
|
|
||||||
- "*.md"
|
|
||||||
- "./site/**/*"
|
|
||||||
push:
|
|
||||||
branches: [ main ]
|
|
||||||
paths-ignore:
|
|
||||||
- "*.md"
|
|
||||||
- "./site/**/*"
|
|
||||||
|
|
||||||
env:
|
|
||||||
CARGO_TERM_COLOR: always
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-windows:
|
|
||||||
runs-on: windows-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
- uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
components: rustfmt, clippy
|
|
||||||
- name: Build
|
|
||||||
run: cargo build
|
|
||||||
- name: Run tests
|
|
||||||
run: cargo test --verbose --features github-actions
|
|
||||||
- name: Clippy
|
|
||||||
run: cargo clippy -- -Dwarnings
|
|
||||||
@@ -26,45 +26,11 @@
|
|||||||
<p align="center">Developed by <a href="https://veeso.me/" target="_blank">@veeso</a></p>
|
<p align="center">Developed by <a href="https://veeso.me/" target="_blank">@veeso</a></p>
|
||||||
<p align="center">Current version: 1.0.0 2026-04-18</p>
|
<p align="center">Current version: 1.0.0 2026-04-18</p>
|
||||||
|
|
||||||
<p align="center">
|
[](https://opensource.org/licenses/MIT)
|
||||||
<a href="https://opensource.org/licenses/MIT"
|
[](https://github.com/veeso/termscp/stargazers)
|
||||||
><img
|
[](https://crates.io/crates/termscp)
|
||||||
src="https://img.shields.io/crates/l/termscp.svg?logo=rust"
|
[](https://crates.io/crates/termscp)
|
||||||
alt="License-MIT"
|
[](https://github.com/veeso/termscp/actions/workflows/ci.yml)
|
||||||
/></a>
|
|
||||||
<a href="https://github.com/veeso/termscp/stargazers"
|
|
||||||
><img
|
|
||||||
src="https://img.shields.io/github/stars/veeso/termscp?style=flat&logo=github"
|
|
||||||
alt="Repo stars"
|
|
||||||
/></a>
|
|
||||||
<a href="https://crates.io/crates/termscp"
|
|
||||||
><img
|
|
||||||
src="https://img.shields.io/crates/d/termscp.svg?logo=rust"
|
|
||||||
alt="Downloads counter"
|
|
||||||
/></a>
|
|
||||||
<a href="https://crates.io/crates/termscp"
|
|
||||||
><img
|
|
||||||
src="https://img.shields.io/crates/v/termscp.svg?logo=rust"
|
|
||||||
alt="Latest version"
|
|
||||||
/></a>
|
|
||||||
</p>
|
|
||||||
<p align="center">
|
|
||||||
<a href="https://github.com/veeso/termscp/actions/workflows/linux.yml"
|
|
||||||
><img
|
|
||||||
src="https://github.com/veeso/termscp/workflows/Linux/badge.svg?logo=github"
|
|
||||||
alt="Linux CI"
|
|
||||||
/></a>
|
|
||||||
<a href="https://github.com/veeso/termscp/actions/workflows/macos.yml"
|
|
||||||
><img
|
|
||||||
src="https://github.com/veeso/termscp/workflows/MacOS/badge.svg?logo=github"
|
|
||||||
alt="MacOS CI"
|
|
||||||
/></a>
|
|
||||||
<a href="https://github.com/veeso/termscp/actions/workflows/windows.yml"
|
|
||||||
><img
|
|
||||||
src="https://github.com/veeso/termscp/workflows/Windows/badge.svg?logo=github"
|
|
||||||
alt="Windows CI"
|
|
||||||
/></a>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
+5
-44
@@ -26,50 +26,11 @@
|
|||||||
<p align="center">由 <a href="https://veeso.me/" target="_blank">@veeso</a> 开发</p>
|
<p align="center">由 <a href="https://veeso.me/" target="_blank">@veeso</a> 开发</p>
|
||||||
<p align="center">当前版本: 1.0.0 2026-04-18</p>
|
<p align="center">当前版本: 1.0.0 2026-04-18</p>
|
||||||
|
|
||||||
<p align="center">
|
[](https://opensource.org/licenses/MIT)
|
||||||
<a href="https://opensource.org/licenses/MIT"
|
[](https://github.com/veeso/termscp/stargazers)
|
||||||
><img
|
[](https://crates.io/crates/termscp)
|
||||||
src="https://img.shields.io/badge/License-MIT-teal.svg"
|
[](https://crates.io/crates/termscp)
|
||||||
alt="License-MIT"
|
[](https://github.com/veeso/termscp/actions/workflows/ci.yml)
|
||||||
/></a>
|
|
||||||
<a href="https://github.com/veeso/termscp/stargazers"
|
|
||||||
><img
|
|
||||||
src="https://img.shields.io/github/stars/veeso/termscp?style=flat"
|
|
||||||
alt="Repo stars"
|
|
||||||
/></a>
|
|
||||||
<a href="https://crates.io/crates/termscp"
|
|
||||||
><img
|
|
||||||
src="https://img.shields.io/crates/d/termscp.svg"
|
|
||||||
alt="Downloads counter"
|
|
||||||
/></a>
|
|
||||||
<a href="https://crates.io/crates/termscp"
|
|
||||||
><img
|
|
||||||
src="https://img.shields.io/crates/v/termscp.svg"
|
|
||||||
alt="Latest version"
|
|
||||||
/></a>
|
|
||||||
<a href="https://ko-fi.com/veeso">
|
|
||||||
<img
|
|
||||||
src="https://img.shields.io/badge/donate-ko--fi-red"
|
|
||||||
alt="Ko-fi"
|
|
||||||
/></a>
|
|
||||||
</p>
|
|
||||||
<p align="center">
|
|
||||||
<a href="https://github.com/veeso/termscp/actions"
|
|
||||||
><img
|
|
||||||
src="https://github.com/veeso/termscp/workflows/Linux/badge.svg"
|
|
||||||
alt="Linux CI"
|
|
||||||
/></a>
|
|
||||||
<a href="https://github.com/veeso/termscp/actions"
|
|
||||||
><img
|
|
||||||
src="https://github.com/veeso/termscp/workflows/MacOS/badge.svg"
|
|
||||||
alt="MacOS CI"
|
|
||||||
/></a>
|
|
||||||
<a href="https://github.com/veeso/termscp/actions"
|
|
||||||
><img
|
|
||||||
src="https://github.com/veeso/termscp/workflows/Windows/badge.svg"
|
|
||||||
alt="Windows CI"
|
|
||||||
/></a>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user