From 53fce83bc3a290ea5ad3afbe42500dd895cd0b13 Mon Sep 17 00:00:00 2001 From: Shawn Wang Date: Sat, 21 Dec 2024 16:55:22 +0800 Subject: [PATCH] add github action as ci --- .github/workflows/ci.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..c2f9950 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,25 @@ +name: Cargo Build & Test + +on: + push: + pull_request: + +env: + CARGO_TERM_COLOR: always + +jobs: + build_and_test: + name: Rust project - latest + runs-on: ubuntu-latest + strategy: + matrix: + toolchain: + - stable + # - beta + # - nightly + steps: + - uses: actions/checkout@v4 + - run: sudo apt update && sudo apt install -y libchewing libxkbcommon-dev + - run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} + - run: cargo build --verbose + - run: cargo test --verbose