diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 1bab15d..c637c93 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -12,9 +12,7 @@ env: jobs: build: - runs-on: self-hosted - steps: - uses: actions/checkout@v3 - name: Install dependencies @@ -31,6 +29,12 @@ jobs: sudo ninja -C build install sudo ldconfig rm -rf dpdk-src + - name: Install minimal nightly with clippy and rustfmt + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + components: rustfmt, clippy - name: Build run: cargo build --verbose - name: Run tests diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 61f99f4..0000000 --- a/Dockerfile +++ /dev/null @@ -1,37 +0,0 @@ -FROM debian:latest - -ENV RTE_SDK=/usr/local/share/dpdk - -RUN echo "APT last updated: 2023/05/01" - -RUN apt-get update -y && apt-get dist-upgrade -y && apt-get autoremove -y && apt-get autoclean -y -RUN apt-get install -y linux-headers-amd64 -#RUN apt-get install -y linux-headers-$(uname -r)-all -RUN apt-get install -y build-essential libnuma-dev git meson python3-pyelftools -RUN apt-get install -y curl -RUN apt-get install -y libclang-dev clang llvm-dev - -RUN git clone -b v22.11 "http://dpdk.org/git/dpdk" /dpdk - -WORKDIR /dpdk - -RUN meson build -RUN ninja -C build -RUN ninja -C build install -RUN ldconfig - -WORKDIR / -RUN rm -rf /dpdk - -# For rustup -ENV USER_NAME jenkins -RUN useradd -ms /bin/bash $USER_NAME - -# Beginning of rust user install -RUN su -c "curl -f --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | bash -s -- -y --profile default" - $USER_NAME -# End of rust user install - -ADD ./rust-toolchain / -RUN chmod 444 /rust-toolchain -RUN su -c "rustup toolchain install `cat /rust-toolchain | tr -d ' \n'`" - $USER_NAME -RUN rm /rust-toolchain diff --git a/Jenkinsfile b/Jenkinsfile deleted file mode 100644 index 0a0e6ea..0000000 --- a/Jenkinsfile +++ /dev/null @@ -1,37 +0,0 @@ -pipeline { - agent { dockerfile true } - environment { - CARGO="$HOME/.cargo/bin/cargo --locked" - RUSTC="$HOME/.cargo/bin/rustc" - } - stages { - stage ("Version") { - steps { - sh "$CARGO --version" - sh "$RUSTC --version" - } - } - stage ("Build") { - steps { - sh "$CARGO build" - } - } - stage ("Check") { - steps { - sh "$CARGO check" - sh "$CARGO fmt --all -- --check" - sh "$CARGO clippy -- -D warnings" - } - } - stage ("Test (common)") { - steps { - sh "$CARGO test --lib" - } - } - stage ("Test (dpdk-sys)") { - steps { - sh "$CARGO run -p rust-dpdk-sys -- --no-pci --no-huge" - } - } - } -}