Skip to content

Commit

Permalink
build(ci): update Rust workflow to use protoc feature, using vendored…
Browse files Browse the repository at this point in the history
… protoc

Also test with and without vendored protoc
  • Loading branch information
wackywendell committed Jan 7, 2025
1 parent ea04f06 commit 47d5088
Showing 1 changed file with 12 additions and 28 deletions.
40 changes: 12 additions & 28 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: arduino/setup-protoc@v3
with:
version: "28.3"
# avoid rate-limiting
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Check
Expand All @@ -35,19 +30,23 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: arduino/setup-protoc@v3
with:
version: "28.3"
# avoid rate-limiting
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: dtolnay/rust-toolchain@stable
- uses: actions/setup-python@v5
with:
python-version: "3.x"
if: ${{ matrix.os == 'ubuntu-latest' }}
- uses: Swatinem/rust-cache@v2
- name: Run unit tests
run: cargo test --all-features
- name: Run unit tests with vendored protoc
run: cargo test --all-features # Uses vendored protoc; not compatible with windows
if: ${{ matrix.os != 'windows-latest' }}
- uses: arduino/setup-protoc@v3 # Download and 'install' protoc
with:
version: "28.3"
# avoid rate-limiting
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Run unit tests with system protoc
run: cargo test
if: ${{ matrix.os != 'windows-latest' }}
- name: Install test runner dependencies
run: python3 -m pip install --upgrade pip protobuf pyyaml click
if: ${{ matrix.os == 'ubuntu-latest' }}
Expand Down Expand Up @@ -77,11 +76,6 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: arduino/setup-protoc@v3
with:
version: "28.3"
# avoid rate-limiting
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
Expand All @@ -96,11 +90,6 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: arduino/setup-protoc@v3
with:
version: "28.3"
# avoid rate-limiting
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Doc
Expand All @@ -116,11 +105,6 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: arduino/setup-protoc@v3
with:
version: "28.3"
# avoid rate-limiting
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: dtolnay/rust-toolchain@stable
- name: Fetch Substrait submodule tags
working-directory: substrait
Expand All @@ -139,4 +123,4 @@ jobs:
working-directory: rs
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: cargo publish --allow-dirty
run: cargo publish --allow-dirty --features protoc

0 comments on commit 47d5088

Please sign in to comment.