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

Move aarch64 from QEMU to native aarch64 machines #4589

Merged
merged 1 commit into from
Jan 19, 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
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
FROM ubuntu:24.04

# Keep annoying tzdata prompt from coming up
# Thanks cmake!
ENV DEBIAN_FRONTEND=noninteractive
ENV DEBCONF_NONINTERACTIVE_SEEN=true

RUN apt-get update \
&& apt-get install -y --no-install-recommends \
apt-transport-https \
build-essential \
clang \
cmake \
git \
libclang-rt-dev \
lldb \
make \
xz-utils \
zlib1g-dev \
curl \
python3-pip \
wget \
systemtap-sdt-dev \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get -y autoremove --purge \
&& apt-get -y clean \
&& pip3 install --break-system-packages cloudsmith-cli

# needed for GitHub actions
RUN git config --global --add safe.directory /__w/ponyc/ponyc

# add user pony in order to not run tests as root
RUN useradd -u 1001 -ms /bin/bash -d /home/pony -g root pony
USER pony
WORKDIR /home/pony
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

set -o errexit
set -o nounset

#
# *** You should already be logged in to GHCR when you run this ***
#

NAME="ghcr.io/ponylang/ponyc-ci-aarch64-unknown-linux-ubuntu24.04-builder"
TODAY=$(date +%Y%m%d)
DOCKERFILE_DIR="$(dirname "$0")"
BUILDER="aarch64-builder-$(date +%s)"

docker buildx create --use --name "${BUILDER}"
docker buildx build --platform linux/arm64 --pull -t "${NAME}:${TODAY}" --output "type=image,push=true" "${DOCKERFILE_DIR}"
docker buildx stop "${BUILDER}"
31 changes: 0 additions & 31 deletions .ci-dockerfiles/cross-aarch64/Dockerfile

This file was deleted.

15 changes: 0 additions & 15 deletions .ci-dockerfiles/cross-aarch64/build-and-push.bash

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/lint-action-workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ jobs:
- name: Checkout
uses: actions/[email protected]
- name: Check workflow files
uses: docker://ghcr.io/ponylang/shared-docker-ci-actionlint:20241206
uses: docker://ghcr.io/ponylang/shared-docker-ci-actionlint:20250119
with:
args: -color
20 changes: 8 additions & 12 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -280,13 +280,13 @@ jobs:
run: make test-cross-ci config=release PONYPATH=../armv7-a/release cross_triple=arm-unknown-linux-gnueabihf cross_arch=armv7-a cross_cpu=cortex-a9 cross_linker=arm-linux-gnueabihf-gcc cross_runner="qemu-arm-static -cpu cortex-a9 -L /usr/local/arm-linux-gnueabihf/libc"

aarch64-linux:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04-arm

strategy:
fail-fast: false
matrix:
include:
- image: ghcr.io/ponylang/ponyc-ci-cross-aarch64:20240427
- image: ghcr.io/ponylang/ponyc-ci-aarch64-unknown-linux-ubuntu24.04-builder:20250118
name: aarch64 Linux glibc

name: ${{ matrix.name }}
Expand All @@ -313,20 +313,16 @@ jobs:
key: libs-${{ matrix.image }}-${{ hashFiles('Makefile', 'CMakeLists.txt', 'lib/CMakeLists.txt') }}
- name: Build Debug Runtime
run: |
make configure config=debug
make configure arch=armv8-a config=debug
make build config=debug
- name: Build Debug Cross-Compiled Runtime
run: make cross-libponyrt config=debug CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++ arch=armv8-a cross_cflags="-march=armv8-a -mtune=cortex-a53" cross_lflags="-O3;-march=aarch64"
- name: Test with Debug Cross-Compiled Runtime
run: make test-cross-ci config=debug PONYPATH=../armv8-a/debug cross_triple=aarch64-unknown-linux-gnu cross_arch=armv8-a cross_cpu=cortex-a53 cross_linker=aarch64-linux-gnu-gcc cross_runner="qemu-aarch64-static -cpu cortex-a53 -L /usr/local/aarch64-linux-gnu/libc"
- name: Test with Debug Runtime
run: make test-ci config=debug usedebugger=lldb
- name: Build Release Runtime
run: |
make configure config=release
make configure arch=armv8-a config=release
make build config=release
- name: Build Release Cross-Compiled Runtime
run: make cross-libponyrt config=release CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++ arch=armv8-a cross_cflags="-march=armv8-a -mtune=cortex-a53" cross_lflags="-O3;-march=aarch64"
- name: Test with Release Cross-Compiled Runtime
run: make test-cross-ci config=release PONYPATH=../armv8-a/release cross_triple=aarch64-unknown-linux-gnu cross_arch=armv8-a cross_cpu=cortex-a53 cross_linker=aarch64-linux-gnu-gcc cross_runner="qemu-aarch64-static -cpu cortex-a53 -L /usr/local/aarch64-linux-gnu/libc"
- name: Test with Release Runtime
run: make test-ci config=release usedebugger=lldb

