-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CI] Make nightly builds of CPack for amd64 and aarch64 (#494)
- Loading branch information
Showing
6 changed files
with
98 additions
and
5 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
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 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
echo "##[section] Building Treelite for amd64..." | ||
tests/ci_build/ci_build.sh ubuntu20 tests/ci_build/build_via_cmake.sh | ||
|
||
echo "##[section] Packing CPack for amd64..." | ||
tests/ci_build/ci_build.sh ubuntu20 bash -c "cd build/ && cpack -G TGZ" | ||
for tgz in build/treelite-*-Linux.tar.gz | ||
do | ||
mv -v "${tgz}" "${tgz%-Linux.tar.gz}+${COMMIT_ID}-Linux-amd64.tar.gz" | ||
done | ||
|
||
echo "##[section]Uploading CPack for amd64..." | ||
python -m awscli s3 cp build/*.tar.gz s3://treelite-cpack/ --acl public-read || true | ||
|
||
rm -rf build/ | ||
|
||
echo "##[section] Building Treelite for aarch64..." | ||
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes | ||
tests/ci_build/ci_build.sh ubuntu20_aarch64 tests/ci_build/build_via_cmake.sh | ||
|
||
echo "##[section] Packing CPack for aarch64..." | ||
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes | ||
tests/ci_build/ci_build.sh ubuntu20_aarch64 bash -c "cd build/ && cpack -G TGZ" | ||
for tgz in build/treelite-*-Linux.tar.gz | ||
do | ||
mv -v "${tgz}" "${tgz%-Linux.tar.gz}+${COMMIT_ID}-Linux-aarch64.tar.gz" | ||
done | ||
|
||
echo "##[section]Uploading CPack for aarch64..." | ||
python -m awscli s3 cp build/*.tar.gz s3://treelite-cpack/ --acl public-read || true |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
FROM ubuntu:20.04 | ||
LABEL maintainer "DMLC" | ||
|
||
ENV GOSU_VERSION 1.13 | ||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
RUN \ | ||
apt-get update && \ | ||
apt-get install -y build-essential git wget unzip tar cmake ninja-build | ||
|
||
# Install lightweight sudo (not bound to TTY) | ||
RUN set -ex; \ | ||
wget -nv -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-amd64" && \ | ||
chmod +x /usr/local/bin/gosu && \ | ||
gosu nobody true | ||
|
||
# Default entry-point to use if running locally | ||
# It will preserve attributes of created files | ||
COPY entrypoint.sh /scripts/ | ||
|
||
WORKDIR /workspace | ||
ENTRYPOINT ["/scripts/entrypoint.sh"] |
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,22 @@ | ||
FROM arm64v8/ubuntu:20.04 | ||
LABEL maintainer "DMLC" | ||
|
||
ENV GOSU_VERSION 1.13 | ||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
RUN \ | ||
apt-get update && \ | ||
apt-get install -y build-essential git wget unzip tar cmake ninja-build | ||
|
||
# Install lightweight sudo (not bound to TTY) | ||
RUN set -ex; \ | ||
wget -nv -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-arm64" && \ | ||
chmod +x /usr/local/bin/gosu && \ | ||
gosu nobody true | ||
|
||
# Default entry-point to use if running locally | ||
# It will preserve attributes of created files | ||
COPY entrypoint.sh /scripts/ | ||
|
||
WORKDIR /workspace | ||
ENTRYPOINT ["/scripts/entrypoint.sh"] |