forked from lakesoul-io/LakeSoul
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add cross build for native io (lakesoul-io#241)
* add cross build github action Signed-off-by: chenxu <chenxu@dmetasoul.com> * enable hdfs on all platform Signed-off-by: chenxu <chenxu@dmetasoul.com> * fix memory address passing on windows Signed-off-by: chenxu <chenxu@dmetasoul.com> * fix hadoop user default behavior Signed-off-by: chenxu <chenxu@dmetasoul.com> --------- Signed-off-by: chenxu <chenxu@dmetasoul.com> Co-authored-by: chenxu <chenxu@dmetasoul.com>
- Loading branch information
1 parent
27c6c59
commit 2ef557c
Showing
11 changed files
with
375 additions
and
182 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
name: Cross build | ||
|
||
on: push | ||
|
||
jobs: | ||
build-linux-x86_64: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
lfs: true | ||
- name: Set up JDK 8 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '8' | ||
distribution: 'temurin' | ||
cache: maven | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
use-cross: true | ||
toolchain: nightly | ||
command: build | ||
args: '--manifest-path native-io/Cargo.toml --target x86_64-unknown-linux-gnu --release --all-features' | ||
- uses: actions/upload-artifact@master | ||
with: | ||
name: lakesoul-nativeio-x86_64-unknown-linux-gnu | ||
path: ./native-io/target/x86_64-unknown-linux-gnu/release/liblakesoul_io_c.so | ||
|
||
build-windows-x86_64: | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
lfs: true | ||
- name: Set up JDK 8 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '8' | ||
distribution: 'temurin' | ||
cache: maven | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
toolchain: nightly | ||
command: build | ||
args: '--manifest-path native-io/Cargo.toml --release --all-features' | ||
- uses: actions/upload-artifact@master | ||
with: | ||
name: lakesoul-nativeio-x86_64-pc-windows-msvc | ||
path: ./native-io/target/release/lakesoul_io_c.dll | ||
|
||
build-macos-x86_64: | ||
runs-on: macos-latest | ||
steps: | ||
- name: Install automake | ||
run: brew install automake | ||
- uses: actions/checkout@v3 | ||
with: | ||
lfs: true | ||
- name: Set up JDK 8 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '8' | ||
distribution: 'temurin' | ||
cache: maven | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
toolchain: nightly | ||
command: build | ||
args: '--manifest-path native-io/Cargo.toml --release --all-features' | ||
- uses: actions/upload-artifact@master | ||
with: | ||
name: lakesoul-nativeio-x86_64-apple-darwin | ||
path: ./native-io/target/release/liblakesoul_io_c.dylib | ||
|
||
build-maven-package: | ||
runs-on: ubuntu-latest | ||
needs: [build-linux-x86_64, build-windows-x86_64, build-macos-x86_64] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
lfs: true | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: lakesoul-nativeio-x86_64-unknown-linux-gnu | ||
path: ./native-io/target/release/ | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: lakesoul-nativeio-x86_64-apple-darwin | ||
path: ./native-io/target/release/ | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: lakesoul-nativeio-x86_64-pc-windows-msvc | ||
path: ./native-io/target/release/ | ||
- name: Set up JDK 8 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '8' | ||
distribution: 'temurin' | ||
cache: maven | ||
- name: Build with Maven | ||
run: | | ||
MAVEN_OPTS="-Xmx4000m" mvn -q -B package --file pom.xml -Pcross-build -DskipTests -Dmaven.test.skip=true | ||
- name: Upload Package | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: maven-package-upload | ||
path: | | ||
lakesoul-spark/target/lakesoul-spark-*.jar | ||
lakesoul-flink/target/lakesoul-flink-*.jar | ||
retention-days: 3 | ||
if-no-files-found: error |
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
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
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
Oops, something went wrong.