[go: nahoru, domu]

Skip to content

Commit

Permalink
fix statically linked build
Browse files Browse the repository at this point in the history
Signed-off-by: Rajat Jindal <rajatjindal83@gmail.com>
  • Loading branch information
rajatjindal committed Nov 8, 2023
1 parent 7bbc35b commit 40d3912
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/actions/spin-ci-dependencies/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ inputs:
type: bool
rust-version:
description: 'Rust version to setup'
default: '1.71'
default: '1.73'
required: false
type: string

Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
if: failure()
uses: andymckay/cancel-action@0.2

## This is separated out to remove e2e-tests dependency on windows/mac builds
# This is separated out to remove e2e-tests dependency on windows/mac builds
build-rust-ubuntu:
name: Build Spin Ubuntu
runs-on: ubuntu-latest
Expand Down Expand Up @@ -87,10 +87,11 @@ jobs:
rust-cache: true

- name: Cargo Build
run: cross build --target x86_64-unknown-linux-musl --workspace --release --all-targets --features openssl/vendored
run: cross build --verbose --target x86_64-unknown-linux-musl --workspace --release --all-targets --features openssl/vendored
env:
CARGO_INCREMENTAL: 0
BUILD_SPIN_EXAMPLES: 0
RUSTFLAGS: '-C target-feature=+crt-static -C link-self-contained=yes'

- name: "Archive executable artifact"
uses: actions/upload-artifact@v3
Expand All @@ -112,11 +113,11 @@ jobs:
rust-cache: true

- name: Cargo Build
run: cross build --target aarch64-unknown-linux-musl --workspace --release --all-targets --features openssl/vendored
run: cross build --workspace --verbose --release --target aarch64-unknown-linux-musl --features openssl/vendored --features all-tests
env:
CARGO_INCREMENTAL: 0
BUILD_SPIN_EXAMPLES: 0
RUSTFLAGS: '-C target-feature=+fp16'
RUSTFLAGS: '-C target-feature=+fp16 -C target-feature=+crt-static -C link-self-contained=yes'

- name: "Archive executable artifact"
uses: actions/upload-artifact@v3
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ which = "4.2.5"
e2e-testing = { path = "crates/e2e-testing" }

[build-dependencies]
cargo-target-dep = { git = "https://github.com/fermyon/cargo-target-dep", rev = "b7b1989fe0984c0f7c4966398304c6538e52fe49" }
cargo-target-dep = { git = "https://github.com/fermyon/cargo-target-dep", rev = "482f269eceb7b1a7e8fc618bf8c082dd24979cf1" }
vergen = { version = "^8.2.1", default-features = false, features = [
"build",
"git",
Expand Down
5 changes: 5 additions & 0 deletions cross/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,8 @@ ARG CROSS_BASE_IMAGE
FROM $CROSS_BASE_IMAGE

RUN --mount=type=bind,source=/,target=/polyfill /polyfill/polyfill.sh

RUN apt-get -y update && \
apt-get install -y pkg-config protobuf-compiler


0 comments on commit 40d3912

Please sign in to comment.