Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: replaced ARCH with uname -m #100

Merged
merged 3 commits into from
Jan 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
FROM ubuntu:22.04
ARG RUST_TOOLCHAIN="1.75.0"
ARG ARCH

# Adding rust binaries to PATH.
ENV PATH="$PATH:/root/.cargo/bin"
Expand Down
13 changes: 8 additions & 5 deletions build_container.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/usr/bin/env bash
set -ex

ARCH=$(uname -m)

apt-get update

# DEBIAN_FRONTEND is set for tzdata.
Expand All @@ -18,10 +20,11 @@ DEBIAN_FRONTEND="noninteractive" apt-get install --no-install-recommends -y \
apt-get clean && rm -rf /var/lib/apt/lists/*

# help musl-gcc find linux headers
cd /usr/include/$ARCH-linux-musl \
&& ln -s ../$ARCH-linux-gnu/asm asm \
&& ln -s ../linux linux \
&& ln -s ../asm-generic asm-generic
pushd /usr/include/$ARCH-linux-musl
ln -s ../$ARCH-linux-gnu/asm asm
ln -s ../linux linux
ln -s ../asm-generic asm-generic
popd

pip3 install --no-cache-dir pytest pexpect boto3 pytest-timeout && apt purge -y python3-pip

Expand All @@ -43,7 +46,7 @@ rustup component add miri rust-src --toolchain nightly
rustup component add llvm-tools-preview # needed for coverage

# Install other rust targets.
rustup target add $(uname -m)-unknown-linux-musl $(uname -m)-unknown-none
rustup target add $ARCH-unknown-linux-musl $ARCH-unknown-none

cargo install cargo-llvm-cov

Expand Down
2 changes: 1 addition & 1 deletion docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ build(){
docker build -t "$new_tag" \
--build-arg GIT_BRANCH="${GIT_BRANCH}" \
--build-arg GIT_COMMIT="${GIT_COMMIT}" \
-f Dockerfile --build-arg ARCH="${ARCH}" .
-f Dockerfile .
echo "Build completed for $new_tag"
}

Expand Down
Loading