Skip to content

[WIP] Workflow for basic testing across multiple archs #17

[WIP] Workflow for basic testing across multiple archs

[WIP] Workflow for basic testing across multiple archs #17

name: Multiarch checks
on:
pull_request:
branches: [ develop, master ]
push:
branches: [ develop, master ]
paths-ignore:
- 'doygen/**'
- 'hooks/**'
- 'licenses/**'
- 'LICENSE.md'
- 'README.md'
- 'RELEASE-NOTES.txt'
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
multiarch-prim-rev:
name: ${{ matrix.config.platform }} ${{ matrix.config.batch }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
config:
- { platform: ppc64le, batch: 0}
- { platform: ppc64le, batch: 1}
- { platform: ppc64le, batch: 2}
- { platform: ppc64le, batch: 3}
- { platform: ppc64le, batch: 4}
- { platform: ppc64le, batch: 5}
- { platform: ppc64le, batch: 6}
- { platform: ppc64le, batch: 7}
- { platform: ppc64le, batch: 8}
- { platform: ppc64le, batch: 9}
- { platform: ppc64le, batch: 10}
- { platform: ppc64le, batch: 11}
- { platform: ppc64le, batch: 12}
- { platform: ppc64le, batch: 13}
- { platform: ppc64le, batch: 14}
- { platform: ppc64le, batch: 15}
- { platform: ppc64le, batch: 16}
- { platform: ppc64le, batch: 17}
- { platform: ppc64le, batch: 18}
- { platform: ppc64le, batch: 19}
steps:
- uses: actions/checkout@v3
- uses: docker/setup-qemu-action@v2
- uses: addnab/docker-run-action@v3
with:
image: debian:sid-slim
options: -v ${{ github.workspace }}:/work --platform linux/${{ matrix.config.platform }} -e DEBIAN_FRONTEND=noninteractive
run: |
apt-get update && apt-get install -y build-essential python-is-python3
cd /work
TargetTests=(test/unit/math/prim/*/*.cpp)
NTests=${#TargetTests[@]}
TestsPerBatch="$(($NTests / 20))"
StartOfBatch="$((${{ matrix.config.batch }} * $TestsPerBatch))"
# Compile and run in sub-batches of 5 to fail faster
echo "${TargetTests[@]}" | xargs -n 5 python ./runTests.py -j2
shell: bash
- name: Upload gtest_output xml
uses: actions/upload-artifact@v3
if: failure()
with:
name: gtest_outputs_xml
path: '**/*_test.xml'