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

[ci] Use native arm runner instead of cross compiling #509

Merged
merged 3 commits into from
Feb 8, 2025
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
18 changes: 1 addition & 17 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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-22.04-arm

- artifact: arm64-macos
os: macos-14
Expand Down
16 changes: 3 additions & 13 deletions ci/docker-build.sh
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down
15 changes: 9 additions & 6 deletions ci/docker/Dockerfile.common → ci/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
11 changes: 0 additions & 11 deletions ci/docker/Dockerfile.arm64-linux

This file was deleted.

7 changes: 0 additions & 7 deletions ci/docker/Dockerfile.x86_64-linux

This file was deleted.