Add reproducible build instructions

remotes/1691844314220217825/master
tobtoht 3 years ago
parent 855755fea3
commit fbd6b8eb53
Signed by untrusted user: tobtoht
GPG Key ID: 1CADD27F41F45C3C

@ -10,43 +10,48 @@ Static builds via Docker are done in 3 steps:
2. Creating a base Docker image
3. Using the base image to compile a build
### Windows
### Linux (reproducible)
The docker image for Windows static compiles uses Ubuntu 18.04 and installs [mxe](https://mxe.cc) from [our git](https://git.wownero.com/feather/mxe/src/branch/feather-patch),
which comes with: OpenSSL 1.1.1g, Qt 5.15.0 (OpenGL via mesa). For more information, check the Dockerfile: `Dockerfile_windows`.
The docker image for reproducible Linux static builds uses Ubuntu 16.04 and compiles the required libraries statically
so that the resulting Feather binary is static. For more information, check the Dockerfile: `Dockerfile`.
#### 1. Clone
```bash
git clone --recursive https://git.wownero.com/feather/feather.git
git clone --branch master --recursive https://git.wownero.com/feather/feather.git
cd feather
```
#### 2. Base image
Replace `master` with the desired version tag (e.g. `beta-1`) to build the release binary.
Warning: Building the MXE base image takes up to a hour, so go watch a movie.
#### 2. Base image
```bash
docker build -f Dockerfile_windows --tag feather:win --build-arg THREADS=8 .
docker build --tag feather:linux --build-arg THREADS=4 .
```
Note: You only need to build the base image once.
Building the base image takes a while. You only need to build the base image once.
#### 3. Build
```bash
docker run --rm -it -v /tmp/ccache:/root/.ccache -v /root/feather:/feather -w /feather feather:win /bin/bash -c 'PATH="/mxe/usr/bin/:$PATH" TOR="/mxe/usr/x86_64-w64-mingw32.static/bin/tor.exe" XMRIG="/xmrig/xmrig.exe" make windows-mxe-release -j8'
docker run --rm -it -v $PWD:/feather --env OPENSSL_ROOT_DIR=/usr/local/openssl/ -w /feather feather:linux sh -c 'TOR="/usr/local/tor/bin/tor" XMRIG="/xmrig/xmrig" make release-static -j4'
```
Replace `PATH_TO_FEATHER` with the absolute path to Feather locally.
If you're re-running a build make sure to `rm -rf build/` first.
The resulting binary can be found in `build/bin/feather.exe`.
The resulting binary can be found in `build/bin/feather`.
### Linux
Hashes for tagged commits should match:
The docker image for Linux static compiles uses Ubuntu 18.04 and compiles the required libraries statically so that
the resulting Feather binary is static. It comes with OpenSSL 1.1.1g, Qt 5.15.0 (OpenGL disabled). For more information,
check the Dockerfile: `Dockerfile`.
```
beta-1: d1a52e3bac1abbae4adda1fc88cb2a7a06fbd61085868421897c6a4f3f4eb091 feather
```
### Windows
The docker image for Windows static compiles uses Ubuntu 18.04 and installs [mxe](https://mxe.cc) from [our git](https://git.wownero.com/feather/mxe/src/branch/feather-patch),
which comes with: OpenSSL 1.1.1g, Qt 5.15.0 (OpenGL via mesa). For more information, check the Dockerfile: `Dockerfile_windows`.
#### 1. Clone
@ -57,10 +62,10 @@ cd feather
#### 2. Base image
Warning: Building the base image takes a while, go prepare some dinner.
Warning: Building the MXE base image takes up to a hour, so go watch a movie.
```bash
docker build --tag feather:linux --build-arg THREADS=8 .
docker build -f Dockerfile_windows --tag feather:win --build-arg THREADS=8 .
```
Note: You only need to build the base image once.
@ -68,12 +73,12 @@ Note: You only need to build the base image once.
#### 3. Build
```bash
docker run --env OPENSSL_ROOT_DIR=/usr/local/openssl/ --rm -it -v /tmp/ccache:/root/.ccache -v PATH_TO_FEATHER:/feather -w /feather feather:linux sh -c 'TOR="/usr/local/tor/bin/tor" XMRIG="/xmrig/xmrig" make release-static -j8'
docker run --rm -it -v /tmp/ccache:/root/.ccache -v /root/feather:/feather -w /feather feather:win /bin/bash -c 'PATH="/mxe/usr/bin/:$PATH" TOR="/mxe/usr/x86_64-w64-mingw32.static/bin/tor.exe" XMRIG="/xmrig/xmrig.exe" make windows-mxe-release -j8'
```
Replace `PATH_TO_FEATHER` with the absolute path to Feather locally.
The resulting binary can be found in `build/bin/feather`.
The resulting binary can be found in `build/bin/feather.exe`.
## macOS

Loading…
Cancel
Save