diff options
Diffstat (limited to '.woodpecker.yaml')
| -rw-r--r-- | .woodpecker.yaml | 73 |
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 |
