Do not cross compile for Ubuntu arm target ci

pull/509/head
mcbarton 7 months ago committed by mcbarton
parent 30a64fd513
commit 0016102a37

@ -26,23 +26,7 @@ jobs:
os: ubuntu-24.04
- artifact: arm64-linux
os: ubuntu-24.04
rust_target: aarch64-unknown-linux-gnu
env:
# Don't build a sysroot for this cross-compiled target since it
# would require a host compiler and the sysroot is otherwise
# already built on other CI builders.
WASI_SDK_CI_SKIP_SYSROOT: 1
WASI_SDK_CI_TOOLCHAIN_LLVM_CMAKE_ARGS: >-
-DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc
-DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++
-DCMAKE_CROSSCOMPILING=True
-DCMAKE_CXX_FLAGS=-march=armv8-a
-DCMAKE_SYSTEM_PROCESSOR=arm64
-DCMAKE_SYSTEM_NAME=Linux
-DLLVM_HOST_TRIPLE=aarch64-linux-gnu
-DRUST_TARGET=aarch64-unknown-linux-gnu
os: ubuntu-24.04-arm
- artifact: arm64-macos
os: macos-14
@ -89,6 +73,12 @@ jobs:
mkdir -p '${{ runner.tool_cache }}/ccache'
echo 'CCACHE_DIR=${{ runner.tool_cache }}/ccache' >> $GITHUB_ENV
shell: bash
# Remove and reinstall rust as default install seems broken on Ubuntu arm
- run: rm -rf $HOME/.rustup $HOME/.cargo
if: matrix.os == 'ubuntu-24.04-arm'
- uses: actions-rust-lang/setup-rust-toolchain@v1
if: matrix.os == 'ubuntu-24.04-arm'
# Configure CMake flags for `ci/build.sh` as necessary for each
# matrix entry.

@ -1,8 +1,7 @@
#!/bin/sh
# This is a helper script invoked from CI which will execute the `ci/build.sh`
# script within a docker container. This builds `ci/docker/Dockerfile.common`
# along with the specified `ci/docker/Dockerfile.$x` from the command line.
# script within a docker container. This contain is built using the Dockerfile located at `ci/docker/Dockerfile`
# This container is then used to execute `ci/build.sh`.
set -e
@ -16,17 +15,8 @@ fi
set -x
# Build the base image which the image below can used.
docker build \
--file ci/docker/Dockerfile.common \
--tag wasi-sdk-builder-base \
ci/docker
# Build the container that is going to be used
docker build \
--file ci/docker/Dockerfile.$1 \
--tag wasi-sdk-builder \
ci/docker
# Build the Docker imager
docker build --tag wasi-sdk-builder ci/docker
# Perform the build in `/src`. The current directory is mounted read-write at
# this location as well. To ensure that container-created files are reasonable

@ -19,17 +19,20 @@ RUN apt-get update \
# Install a more recent version of CMake than what 18.04 has since that's what
# LLVM requires.
RUN curl -sSLO https://github.com/Kitware/CMake/releases/download/v3.29.5/cmake-3.29.5-linux-x86_64.tar.gz \
&& tar xf cmake-3.29.5-linux-x86_64.tar.gz \
&& rm cmake-3.29.5-linux-x86_64.tar.gz \
RUN ARCH=$(uname -m) \
&& curl -sSLO https://github.com/Kitware/CMake/releases/download/v3.29.5/cmake-3.29.5-linux-${ARCH}.tar.gz \
&& tar xf cmake-3.29.5-linux-${ARCH}.tar.gz \
&& rm cmake-3.29.5-linux-${ARCH}.tar.gz \
&& mkdir -p /opt \
&& mv cmake-3.29.5-linux-x86_64 /opt/cmake
&& mv cmake-3.29.5-linux-${ARCH} /opt/cmake
ENV PATH /opt/cmake/bin:$PATH
# As with CMake install a later version of Ninja than waht 18.04 has.
RUN curl -sSLO https://github.com/ninja-build/ninja/releases/download/v1.12.1/ninja-linux.zip \
&& unzip ninja-linux.zip \
RUN ARCH=$(uname -m) \
&& if [ "$ARCH" = "aarch64" ]; then SUFFIX=-aarch64; fi \
&& curl -sSL -o ninja.zip https://github.com/ninja-build/ninja/releases/download/v1.12.1/ninja-linux${SUFFIX}.zip \
&& unzip ninja.zip \
&& rm *.zip \
&& mv ninja /opt/cmake/bin

@ -1,11 +0,0 @@
FROM wasi-sdk-builder-base
# Install an extra C++ toolchain which can target arm64 linux.
RUN apt-get install -y g++-aarch64-linux-gnu
# Configure Rust to use this new compiler for linking Rust executables.
ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER aarch64-linux-gnu-gcc
# Note that `.github/workflows/main.yml` sets various bits and bobs of
# configuration and cmake flags that may get passed to the underlying build. For
# example LLVM is instructed to use the toolchain installed above.

@ -1,7 +0,0 @@
FROM wasi-sdk-builder-base
# No extra configuration necessary for x86_64 over what `Dockerfile.common`
# already has.
#
# Note though that `.github/workflows/main.yml` still sets various bits and bobs
# of configuration and cmake flags that may get passed to the underlying build.
Loading…
Cancel
Save