Skip to content
Closed
80 changes: 80 additions & 0 deletions .github/workflows/test_other_platforms.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Test on other platforms

# Build MoarVM and run the NQP test suite on operating systems that GitHub
# does not provide hosted runners for. These jobs run in a VM on top of an
# ubuntu-latest runner, so they are independent of the Azure Pipelines matrix
# and do not delay it.

on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:

jobs:
freebsd:
name: FreeBSD
runs-on: ubuntu-latest
timeout-minutes: 120

steps:
- name: Checkout MoarVM
uses: actions/checkout@v7
with:
path: MoarVM
submodules: recursive
# Configure.pl derives the version from `git describe --tags`, and
# NQP refuses to build against a MoarVM older than the revision
# pinned in its tools/templates/MOAR_REVISION, so the full history
# and the tags are both needed here.
fetch-depth: 0
fetch-tags: true
persist-credentials: false

- name: Checkout NQP
uses: actions/checkout@v7
with:
repository: Raku/nqp
path: nqp
submodules: recursive
persist-credentials: false

- name: Build and test in FreeBSD
uses: vmactions/freebsd-vm@v1
with:
usesh: true
copyback: false
cache-after-prepare: true
prepare: |
pkg install -y perl5 gmake git-lite
run: |
set -e

echo "===== toolchain ====="
uname -a
freebsd-version
perl -v | sed -n '2p'
cc --version | sed -n '1p'
gmake --version | sed -n '1p'
git --version

JOBS=`sysctl -n hw.ncpu`

echo "===== build MoarVM ====="
cd MoarVM
perl Configure.pl --prefix=../install
gmake -j$JOBS install
../install/bin/moar --version

echo "===== build NQP ====="
cd ../nqp
perl Configure.pl --backends=moar --prefix=../install
gmake install

echo "===== test NQP ====="
prove -j$JOBS -r -e ../install/bin/nqp \
t/nqp t/hll t/qregex t/p5regex t/qast t/moar \
t/serialization t/nativecall t/concurrency
Loading