x86_64-macos:
runs-on: macos-13
Expand Down
27 changes: 10 additions & 17 deletions .github/workflows/stress-test-runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,31 +90,26 @@ jobs:
content: ${{ github.server_url}}/${{ github.repository }}/actions/runs/${{ github.run_id }}failed.

aarch64-linux:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04-arm

strategy:
fail-fast: false
matrix:
include:
# these don't currently use a debugger as cross compilation hasn't
# been set up to do 'run in debugger'
- image: ghcr.io/ponylang/ponyc-ci-cross-aarch64:20240427
- image: ponyc-ci-aarch64-unknown-linux-ubuntu24.04-builder:20250118
name: aarch64-unknown-linux-ubuntu24.04 [release]
target: test-cross-stress-release
- image: ghcr.io/ponylang/ponyc-ci-cross-aarch64:20240427
target: test-stress-release
debugger: lldb
- image: ponyc-ci-aarch64-unknown-linux-ubuntu24.04-builder:20250118
name: aarch64-unknown-linux-ubuntu24.04 [debug]
target: test-cross-stress-debug
- image: ghcr.io/ponylang/ponyc-ci-cross-aarch64:20240427
name: aarch64-unknown-linux-ubuntu24.04 [cd] [release]
target: test-cross-stress-with-cd-release
- image: ghcr.io/ponylang/ponyc-ci-cross-aarch64:20240427
name: aarch64-unknown-linux-ubuntu24.04 [cd] [debug]
target: test-cross-stress-with-cd-debug
target: test-stress-debug
debugger: lldb

name: ${{ matrix.name }}
container:
image: ${{ matrix.image }}
options: --user pony --cap-add=SYS_PTRACE --security-opt seccomp=unconfined

steps:
- name: Checkout
uses: actions/[email protected]
Expand All @@ -135,12 +130,10 @@ jobs:
key: libs-${{ matrix.image }}-${{ hashFiles('Makefile', 'CMakeLists.txt', 'lib/CMakeLists.txt') }}
- name: Build Debug Runtime
run: |
make configure config=debug
make configure arch=armv8-a config=debug
make build config=debug
- name: Build Debug Cross-Compiled Runtime
run: make cross-libponyrt config=debug CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++ arch=armv8-a cross_cflags="-march=armv8-a -mtune=cortex-a53" cross_lflags="-O3;-march=aarch64"
- name: Run Stress Test
run: make ${{ matrix.target }} config=debug PONYPATH=../armv8-a/debug cross_triple=aarch64-unknown-linux-gnu cross_arch=armv8-a cross_cpu=cortex-a53 cross_linker=aarch64-linux-gnu-gcc cross_runner="qemu-aarch64-static -cpu cortex-a53 -L /usr/local/aarch64-linux-gnu/libc"
run: make ${{ matrix.target }} config=debug usedebugger='${{ matrix.debugger }}'
- name: Send alert on failure
if: ${{ failure() }}
uses: zulip/github-actions-zulip/send-message@e4c8f27c732ba9bd98ac6be0583096dea82feea5
Expand Down
27 changes: 26 additions & 1 deletion .github/workflows/update-lib-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,32 @@ jobs:
- image: ghcr.io/ponylang/ponyc-ci-cross-arm:20240427
- image: ghcr.io/ponylang/ponyc-ci-cross-armhf:20240427
- image: ghcr.io/ponylang/ponyc-ci-cross-riscv64:20240427
- image: ghcr.io/ponylang/ponyc-ci-cross-aarch64:20240427

name: ${{ matrix.image }}
container:
image: ${{ matrix.image }}
options: --user pony
steps:
- name: Checkout
uses: actions/[email protected]
- name: Cache Libs
id: cache-libs
uses: actions/cache@v4
with:
path: build/libs
key: libs-${{ matrix.image }}-${{ hashFiles('Makefile', 'CMakeLists.txt', 'lib/CMakeLists.txt') }}
- name: Build Libs
if: steps.cache-libs.outputs.cache-hit != 'true'
run: make libs build_flags=-j8

aarch64-linux:
runs-on: ubuntu-24.04-arm

strategy:
fail-fast: false
matrix:
include:
- image: ghcr.io/ponylang/ponyc-ci-aarch64-unknown-linux-ubuntu24.04-builder:20250118

name: ${{ matrix.image }}
container:
Expand Down
Loading