From b066a0468e39b728056f81a91f8e8df04d69ce7d Mon Sep 17 00:00:00 2001 From: Evan Date: Tue, 25 Nov 2025 10:56:50 +0100 Subject: [PATCH 1/4] fix ci build fail use pinned python versions fix ci build fail use pinned python versions use rust build caches --- .github/workflows/ci.yml | 58 ++++++++++++++++++++++++++++++++-------- 1 file changed, 47 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 69625f8..f84a8bd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -54,17 +54,37 @@ jobs: os: - ubuntu-latest - macos-latest + python: + - 3.11 + - 3.12 + - 3.13 steps: - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python }} + - name: Install protoc run: | - if [ "$RUNNER_OS" == "Linux" ]; then + if [ "$RUNNER_OS" = "Linux" ]; then sudo apt-get update && sudo apt-get install -y protobuf-compiler - elif [ "$RUNNER_OS" == "macOS" ]; then + else brew install protobuf fi + + - name: Rust Cache + uses: actions/cache@v4 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: build-${{ runner.os }}-${{ matrix.python }}-${{ hashFiles('**/Cargo.lock') }} + - name: Build - run: cargo build + run: cargo build --workspace --all-targets test: runs-on: ${{ matrix.os }} @@ -73,26 +93,42 @@ jobs: os: - ubuntu-latest - macos-latest + python: ["3.11", "3.12", "3.13"] steps: - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python }} + - name: Install protoc run: | - if [ "$RUNNER_OS" == "Linux" ]; then + if [ "$RUNNER_OS" = "Linux" ]; then sudo apt-get update && sudo apt-get install -y protobuf-compiler - elif [ "$RUNNER_OS" == "macOS" ]; then + else brew install protobuf fi + + - name: Rust Cache + uses: actions/cache@v4 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: test-${{ runner.os }}-${{ matrix.python }}-${{ hashFiles('**/Cargo.lock') }} + - name: Unit Test run: cargo test --all-targets --workspace env: RUST_LOG: DEBUG RUST_BACKTRACE: full - - name: Integration Test - # only run IT in linux since no docker in macos by default + + - name: Integration Test (Linux only) + if: runner.os == 'Linux' run: | - if [ "$RUNNER_OS" == "Linux" ]; then - RUST_TEST_THREADS=1 cargo test --features integration_tests --all-targets --workspace -- --nocapture - fi + RUST_TEST_THREADS=1 cargo test --features integration_tests --all-targets --workspace -- --nocapture env: RUST_LOG: DEBUG - RUST_BACKTRACE: full \ No newline at end of file + RUST_BACKTRACE: full From 9e558857e1ed682d8c5b26b6cdaf84bfc117e8a1 Mon Sep 17 00:00:00 2001 From: Evan Date: Tue, 25 Nov 2025 12:11:46 +0100 Subject: [PATCH 2/4] Delete .github/.DS_Store --- .github/.DS_Store | Bin 6148 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 .github/.DS_Store diff --git a/.github/.DS_Store b/.github/.DS_Store deleted file mode 100644 index 7adc49df07876bc71be2a10c09a4f4452106ddaf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHKQA+|r5S~@b6DfQs@bREmAuAK2m+R7ppddP{hYGtxsiW&w^vnkl?z#R@zog&O z%PUs5zR@h88s8 z1WxCo+3_D4ptD$i!>YK=9b4$y4D{mF8 z8}D9@yu?q21K00gQLiOs6ijVDxCpzWc4_TU#)%)s-M&f)J6#O9z6|4z9Jz8BcLplg z(*st)Dzr=G@p!jdt=P4CZBntvd)s91)F+dIwZ5^rf7X789%K2ei52)CRI*}l3NL8< zxW^~2A4f92!?@`j(_BVofEi#07LfsS*IC6y+#K(T8DIu}#Q@z8HY%ZGFx9B84s7W2 zk;Zd`BxuuHg3vbT7)&+d2#V0Dh&ol6Cx+1J=(kOrV=&dI(?O_}aUQd>FfSCLR!6_B z!a+D1xn%~JfmsH!x?7_9-~9glKbyooW`G%3C`lBun8o12 From 2dac17a04adef7ece2fb49368009193766594158 Mon Sep 17 00:00:00 2001 From: Evan Date: Tue, 25 Nov 2025 12:24:38 +0100 Subject: [PATCH 3/4] Simplify Python version declaration in CI config --- .github/workflows/ci.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f84a8bd..19e3373 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -54,10 +54,7 @@ jobs: os: - ubuntu-latest - macos-latest - python: - - 3.11 - - 3.12 - - 3.13 + python: ["3.11", "3.12", "3.13"] steps: - uses: actions/checkout@v4 @@ -70,7 +67,7 @@ jobs: run: | if [ "$RUNNER_OS" = "Linux" ]; then sudo apt-get update && sudo apt-get install -y protobuf-compiler - else + elif [ "$RUNNER_OS" == "macOS" ]; then brew install protobuf fi @@ -106,7 +103,7 @@ jobs: run: | if [ "$RUNNER_OS" = "Linux" ]; then sudo apt-get update && sudo apt-get install -y protobuf-compiler - else + elif [ "$RUNNER_OS" == "macOS" ]; then brew install protobuf fi From a473f05037ad5cf7dfaceb3c40db7d9e1e80732e Mon Sep 17 00:00:00 2001 From: Evan Date: Tue, 25 Nov 2025 12:42:00 +0100 Subject: [PATCH 4/4] Fix comparison operator for macOS in CI config --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 19e3373..cf7a126 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -67,7 +67,7 @@ jobs: run: | if [ "$RUNNER_OS" = "Linux" ]; then sudo apt-get update && sudo apt-get install -y protobuf-compiler - elif [ "$RUNNER_OS" == "macOS" ]; then + elif [ "$RUNNER_OS" = "macOS" ]; then brew install protobuf fi @@ -103,7 +103,7 @@ jobs: run: | if [ "$RUNNER_OS" = "Linux" ]; then sudo apt-get update && sudo apt-get install -y protobuf-compiler - elif [ "$RUNNER_OS" == "macOS" ]; then + elif [ "$RUNNER_OS" = "macOS" ]; then brew install protobuf fi