Detailed deploy progress #2673
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
name: Build binaries (x86-64) | |
on: | |
push: | |
branches: | |
- master | |
- release/* | |
pull_request: | |
branches: | |
- master | |
- release/* | |
env: | |
rust_stable: 1.71.1 | |
jobs: | |
build: | |
name: Build binaries (x86-64) | |
env: | |
# `-D warnings` means any warnings emitted will cause build to fail | |
RUSTFLAGS: "-D warnings -C opt-level=z -C target-cpu=x86-64 -C debuginfo=1" | |
X86_64_PC_WINDOWS_MSVC_OPENSSL_DIR: c:/vcpkg/installed/x64-windows | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
- name: Musl | |
run: | | |
sudo apt-get install musl musl-tools | |
musl-gcc -v | |
- name: Install Rust ${{ env.rust_stable }} | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: ${{ env.rust_stable }} | |
components: rustfmt, clippy | |
target: x86_64-unknown-linux-musl | |
override: true | |
- name: Set build target for cache key | |
run: echo "CARGO_BUILD_TARGET=x86_64-unknown-linux-musl" >> $GITHUB_ENV | |
- name: Setup cache | |
uses: Swatinem/rust-cache@v2 | |
with: | |
save-if: ${{ github.ref == 'refs/heads/master' }} | |
- name: Check lockfile | |
uses: actions-rs/cargo@v1 | |
with: | |
command: tree | |
args: --locked | |
- name: Install openssl ( Windows only ) | |
if: runner.os == 'Windows' | |
run: | | |
vcpkg install openssl:x64-windows openssl:x64-windows-static | |
vcpkg list | |
vcpkg integrate install | |
- name: Build binaries | |
run: | | |
cargo build --features static-openssl --target x86_64-unknown-linux-musl -p yagna -p ya-exe-unit -p gftp -p golemsp -p ya-provider | |
- name: Copy binaries | |
shell: bash | |
run: | | |
mkdir build | |
if [ "$RUNNER_OS" == "Linux" ]; then | |
cp target/x86_64-unknown-linux-musl/debug/{yagna,ya-provider,exe-unit,golemsp,gftp} build | |
strip -x build/* | |
elif [ "$RUNNER_OS" == "macOS" ]; then | |
cp target/debug/{yagna,gftp} build | |
strip -x build/* | |
elif [ "$RUNNER_OS" == "Windows" ]; then | |
cp target/debug/{yagna,gftp}.exe build | |
else | |
echo "$RUNNER_OS not supported" | |
exit 1 | |
fi | |
- name: Upload binaries | |
uses: actions/upload-artifact@v1 | |
with: | |
name: Yagna ${{ runner.os }} | |
path: build |