From 6b076c1d6fc5b0814d134bacc21fd4519b3db5a2 Mon Sep 17 00:00:00 2001 From: Kirill Date: Mon, 2 Mar 2026 14:10:39 +0300 Subject: [PATCH] Ci: added workflows for github --- .github/workflows/main.yaml | 43 +++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/main.yaml diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml new file mode 100644 index 0000000..0e80219 --- /dev/null +++ b/.github/workflows/main.yaml @@ -0,0 +1,43 @@ +name: Rust CI +on: [push, pull_request] + +env: + CARGO_TERM_COLOR: always + +jobs: + build-and-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: Build + run: cargo build --verbose + + - name: Test + run: cargo test --verbose + + - name: Build documentation + run: cargo doc --no-deps --document-private-items + + - name: Create docs directory + run: mkdir -p ./docs-output && cp -r target/doc/* ./docs-output/ + + - name: Upload documentation as artifact + uses: actions/upload-artifact@v4 # Понижена версия для совместимости с GHES + with: + name: rust-documentation + path: ./docs-output/ + retention-days: 30 + if-no-files-found: error