-
-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
99 additions
and
13 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash | ||
# Builds the docker image which is used to build the linux core executable | ||
|
||
docker build -t hydrabuild . |
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,7 @@ | ||
#!/bin/bash | ||
#Is run in the docker image to actually build the linux executable | ||
|
||
cd /nzbhydra2 || exit | ||
mvn --batch-mode clean install -pl \!org.nzbhydra:linux-release,\!org.nzbhydra:windows-release,\!org.nzbhydra:generic-release -DskipTests -T 1C | ||
mvn -pl org.nzbhydra:core -Pnative clean native:compile -DskipTests | ||
/upx-4.0.1-amd64_linux/upx -3 core/target/core |
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,18 @@ | ||
#!/bin/bash | ||
|
||
# Prepares and runs the docker container to build the core executable | ||
|
||
if [[ ! -d "${PWD}/core" ]] ; then | ||
echo "${PWD}/core not found " | ||
return | ||
fi | ||
|
||
echo rsync -rvu --exclude "target" --exclude "bower_components" --exclude "node_modules" --exclude ".git" --exclude ".idea" --exclude "results" --exclude "*.db" --exclude "venv*" ${PWD}/ ~/nzbhydra2/ | ||
|
||
docker run -v ~/nzbhydra2/:/nzbhydra2:rw -v ~/.m2/repository:/root/.m2/repository:rw --rm hydrabuild:latest | ||
if [[ ! -f ~/nzbhydra2/core/target/core ]] ; then | ||
echo "core executable does not exist" | ||
else | ||
cp ~/nzbhydra2/core/target/core ${PWD}/core/target/ | ||
cp ~/nzbhydra2/core/target/core ${PWD}/releases/linux-release/include/ | ||
fi |
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,31 @@ | ||
# alpine doesn't work because we need libgc for the native image | ||
FROM ubuntu:16.04 | ||
# See https://octopus.com/blog/using-ubuntu-docker-image | ||
RUN echo 'APT::Install-Suggests "0";' >> /etc/apt/apt.conf.d/00-docker | ||
RUN echo 'APT::Install-Recommends "0";' >> /etc/apt/apt.conf.d/00-docker | ||
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y zip unzip wget curl libfreetype6 libfreetype6-dev build-essential ca-certificates | ||
RUN wget -nv --no-check-certificate https://dlcdn.apache.org/maven/maven-3/3.8.7/binaries/apache-maven-3.8.7-bin.tar.gz -P /tmp | ||
|
||
RUN tar xf /tmp/apache-maven-*.tar.gz -C /opt | ||
RUN ln -s /opt/apache-maven-3.8.7 /opt/maven | ||
ENV M2_HOME=/opt/maven | ||
ENV MAVEN_HOME=/opt/maven | ||
ENV PATH=${M2_HOME}/bin:${PATH} | ||
|
||
RUN wget -nv --no-check-certificate https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.3.0/graalvm-ce-java17-linux-amd64-22.3.0.tar.gz | ||
RUN tar xzf graalvm-ce-java17-linux-amd64-22.3.0.tar.gz -C / | ||
ENV PATH=/graalvm-ce-java17-22.3.0/bin/:$PATH | ||
ENV JAVA_HOME=/graalvm-ce-java17-22.3.0 | ||
|
||
RUN wget -nv --no-check-certificate https://github.com/upx/upx/releases/download/v4.0.1/upx-4.0.1-amd64_linux.tar.xz | ||
RUN tar -xf upx-4.0.1-amd64_linux.tar.xz | ||
ENV PATH=/tmp/upx-4.0.1-amd64_linux/:$PATH | ||
|
||
ENV HYDRA_NATIVE_BUILD=true | ||
|
||
COPY buildInContainer.sh / | ||
|
||
ENTRYPOINT /buildInContainer.sh | ||
|
||
# To debug docker run --rm -it --entrypoint bash hydrabuild | ||
# or for a running container docker exec -it <container-name-or-id> bash |
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,12 @@ | ||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) | ||
|
||
if [[ -f core ]] ; then | ||
cd .. | ||
fi | ||
if [[ -f core ]] ; then | ||
echo "core folder not found" | ||
exit 1 | ||
fi | ||
|
||
rsync -rvu --exclude "target" --exclude "bower_components" --exclude "node_modules" --exclude ".git" --exclude ".idea" --exclude "results" --exclude "*.db" --exclude "venv*" . ~/nzbhydra2/ | ||
docker run -v ~/.m2/repository:/root/.m2/repository:rw -v ~/nzbhydra2:/nzbhydra2 -it --rm vegardit/graalvm-maven:22.3.0-java17 bash |
This file was deleted.
Oops, something went wrong.
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