diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1e686e902..70212148a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -59,6 +59,44 @@ jobs: run: | # the build and test steps would update Cargo.lock if it is out of date test -z "$(git status --porcelain Cargo.lock)" || (echo "Cargo.lock has uncommitted changes!" && exit 1) + build_and_test-linux-riscv64: + runs-on: ubuntu-24.04-riscv + steps: + - name: Checkout repository + uses: actions/checkout@v6 + - name: Install Rust + run: | + export PATH="$HOME/.cargo/bin:$PATH" + if command -v rustup &> /dev/null; then + rustup install 1.89.0 + rustup default 1.89.0 + else + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain 1.89.0 + export PATH="$HOME/.cargo/bin:$PATH" + fi + echo "$HOME/.cargo/bin" >> "$GITHUB_PATH" + rustc --version + - name: Install system dependencies + run: | + sudo apt-get update + sudo apt-get install -y libssl-dev pkg-config git-lfs cmake + git lfs install + - name: Cache Rust artifacts + uses: actions/cache@v4 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target/ + key: xet-riscv64-cargo-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + xet-riscv64-cargo- + - name: Build and Test + run: | + cargo test --verbose --no-fail-fast + - name: Build and Test hf_xet + run: | + cd hf_xet && cargo test --verbose --no-fail-fast build_and_test-win: runs-on: windows-latest steps: