Skip to content

Commit

Permalink
Move riscv64 CI jobs from CirrusCI to GitHub actions
Browse files Browse the repository at this point in the history
  • Loading branch information
SeanTAllen committed Aug 8, 2023
1 parent 0973cd9 commit 2ac1fd6
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .ci-dockerfiles/cross-riscv64/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

USER root

Expand Down
31 changes: 0 additions & 31 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -206,37 +206,6 @@ task:
test_stdlib_cross_script:
- make test-cross-ci 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"

task:
only_if: $CIRRUS_PR != ''

container:
image: ponylang/ponyc-ci-cross-riscv64:20230115
cpu: 8
memory: 6

environment:
IMAGE: ponylang/ponyc-ci-cross-riscv64:20230115

name: "riscv64 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

configure_script:
- make configure
build_script:
- make build
test_script:
- make test-ci usedebugger=lldb
libponyrt_cross_script:
- make cross-libponyrt CC=riscv64-linux-gnu-gcc-10 CXX=riscv64-linux-gnu-g++-10 arch=rv64gc cross_cflags="-march=rv64gc -mtune=rocket" cross_lflags="-march=riscv64"
test_stdlib_cross_script:
- make test-cross-ci PONYPATH=../rv64gc/release cross_triple=riscv64-unknown-linux-gnu cross_arch=rv64gc cross_cpu=generic-rv64 cross_linker=riscv64-linux-gnu-gcc-10 cross_ponyc_args='--abi=lp64d --features=+m,+a,+f,+d,+c --link-ldcmd=bfd' cross_runner="qemu-riscv64 -L /usr/riscv64-linux-gnu/lib/"

#
# Nightly build tasks
#
Expand Down
49 changes: 49 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,52 @@ jobs:
run: make build config=release
- name: Test with Release Runtime
run: make test-ci config=release usedebugger='${{ matrix.debugger }}'

riscv64-linux:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
include:
- image: ponylang/ponyc-ci-cross-riscv64:20230808
name: riscv64 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: Configure Debug Runtime
run: make configure config=debug
- name: Build Debug Runtime
run: make build config=debug
- name: Build Debug Cross-Compiled Runtime
run: make cross-libponyrt config=debug CC=riscv64-linux-gnu-gcc-10 CXX=riscv64-linux-gnu-g++-10 arch=rv64gc cross_cflags="-march=rv64gc -mtune=rocket" cross_lflags="-march=riscv64"
- name: Test with Debug Cross-Compiled Runtime
run: make test-cross-ci config=debug PONYPATH=../rv64gc/debug cross_triple=riscv64-unknown-linux-gnu cross_arch=rv64gc cross_cpu=generic-rv64 cross_linker=riscv64-linux-gnu-gcc-10 cross_ponyc_args='--abi=lp64d --features=+m,+a,+f,+d,+c --link-ldcmd=bfd' cross_runner="qemu-riscv64 -L /usr/riscv64-linux-gnu/lib/"
- name: Configure Release Runtime
run: make configure config=release
- name: Build Release Runtime
run: make build config=release
- name: Build Release Cross-Compiled Runtime
run: make cross-libponyrt config=release CC=riscv64-linux-gnu-gcc-10 CXX=riscv64-linux-gnu-g++-10 arch=rv64gc cross_cflags="-march=rv64gc -mtune=rocket" cross_lflags="-march=riscv64"
- name: Test with Release Cross-Compiled Runtime
run: make test-cross-ci config=release PONYPATH=../rv64gc/release cross_triple=riscv64-unknown-linux-gnu cross_arch=rv64gc cross_cpu=generic-rv64 cross_linker=riscv64-linux-gnu-gcc-10 cross_ponyc_args='--abi=lp64d --features=+m,+a,+f,+d,+c --link-ldcmd=bfd' cross_runner="qemu-riscv64 -L /usr/riscv64-linux-gnu/lib/"
1 change: 1 addition & 0 deletions .github/workflows/update-lib-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
- image: ponylang/ponyc-ci-x86-64-unknown-linux-ubuntu22.04-builder:20230806
- image: ponylang/ponyc-ci-x86-64-unknown-linux-ubuntu20.04-builder:20230807
- image: ponylang/ponyc-ci-x86-64-unknown-linux-musl-builder:20230808
- image: ponylang/ponyc-ci-cross-riscv64:20230808

name: ${{ matrix.image }}
container:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ test-ci: all test-check-version test-core test-stdlib-debug test-stdlib-release

test-cross-ci: cross_args=--triple=$(cross_triple) --cpu=$(cross_cpu) --link-arch=$(cross_arch) --linker='$(cross_linker)' $(cross_ponyc_args)
test-cross-ci: debuggercmd=
test-cross-ci: test-stdlib-debug test-stdlib-release
test-cross-ci: test-core test-stdlib-debug test-stdlib-release test-examples test-validate-grammar

test-check-version: all
$(SILENT)cd '$(outDir)' && ./ponyc --version
Expand Down

0 comments on commit 2ac1fd6

Please sign in to comment.