Ci: get ci from 1 job to 5
This commit is contained in:
1 parent
6b076c1d6f
commit
31b406db8e
2 files changed
+114
-4
No files matched your search
@@ -5,7 +5,27 @@ env:
|
||||
CARGO_TERM_COLOR: always
|
||||
|
||||
jobs:
|
||||
build-and-test:
|
||||
check:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Rust
|
||||
run: |
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal
|
||||
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: Verify Rust installation
|
||||
run: |
|
||||
rustc --version
|
||||
cargo --version
|
||||
|
||||
- name: Build
|
||||
run: cargo check --verbose
|
||||
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
@@ -24,9 +44,43 @@ jobs:
|
||||
|
||||
- name: Build
|
||||
run: cargo build --verbose
|
||||
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Rust
|
||||
run: |
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal
|
||||
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: Verify Rust installation
|
||||
run: |
|
||||
rustc --version
|
||||
cargo --version
|
||||
|
||||
- name: Test
|
||||
run: cargo test --verbose
|
||||
|
||||
docs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Rust
|
||||
run: |
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal
|
||||
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: Verify Rust installation
|
||||
run: |
|
||||
rustc --version
|
||||
cargo --version
|
||||
|
||||
- name: Build documentation
|
||||
run: cargo doc --no-deps --document-private-items
|
||||
@@ -35,9 +89,10 @@ jobs:
|
||||
run: mkdir -p ./docs-output && cp -r target/doc/* ./docs-output/
|
||||
|
||||
- name: Upload documentation as artifact
|
||||
uses: actions/upload-artifact@v3 # Понижена версия для совместимости с GHES
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: rust-documentation
|
||||
path: ./docs-output/
|
||||
retention-days: 30
|
||||
if-no-files-found: error
|
||||
|
||||
Reference in new issue
Block a user