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 CI from native on Cirrus to QEMU on GitHub Actions #4392

Merged
merged 4 commits into from
Aug 11, 2023
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
2 changes: 1 addition & 1 deletion .ci-dockerfiles/cross-aarch64/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ponylang/ponyc-ci-x86-64-unknown-linux-ubuntu20.04-builder:20230115
FROM ponylang/ponyc-ci-x86-64-unknown-linux-ubuntu20.04-builder:20230807

ARG CROSS_TRIPLE=aarch64-unknown-linux-gnu
ARG CROSS_CC=aarch64-linux-gnu-gcc
Expand Down
82 changes: 0 additions & 82 deletions .cirrus.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,6 @@
#
# Pull Request Tasks
#

task:
only_if: $CIRRUS_PR != ''

timeout_in: 120m

arm_container:
image: ponylang/ponyc-ci-aarch64-unknown-linux-ubuntu22.04-builder:20220720
cpu: 8
memory: 16

environment:
IMAGE: ponylang/ponyc-ci-aarch64-unknown-linux-ubuntu22.04-builder:20220720

name: "aarch64 Linux glibc"

libs_cache:
folder: build/libs
fingerprint_script: echo "`md5sum Makefile` `md5sum CMakeLists.txt` `md5sum lib/CMakeLists.txt` ${IMAGE}"
populate_script: make libs build_flags=-j8
upload_caches:
- libs

debug_configure_script:
- make configure arch=armv8-a config=debug
debug_build_script:
- make build config=debug
debug_test_script:
- make test-ci config=debug
release_configure_script:
- make configure arch=armv8-a config=release
release_build_script:
- make build config=release
release_test_script:
- make test-ci config=release

task:
only_if: $CIRRUS_PR != ''

Expand Down Expand Up @@ -350,52 +314,6 @@ task:
- ps: $version = (Get-Content .\VERSION); cloudsmith push raw --version $version --api-key $env:CLOUDSMITH_API_KEY --summary "Pony compiler" --description "https://github.com/ponylang/ponyc" ponylang/releases build\ponyc-x86-64-pc-windows-msvc.zip

# Nightly stress tests using string-message-passewr
task:
only_if: $CIRRUS_CRON == "stress"

timeout_in: 120m

arm_container:
image: ponylang/ponyc-ci-aarch64-unknown-linux-ubuntu22.04-builder:20220720
cpu: 8
memory: 4

matrix:
- name: "Stress Test: aarch64-unknown-linux-ubuntu22.04 [release]"
environment:
IMAGE: ponylang/ponyc-ci-aarch64-unknown-linux-ubuntu22.04-builder:20220720
TARGET: test-stress-release
- name: "Stress Test: aarch64-unknown-linux-ubuntu22.04 [debug]"
environment:
IMAGE: ponylang/ponyc-ci-aarch64-unknown-linux-ubuntu22.04-builder:20220720
TARGET: test-stress-debug
depends_on:
- "Stress Test: aarch64-unknown-linux-ubuntu22.04 [release]"
- name: "Stress Test: aarch64-unknown-linux-ubuntu20.04 [cd] [release]"
environment:
IMAGE: ponylang/ponyc-ci-aarch64-unknown-linux-ubuntu22.04-builder:20220720
TARGET: test-stress-with-cd-release
- name: "Stress Test: aarch64-unknown-linux-ubuntu22.04 [cd] [debug]"
environment:
IMAGE: ponylang/ponyc-ci-aarch64-unknown-linux-ubuntu22.04-builder:20220720
TARGET: test-stress-with-cd-debug
depends_on:
- "Stress Test: aarch64-unknown-linux-ubuntu20.04 [cd] [release]"

libs_cache:
folder: build/libs
fingerprint_script: echo "`md5sum Makefile` `md5sum CMakeLists.txt` `md5sum lib/CMakeLists.txt` ${IMAGE}"
populate_script: make libs build_flags=-j8
upload_caches:
- libs

