name: Ubuntu-ARM32-Release

permissions:
  contents: read
  pull-requests: write

on:
  push:
    paths-ignore:
      - 'README.md'
      - 'doc/**'
  pull_request:
    paths-ignore:
      - 'README.md'
      - 'doc/**'

env:
  # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
  BUILD_TYPE: Release

jobs:

  build_arm32:
    name: Linux-ARM32 Build
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v5
    - uses: uraimo/run-on-arch-action@v2
      with:
        arch: armv7
        distro: ubuntu22.04
        githubToken: ${{ github.token }}
        install: |
          apt-get update -q -y
          apt-get install -q -y cmake make g++ libtiff-dev libopenexr-dev
        run: |
          cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
          cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
          ctest -V --test-dir ${{github.workspace}}/build --output-on-failure
