fix: Compilation error on default JDK8 #150
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} | |
cancel-in-progress: true | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Format | |
run: cargo fmt --all -- --check | |
- name: Clippy | |
run: cargo clippy --all-features --all-targets -- -D warnings | |
unit: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
# We should support windows, but so far we can't build hadoop on it. | |
# Visit [Tracking issue of windows support](https://github.com/Xuanwo/hdfs-sys/issues/17) for more details. | |
os: [ ubuntu-latest, macos-latest, windows-latest ] | |
feature: [ | |
"hdfs_2_6", | |
"hdfs_2_10", | |
"hdfs_3_3", | |
] | |
# We set JAVA_HOME, JAVA_HOME_8_X64 and JAVA_HOME_8_ARM64, | |
# to ensure compilation works out of the box for all targets | |
# A user can manually specify JAVA_HOME to use their own distribution | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
id: setup_java | |
with: | |
distribution: 'corretto' | |
java-version: '8' | |
- name: Build | |
run: cargo build --features ${{ matrix.feature }},vendored | |
env: | |
JAVA_HOME: "" | |
JAVA_HOME_8_X64: "" | |
JAVA_HOME_8_ARM64: "" | |
- name: Test | |
run: cargo test --features ${{ matrix.feature }},vendored -- --nocapture | |
env: | |
RUST_LOG: DEBUG | |
RUST_BACKTRACE: full | |
JAVA_HOME: "" | |
JAVA_HOME_8_X64: "" | |
JAVA_HOME_8_ARM64: "" |