configure_script:
- make configure arch=armv8-a config=debug
build_script:
- make build config=debug
stress_test_script:
- make ${TARGET} config=debug

task:
only_if: $CIRRUS_CRON == "stress"

Expand Down
49 changes: 49 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -286,3 +286,52 @@ jobs:
run: make cross-libponyrt config=release CC=arm-linux-gnueabihf-gcc CXX=arm-linux-gnueabihf-g++ arch=armv7-a cross_cflags="-march=armv7-a -mtune=cortex-a9" cross_lflags="-O3;-march=arm"
- name: Test with Release Cross-Compiled Runtime
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

strategy:
fail-fast: false
matrix:
include:
- image: ponylang/ponyc-ci-cross-aarch64:20230811
name: aarch64 Linux glibc

name: ${{ matrix.name }}
container:
image: ${{ matrix.image }}
options: --user pony --cap-add=SYS_PTRACE --security-opt seccomp=unconfined
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Restore Libs Cache
id: restore-libs
uses: actions/cache/restore@v3
with:
path: build/libs
key: libs-${{ matrix.image }}-${{ hashFiles('Makefile', 'CMakeLists.txt', 'libs/CMakeLists.txt') }}
- name: Build Libs
if: steps.restore-libs.outputs.cache-hit != 'true'
run: make libs build_flags=-j8
- name: Save Libs Cache
if: steps.restore-libs.outputs.cache-hit != 'true'
uses: actions/cache/save@v3
with:
path: build/libs
key: libs-${{ matrix.image }}-${{ hashFiles('Makefile', 'CMakeLists.txt', 'libs/CMakeLists.txt') }}
- name: Build Debug Runtime
run: |
make configure 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: Build Release Runtime
run: |
make configure 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"
64 changes: 64 additions & 0 deletions .github/workflows/stress-test-runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,67 @@ jobs:
type: stream
topic: ${{ github.repository }} scheduled job failure
content: ${{ github.server_url}}/${{ github.repository }}/actions/runs/${{ github.run_id }}/job/${{ github.job }} failed.

aarch64-linux:
runs-on: ubuntu-latest

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: ponylang/ponyc-ci-cross-aarch64:20230811
name: aarch64-unknown-linux-ubuntu20.04 [release]
target: test-cross-stress-release
- image: ponylang/ponyc-ci-cross-aarch64:20230811
name: aarch64-unknown-linux-ubuntu20.04 [debug]
target: test-cross-stress-debug
- image: ponylang/ponyc-ci-cross-aarch64:20230811
name: aarch64-unknown-linux-ubuntu20.04 [cd] [release]
target: test-cross-stress-with-cd-release
- image: ponylang/ponyc-ci-cross-aarch64:20230811
name: aarch64-unknown-linux-ubuntu20.04 [cd] [debug]
target: test-cross-stress-with-cd-debug

name: ${{ matrix.name }}
container:
image: ${{ matrix.image }}
options: --user pony --cap-add=SYS_PTRACE --security-opt seccomp=unconfined
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Restore Libs Cache
id: restore-libs
uses: actions/cache/restore@v3
with:
path: build/libs
key: libs-${{ matrix.image }}-${{ hashFiles('Makefile', 'CMakeLists.txt', 'libs/CMakeLists.txt') }}
- name: Build Libs
if: steps.restore-libs.outputs.cache-hit != 'true'
run: make libs build_flags=-j8
- name: Save Libs Cache
if: steps.restore-libs.outputs.cache-hit != 'true'
uses: actions/cache/save@v3
with:
path: build/libs
key: libs-${{ matrix.image }}-${{ hashFiles('Makefile', 'CMakeLists.txt', 'libs/CMakeLists.txt') }}
- name: Build Debug Runtime
run: |
make configure 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"
- name: Send alert on failure
if: ${{ failure() }}
uses: zulip/github-actions-zulip/send-message@b62d5a0e48a4d984ea4fce5dd65ba691963d4db4
with:
api-key: ${{ secrets.ZULIP_SCHEDULED_JOB_FAILURE_API_KEY }}
email: ${{ secrets.ZULIP_SCHEDULED_JOB_FAILURE_EMAIL }}
organization-url: 'https://ponylang.zulipchat.com/'
to: notifications
type: stream
topic: ${{ github.repository }} scheduled job failure
content: ${{ github.server_url}}/${{ github.repository }}/actions/runs/${{ github.run_id }}/job/${{ github.job }} failed.
1 change: 1 addition & 0 deletions .github/workflows/update-lib-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
- image: ponylang/ponyc-ci-cross-riscv64:20230808
- image: ponylang/ponyc-ci-cross-arm:20230809
- image: ponylang/ponyc-ci-cross-armhf:20230809
- image: ponylang/ponyc-ci-cross-aarch64:20230811

