Skip to content

Commit

Permalink
ci: simplify Rust builds
Browse files Browse the repository at this point in the history
  • Loading branch information
lidavidm committed Dec 27, 2024
1 parent 63b3176 commit 72334d4
Showing 1 changed file with 24 additions and 21 deletions.
45 changes: 24 additions & 21 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,10 @@ permissions:

defaults:
run:
shell: bash
working-directory: rust
shell: bash -l {0}

jobs:
native-unix:
uses: ./.github/workflows/native-unix.yml
permissions:
contents: read
id-token: write

rust:
needs: [native-unix]
strategy:
matrix:
# TODO(alexandreyc): add `windows-latest`
Expand Down Expand Up @@ -91,16 +83,15 @@ jobs:
curl -L "https://github.com/protocolbuffers/protobuf/releases/download/v28.3/protoc-28.3-osx-universal_binary.zip" -o protoc.zip
unzip "protoc.zip" -d $HOME/.local
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
- uses: actions/download-artifact@v4
with:
name: driver-manager-${{ matrix.os }}
path: "~"
- name: Untar artifacts
- name: Build C++/Go drivers
shell: bash -l {0}
run: |
cd
mkdir -p ${{ github.workspace }}/build
tar xvf ~/local.tgz -C ${{ github.workspace }}/build --strip-components=1
mkdir -p build
mkdir -p local
pushd build
cmake -DADBC_USE_ASAN=OFF -DADBC_USE_UBSAN=OFF -DCMAKE_BUILD_TYPE=Release -DADBC_BUILD_TESTS=OFF -DCMAKE_PREFIX_PATH=../local ../c
cmake --build . --target install
popd
- name: Set dynamic linker path
if: matrix.os == 'ubuntu-latest'
run: |
Expand All @@ -116,14 +107,26 @@ jobs:
- name: Set search dir for Snowflake Go lib
run: echo "ADBC_SNOWFLAKE_GO_LIB_DIR=${{ github.workspace }}/build/lib" >> "$GITHUB_ENV"
- name: Clippy
run: cargo clippy --workspace --all-targets --all-features -- -Dwarnings
run: |
pushd rust
cargo clippy --workspace --all-targets --all-features -- -Dwarnings
popd
- name: Test
run: cargo test --workspace --all-targets --all-features
run: |
pushd rust
cargo test --workspace --all-targets --all-features
popd
# env:
# ADBC_SNOWFLAKE_TESTS: 1
# ADBC_SNOWFLAKE_URI: ${{ secrets.SNOWFLAKE_URI }}
# ADBC_SNOWFLAKE_SQL_DB: ADBC_TESTING
- name: Doctests
run: cargo test --workspace --doc --all-features
run: |
pushd rust
cargo test --workspace --doc --all-features
popd
- name: Check docs
run: cargo doc --workspace --all-features
run: |
pushd rust
cargo doc --workspace --all-features
popd

0 comments on commit 72334d4

Please sign in to comment.