Skip to content

Workaround for lack of command in runtime only for wasmtime #2471

Workaround for lack of command in runtime only for wasmtime

Workaround for lack of command in runtime only for wasmtime #2471

Workflow file for this run

name: Build binaries (x86-64)
on:
push:
branches:
- master
- release/*
pull_request:
branches:
- master
- release/*
env:
rust_stable: 1.68.2
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
(cd core/gftp && cargo build --bin gftp -p gftp --features bin --target x86_64-unknown-linux-musl)
(cd golem_cli && cargo build --bin golemsp -p golemsp --target x86_64-unknown-linux-musl)
(cd agent/provider && cargo build --bin ya-provider -p ya-provider --target x86_64-unknown-linux-musl)
(cd exe-unit && cargo build --bin exe-unit -p ya-exe-unit --features openssl/vendored --target x86_64-unknown-linux-musl)
- 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