From 38088c28363cbb46d9748310c58e0ff4742749ef Mon Sep 17 00:00:00 2001 From: Wenyu Zhao Date: Thu, 14 Mar 2024 00:00:47 +1100 Subject: [PATCH] Update CI --- .github/workflows/ci.yml | 38 -------------------------------------- .github/workflows/rust.yml | 25 +++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 38 deletions(-) delete mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/rust.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 9e6bb20..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,38 +0,0 @@ -on: [push, pull_request] - -name: CI - -jobs: - checks: - runs-on: ubuntu-latest - steps: - - name: Install Ubuntu Packages - run: | - sudo apt update - sudo apt install -y g++ clang iputils-ping python3 - - name: Checkout MallocKit Workspace - uses: actions/checkout@v2 - - name: Install Rust Toolchain (Nightly) - uses: actions-rs/toolchain@v1 - with: - override: true - components: rustfmt - - name: Style Checks - uses: actions-rs/cargo@v1 - with: - command: fmt - args: -- --check - - name: Lint Checks - uses: actions-rs/cargo@v1 - with: - command: clippy - args: -- -D warnings - - name: Test (Debug) - uses: actions-rs/cargo@v1 - with: - command: test - - name: Test (Release) - uses: actions-rs/cargo@v1 - with: - command: test - args: --release diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml new file mode 100644 index 0000000..e55ec69 --- /dev/null +++ b/.github/workflows/rust.yml @@ -0,0 +1,25 @@ +name: Rust + +on: [push, pull_request] + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Build + run: cargo build + - name: Run tests + run: cargo test + - name: Run fmt checks + run: cargo fmt -- --check + - name: Run lints + run: cargo clippy -- -D warnings + - name: Test (Debug) + run: cargo test + - name: Test (Release) + run: cargo test --release