summaryrefslogtreecommitdiff
path: root/.woodpecker.yaml
diff options
context:
space:
mode:
authorNamilskyy <alive6863@gmail.com>2025-11-30 22:19:02 +0300
committerNamilskyy <alive6863@gmail.com>2025-11-30 22:19:02 +0300
commit1800726c4e55e1a3b00c0160a35c3dde6fa202ff (patch)
treef512cce0e64f66d60663dfe956ed9016ed69b01b /.woodpecker.yaml
parentc508c74a683ff9352d80259f13b882cfef9be9d2 (diff)
Rewritted tests in woodpecker.yaml
Diffstat (limited to '.woodpecker.yaml')
-rw-r--r--.woodpecker.yaml73
1 files changed, 25 insertions, 48 deletions
diff --git a/.woodpecker.yaml b/.woodpecker.yaml
index a0834cb..14d9fd4 100644
--- a/.woodpecker.yaml
+++ b/.woodpecker.yaml
@@ -1,62 +1,39 @@
# Define the sequence of steps for the CI pipeline
steps:
# Step 1: Run tests and checks (formatting, clippy, build, test)
- test-and-check:
- image: ubuntu:latest
+ fmt:
+ image: rust
commands:
- # Install dependencies
- - apt-get update && apt-get install -y curl git
- # Install Rust toolchain
- - curl https://sh.rustup.rs -sSf | sh -s -- -y
- # Source the cargo environment to make rustup/cargo available
- - source "$HOME/.cargo/env"
- # Run formatting check
+ - rustup default stable
- cargo fmt --all -- --check
- # Run clippy linter with warnings as errors
- - cargo clippy --jobs 2 -- -D warnings
- # Build the project in release mode
- - cargo build --verbose --release --jobs 2
- # Run tests
- - cargo test --verbose --jobs 2
when:
branch: main
event: [ push, pull_request ]
- # Step 2: Build for x86_64 architecture
- build-x86_64:
- image: ubuntu:latest
+ clippy:
+ image: rust
commands:
- # Install dependencies
- - apt-get update && apt-get install -y curl git
- # Install Rust toolchain
- - curl https://sh.rustup.rs -sSf | sh -s -- -y
- # Source the cargo environment
- - source "$HOME/.cargo/env"
- # Add the x86_64 target
- - rustup target add x86_64-unknown-linux-gnu
- # Build for x86_64 target
- - cargo build --target x86_64-unknown-linux-gnu --release --verbose --jobs 2
+ - rustup default stable
+ - cargo clippy --jobs 2 -- -D clippy::all
+
when:
branch: main
event: [ push, pull_request ]
- # Step 3: Build for aarch64 architecture
- # build-aarch64:
- # image: ubuntu:latest
- # commands:
- # # Install dependencies including aarch64 cross-compiler
- # - apt-get update && apt-get install -y curl git gcc-aarch64-linux-gnu
- # # Install Rust toolchain
- # - curl https://sh.rustup.rs -sSf | sh -s -- -y
- # # Source the cargo environment
- # - source "$HOME/.cargo/env"
- # # Add the aarch64 target
- # - rustup target add aarch64-unknown-linux-gnu
- # # Configure the linker for aarch64 target in Cargo config
- # - echo '[target.aarch64-unknown-linux-gnu]' >> "$HOME/.cargo/config.toml"
- # - echo 'linker = "aarch64-linux-gnu-gcc"' >> "$HOME/.cargo/config.toml"
- # # Build for aarch64 target
- # - cargo build --target aarch64-unknown-linux-gnu --release --verbose --jobs 2
- # when:
- # branch: main
- # event: [ push, pull_request ] \ No newline at end of file
+ build:
+ image: rust
+ commands:
+ - rustup default stable
+ - cargo build --release --verbose --jobs 2
+ when:
+ branch: main
+ event: [ push, pull_request ]
+
+ test:
+ image: rust
+ commands:
+ - rustup default stable
+ - cargo test --verbose --jobs 2
+ when:
+ branch: main
+ event: [ push, pull_request ] \ No newline at end of file