-
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.
feat(ci): Build binary that run on anolis aarch64 (#67)
* try to release on aarch64 * fix * correct path * without docker cache and rootles * change the base image * try again * correct protoc link * correct path * fix ring problems * try fix building croaring * cc * rustflags * anolis * full features * hadoop aarch64 * rollback tags
- Loading branch information
Showing
7 changed files
with
81 additions
and
10 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 |
---|---|---|
|
@@ -6,8 +6,36 @@ on: | |
- "v*.*.*" | ||
|
||
jobs: | ||
linux-aarch64: | ||
name: aarch64 | ||
runs-on: ubuntu-22.04-arm | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: prompt/actions-commit-hash@v3 | ||
id: commit | ||
# | ||
# - uses: ScribeMD/[email protected] | ||
# if: steps.cache.outputs.cache-hit != 'true' | ||
# | ||
# - uses: ScribeMD/[email protected] | ||
# if: steps.cache.outputs.cache-hit != 'true' | ||
# with: | ||
# key: docker-centos7-${{ hashFiles('dev/centos7/aarch64/Dockerfile') }} | ||
|
||
- name: Build | ||
run: | | ||
docker compose -f dev/centos7/aarch64/docker-compose.yml up | ||
- name: Upload | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: uniffle-worker-linux-aarch64 | ||
path: target-docker/release/uniffle-worker | ||
|
||
linux-x86_64: | ||
name: Build Snapshot | ||
name: x86_64 | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
|
@@ -22,12 +50,11 @@ jobs: | |
- uses: ScribeMD/[email protected] | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
with: | ||
key: docker-centos7-${{ hashFiles('dev/centos7/Dockerfile') }} | ||
key: docker-centos7-${{ hashFiles('dev/centos7/x86_64/Dockerfile') }} | ||
|
||
- name: Build | ||
run: | | ||
sed -i 's/docker-compose -f/docker compose -f/g' ./release.sh | ||
./release.sh | ||
docker compose -f dev/centos7/x86_64/docker-compose.yml up | ||
- name: Upload | ||
uses: actions/upload-artifact@v4 | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
FROM docker.io/openanolis/anolisos:8 | ||
|
||
RUN yum install -y libzip unzip wget cmake openssl-devel llvm clang-devel clang krb5-workstation git gcc gcc-c++ | ||
|
||
# install rust nightly toolchain | ||
RUN curl https://sh.rustup.rs > /rustup-init | ||
RUN chmod +x /rustup-init | ||
# Note: Specify the correct target for aarch64 | ||
RUN /rustup-init -y --default-toolchain nightly-2024-10-01-aarch64-unknown-linux-gnu | ||
|
||
# install java | ||
RUN yum install -y java-1.8.0-openjdk java-1.8.0-openjdk-devel | ||
# Note: Update JAVA_HOME path for aarch64 | ||
RUN echo 'export JAVA_HOME="/usr/lib/jvm/java-1.8.0-openjdk"' >> ~/.bashrc | ||
|
||
# install protoc | ||
# Note: Download the aarch64 version of protoc | ||
RUN wget -O /protobuf-21.7-linux-aarch64.zip https://github.com/protocolbuffers/protobuf/releases/download/v21.7/protoc-21.7-linux-aarch_64.zip | ||
RUN mkdir /protobuf-bin && (cd /protobuf-bin && unzip /protobuf-21.7-linux-aarch64.zip) | ||
RUN echo 'export PATH="$PATH:/protobuf-bin/bin"' >> ~/.bashrc | ||
|
||
# attach libjvm.so | ||
# Note: Update the library path for aarch64 | ||
RUN echo 'export LD_LIBRARY_PATH=${JAVA_HOME}/jre/lib/aarch64/server:${LD_LIBRARY_PATH}' >> ~/.bashrc | ||
|
||
# setup hadoop env | ||
RUN curl -LsSf https://dlcdn.apache.org/hadoop/common/hadoop-3.3.5/hadoop-3.3.5-aarch64.tar.gz | tar zxf - -C /root | ||
RUN echo "export HADOOP_HOME=/root/hadoop-3.3.5" >> ~/.bashrc | ||
RUN echo "export CLASSPATH=$(${HADOOP_HOME}/bin/hadoop classpath --glob)" >> ~/.bashrc | ||
RUN echo "export HDRS_NAMENODE=default" >> ~/.bashrc | ||
RUN echo "export HDRS_WORKDIR=/tmp/hdrs/" >> ~/.bashrc | ||
|
||
RUN echo "export RUST_BACKTRACE=1" >> ~/.bashrc |
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,13 @@ | ||
version: "3" | ||
|
||
services: | ||
build-release: | ||
build: ../aarch64 | ||
volumes: | ||
- ~/.m2:/root/.m2:rw | ||
- ~/.sbt:/root/.sbt:rw | ||
- ~/.cargo/git:/root/.cargo/git:rw | ||
- ~/.cargo/registry:/root/.cargo/registry:rw | ||
- ./../../../:/R1:rw | ||
- ./../../../target-docker:/R1/target:rw | ||
command: "bash -c 'source ~/.bashrc && cd /R1 && cargo build --features hdrs,logforth,memory-prof --release'" |
File renamed without changes.
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 was deleted.
Oops, something went wrong.