name: ${{ matrix.image }}
container:
Expand Down
12 changes: 12 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -244,15 +244,27 @@ test-examples: all
test-validate-grammar: all
$(SILENT)cd '$(outDir)' && ./ponyc --antlr >> pony.g.new && diff ../../pony.g pony.g.new

test-cross-stress-release: cross_args=--triple=$(cross_triple) --cpu=$(cross_cpu) --link-arch=$(cross_arch) --linker='$(cross_linker)' $(cross_ponyc_args)
test-cross-stress-release: debuggercmd=
test-cross-stress-release: test-stress-release
test-stress-release: all
$(SILENT)cd '$(outDir)' && PONYPATH=.:$(PONYPATH) ./ponyc -b ubench --pic $(cross_args) ../../test/rt-stress/string-message-ubench && echo Built `pwd`/ubench && $(cross_runner) $(debuggercmd) ./ubench --pingers 320 --initial-pings 5 --report-count 40 --report-interval 300 --ponynoblock --ponynoscale

test-cross-stress-debug: cross_args=--triple=$(cross_triple) --cpu=$(cross_cpu) --link-arch=$(cross_arch) --linker='$(cross_linker)' $(cross_ponyc_args)
test-cross-stress-debug: debuggercmd=
test-cross-stress-debug: test-stress-debug
test-stress-debug: all
$(SILENT)cd '$(outDir)' && PONYPATH=.:$(PONYPATH) ./ponyc -d -b ubench --pic $(cross_args) ../../test/rt-stress/string-message-ubench && echo Built `pwd`/ubench && $(cross_runner) $(debuggercmd) ./ubench --pingers 320 --initial-pings 5 --report-count 40 --report-interval 300 --ponynoblock --ponynoscale

test-cross-stress-with-cd-release: cross_args=--triple=$(cross_triple) --cpu=$(cross_cpu) --link-arch=$(cross_arch) --linker='$(cross_linker)' $(cross_ponyc_args)
test-cross-stress-with-cd-release: debuggercmd=
test-cross-stress-with-cd-release: test-stress-with-cd-release
test-stress-with-cd-release: all
$(SILENT)cd '$(outDir)' && PONYPATH=.:$(PONYPATH) ./ponyc -b ubench --pic $(cross_args) ../../test/rt-stress/string-message-ubench && echo Built `pwd`/ubench && $(cross_runner) $(debuggercmd) ./ubench --pingers 320 --initial-pings 5 --report-count 40 --report-interval 300 --ponynoscale

test-cross-stress-with-cd-debug: cross_args=--triple=$(cross_triple) --cpu=$(cross_cpu) --link-arch=$(cross_arch) --linker='$(cross_linker)' $(cross_ponyc_args)
test-cross-stress-with-cd-debug: debuggercmd=
test-cross-stress-with-cd-debug: test-stress-with-cd-debug
test-stress-with-cd-debug: all
$(SILENT)cd '$(outDir)' && PONYPATH=.:$(PONYPATH) ./ponyc -d -b ubench --pic $(cross_args) ../../test/rt-stress/string-message-ubench && echo Built `pwd`/ubench && $(cross_runner) $(debuggercmd) ./ubench --pingers 320 --initial-pings 5 --report-count 40 --report-interval 300 --ponynoscale

Expand Down
Loading