Skip to content

Commit 0016102

Browse files
committed
Do not cross compile for Ubuntu arm target ci
1 parent 30a64fd commit 0016102

File tree

5 files changed

+19
-54
lines changed

5 files changed

+19
-54
lines changed

.github/workflows/main.yml

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -26,23 +26,7 @@ jobs:
2626
os: ubuntu-24.04
2727

2828
- artifact: arm64-linux
29-
os: ubuntu-24.04
30-
rust_target: aarch64-unknown-linux-gnu
31-
env:
32-
# Don't build a sysroot for this cross-compiled target since it
33-
# would require a host compiler and the sysroot is otherwise
34-
# already built on other CI builders.
35-
WASI_SDK_CI_SKIP_SYSROOT: 1
36-
37-
WASI_SDK_CI_TOOLCHAIN_LLVM_CMAKE_ARGS: >-
38-
-DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc
39-
-DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++
40-
-DCMAKE_CROSSCOMPILING=True
41-
-DCMAKE_CXX_FLAGS=-march=armv8-a
42-
-DCMAKE_SYSTEM_PROCESSOR=arm64
43-
-DCMAKE_SYSTEM_NAME=Linux
44-
-DLLVM_HOST_TRIPLE=aarch64-linux-gnu
45-
-DRUST_TARGET=aarch64-unknown-linux-gnu
29+
os: ubuntu-24.04-arm
4630

4731
- artifact: arm64-macos
4832
os: macos-14
@@ -89,6 +73,12 @@ jobs:
8973
mkdir -p '${{ runner.tool_cache }}/ccache'
9074
echo 'CCACHE_DIR=${{ runner.tool_cache }}/ccache' >> $GITHUB_ENV
9175
shell: bash
76+
# Remove and reinstall rust as default install seems broken on Ubuntu arm
77+
- run: rm -rf $HOME/.rustup $HOME/.cargo
78+
if: matrix.os == 'ubuntu-24.04-arm'
79+
80+
- uses: actions-rust-lang/setup-rust-toolchain@v1
81+
if: matrix.os == 'ubuntu-24.04-arm'
9282

9383
# Configure CMake flags for `ci/build.sh` as necessary for each
9484
# matrix entry.

ci/docker-build.sh

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
#!/bin/sh
22

33
# This is a helper script invoked from CI which will execute the `ci/build.sh`
4-
# script within a docker container. This builds `ci/docker/Dockerfile.common`
5-
# along with the specified `ci/docker/Dockerfile.$x` from the command line.
4+
# script within a docker container. This contain is built using the Dockerfile located at `ci/docker/Dockerfile`
65
# This container is then used to execute `ci/build.sh`.
76

87
set -e
@@ -16,17 +15,8 @@ fi
1615

1716
set -x
1817

19-
# Build the base image which the image below can used.
20-
docker build \
21-
--file ci/docker/Dockerfile.common \
22-
--tag wasi-sdk-builder-base \
23-
ci/docker
24-
25-
# Build the container that is going to be used
26-
docker build \
27-
--file ci/docker/Dockerfile.$1 \
28-
--tag wasi-sdk-builder \
29-
ci/docker
18+
# Build the Docker imager
19+
docker build --tag wasi-sdk-builder ci/docker
3020

3121
# Perform the build in `/src`. The current directory is mounted read-write at
3222
# this location as well. To ensure that container-created files are reasonable

ci/docker/Dockerfile.common renamed to ci/docker/Dockerfile

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,20 @@ RUN apt-get update \
1919

2020
# Install a more recent version of CMake than what 18.04 has since that's what
2121
# LLVM requires.
22-
RUN curl -sSLO https://github.com/Kitware/CMake/releases/download/v3.29.5/cmake-3.29.5-linux-x86_64.tar.gz \
23-
&& tar xf cmake-3.29.5-linux-x86_64.tar.gz \
24-
&& rm cmake-3.29.5-linux-x86_64.tar.gz \
22+
RUN ARCH=$(uname -m) \
23+
&& curl -sSLO https://github.com/Kitware/CMake/releases/download/v3.29.5/cmake-3.29.5-linux-${ARCH}.tar.gz \
24+
&& tar xf cmake-3.29.5-linux-${ARCH}.tar.gz \
25+
&& rm cmake-3.29.5-linux-${ARCH}.tar.gz \
2526
&& mkdir -p /opt \
26-
&& mv cmake-3.29.5-linux-x86_64 /opt/cmake
27+
&& mv cmake-3.29.5-linux-${ARCH} /opt/cmake
2728

2829
ENV PATH /opt/cmake/bin:$PATH
2930

3031
# As with CMake install a later version of Ninja than waht 18.04 has.
31-
RUN curl -sSLO https://github.com/ninja-build/ninja/releases/download/v1.12.1/ninja-linux.zip \
32-
&& unzip ninja-linux.zip \
32+
RUN ARCH=$(uname -m) \
33+
&& if [ "$ARCH" = "aarch64" ]; then SUFFIX=-aarch64; fi \
34+
&& curl -sSL -o ninja.zip https://github.com/ninja-build/ninja/releases/download/v1.12.1/ninja-linux${SUFFIX}.zip \
35+
&& unzip ninja.zip \
3336
&& rm *.zip \
3437
&& mv ninja /opt/cmake/bin
3538

ci/docker/Dockerfile.arm64-linux

Lines changed: 0 additions & 11 deletions
This file was deleted.

ci/docker/Dockerfile.x86_64-linux

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)