Skip to content

Commit

Permalink
Fix coverage and mac jobs -- still need to fix windows
Browse files Browse the repository at this point in the history
  • Loading branch information
alamb committed Aug 2, 2022
1 parent ed9fc56 commit 0544d4e
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 32 deletions.
74 changes: 45 additions & 29 deletions .github/workflows/rust.yml
Expand Up @@ -28,33 +28,56 @@ on:
jobs:

# Check workspace wide compile and test with default features for
# mac and windows
windows-and-macos:
name: Test on ${{ matrix.os }} Rust ${{ matrix.rust }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ windows-latest, macos-latest ]
rust: [ stable ]
# mac
macos:
name: Test on Mac
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Install protoc with brew
run: |
brew install protobuf
- name: Setup Rust toolchain
run: |
rustup toolchain install ${{ matrix.rust }} --no-self-update
rustup default ${{ matrix.rust }}
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
rustup toolchain install stable --no-self-update
rustup default stable
- name: Run tests
shell: bash
run: |
# do not produce debug symbols to keep memory usage down
export RUSTFLAGS="-C debuginfo=0"
cargo test
# Commented out while fixed in https://github.com/apache/arrow-rs/issues/2279
#
# # Check workspace wide compile and test with default features for
# # windows
# windows:
# name: Test on Windows
# runs-on: windows-latest
# steps:
# - uses: actions/checkout@v2
# with:
# submodules: true
# - name: Install protoc with NuGet
# run: |
# nuget.exe install Google.Protobuf -Version 3.21.4 -OutputDirectory d:\\proto
# nuget.exe install Grpc.Tools -Version 2.47.0 -OutputDirectory d:\\proto
# - name: Setup Rust toolchain
# run: |
# rustup toolchain install stable --no-self-update
# rustup default stable
# - name: Run tests
# shell: bash
# run: |
# # do not produce debug symbols to keep memory usage down
# export RUSTFLAGS="-C debuginfo=0"
# # This is where protoc is installed
# export PATH=$PATH:/d/proto/Grpc.Tools.2.47.0/tools/windows_x86
# cargo test


# Run cargo fmt for all crates
lint:
Expand All @@ -75,27 +98,20 @@ jobs:
coverage:
name: Coverage
runs-on: ubuntu-latest
strategy:
matrix:
arch: [ amd64 ]
rust: [ stable ]
container:
image: amd64/rust
env:
# Disable full debug symbol generation to speed up CI build and keep memory down
# "1" means line tables only, which is useful for panic tracebacks.
RUSTFLAGS: "-C debuginfo=1"
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Setup Rust toolchain
run: |
rustup toolchain install ${{ matrix.rust }}
rustup default ${{ matrix.rust }}
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Cache Cargo
uses: actions/cache@v3
uses: ./.github/actions/setup-builder
with:
path: /home/runner/.cargo
key: cargo-coverage-cache3-
rust-version: stable
- name: Run coverage
run: |
rustup toolchain install stable
Expand Down
4 changes: 1 addition & 3 deletions arrow/src/util/decimal.rs
Expand Up @@ -267,9 +267,7 @@ fn singed_cmp_le_bytes(left: &[u8], right: &[u8]) -> Ordering {
// right is positive value
Ordering::Less
}
false => {
Ordering::Greater
}
false => Ordering::Greater,
};
}
for i in 0..len {
Expand Down

0 comments on commit 0544d4e

Please sign in to comment.