﻿
pipeline {
    agent {
        node {
            label 'ubuntu-bss'
        }
    }

    stages {
        stage('Checkout') {
            steps {
                git credentialsId: 'b26cf7c7-9079-434e-8548-4db767ca247d', url: 'https://192.168.0.2/git/rdst/himpp-rs.git'
            }
        }
        stage('Configure') {
            steps {
                sh 'cp .cargo/hi3559av100.toml .cargo/config.toml'
            }
        }
        stage('Clippy') {
            steps {
                sh 'cargo clippy --features hi3559av100'
            }
        }
        stage('Build') {
            steps {
                sh 'cargo build --features hi3559av100'
            }
        }
        stage('Test') {
            steps {
                sh 'cargo test --features hi3559av100 -- --test-threads=1'
            }
        }
    }
}
