build: disable native by default #632
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test | |
| on: | |
| push: | |
| pull_request: | |
| workflow_dispatch: | |
| env: | |
| FORM_IGNORE_DEPRECATION: 1 | |
| OMPI_MCA_rmaps_base_oversubscribe: 1 | |
| jobs: | |
| # Simple tests on Linux; except the ParFORM case, they probably pass unless | |
| # the committer has forgotten running "make check". | |
| check: | |
| name: Test (${{ matrix.test }}) for ${{ matrix.bin }}${{ matrix.nthreads && format(' -w{0}', matrix.nthreads) || '' }}${{ matrix.flint && format(' (flint - {0})', matrix.flint) || '' }} | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - {bin: form, test: default} | |
| - {bin: tform, test: default} | |
| - {bin: tform, test: default, nthreads: 2} | |
| - {bin: form, test: default, flint: no} | |
| - {bin: tform, test: default, flint: no} | |
| - {bin: tform, test: default, nthreads: 2, flint: no} | |
| - {bin: form, test: extra, timeout: 60} | |
| - {bin: tform, test: extra, timeout: 60} | |
| - {bin: tform, test: extra, timeout: 60, nthreads: 2} | |
| - {bin: form, test: extra, timeout: 60, flint: no} | |
| - {bin: tform, test: extra, timeout: 60, flint: no} | |
| - {bin: tform, test: extra, timeout: 60, nthreads: 2, flint: no} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # ensures a reachable tag | |
| - name: Install dependencies | |
| uses: awalsh128/cache-apt-pkgs-action@v1 | |
| with: | |
| packages: libflint-dev libmpfr-dev libzstd-dev | |
| # We need to handle a bug that may cause cache key conflicts. | |
| # See: https://github.com/awalsh128/cache-apt-pkgs-action/pull/150 | |
| version: ${{ runner.arch }}-1.0 | |
| - name: Configure | |
| run: | | |
| opts='--disable-dependency-tracking' | |
| case ${{ matrix.bin }} in | |
| form|vorm) opts="$opts --enable-scalar --disable-threaded --disable-parform";; | |
| tform|tvorm) opts="$opts --disable-scalar --enable-threaded --disable-parform";; | |
| esac | |
| case ${{ matrix.bin }} in | |
| vorm|tvorm|parvorm) opts="$opts --enable-debug";; | |
| esac | |
| case "${{ matrix.flint }}" in | |
| no) opts="$opts --without-flint";; | |
| *) opts="$opts --with-flint";; | |
| esac | |
| opts="$opts --with-gmp --with-zlib --with-zstd" | |
| autoreconf -i | |
| ./configure $opts | |
| - name: Build | |
| run: make -C sources -j 4 ${{ matrix.bin }} | |
| - name: Cache library | |
| id: cache-formlib | |
| if: contains(fromJson('["extra"]'), matrix.test) | |
| uses: actions/cache@v4 | |
| with: | |
| path: formlib | |
| key: formlib-${{ matrix.test }}-v2 | |
| - name: Install library if necessary | |
| if: steps.cache-formlib.outputs.cache-hit != 'true' | |
| run: | | |
| mkdir -p formlib | |
| case ${{ matrix.test }} in | |
| extra) | |
| # forcer library for the forcer test in extra | |
| wget https://github.com/benruijl/forcer/archive/v1.0.0.tar.gz -O - | tar -x --gzip | |
| mv forcer-1.0.0/forcer.h formlib | |
| mv forcer-1.0.0/forcer formlib | |
| rm -rf forcer-1.0.0 | |
| # color library for the color test in extra | |
| wget https://github.com/form-dev/form-packages/archive/refs/tags/v1.0.0.tar.gz -O - | tar -x --gzip | |
| mv form-packages-1.0.0/color/color.h formlib | |
| rm -rf form-packages-1.0.0 | |
| # series library for test in extra | |
| wget https://github.com/a-maier/series/releases/download/1.0.0/series.h -P formlib | |
| ;; | |
| esac | |
| - name: Test | |
| run: ./check/check.rb ./sources/${{ matrix.bin }} --stat ${{ matrix.nthreads && format('-w{0}', matrix.nthreads) || '' }} ${{ matrix.timeout && format('--timeout {0}', matrix.timeout) || '' }} ${{ matrix.test != 'default' && format('-C {0}', matrix.test) || '' }} | |
| env: | |
| FORMPATH: ${{ github.workspace }}/formlib | |
| check-parform: | |
| name: Test (${{ matrix.test }}) for ${{ matrix.bin }}${{ matrix.nthreads && format(' -w{0}', matrix.nthreads) || '' }}${{ matrix.flint && format(' (flint - {0})', matrix.flint) || '' }} | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - {bin: parform, test: default, timeout: 15} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # ensures a reachable tag | |
| - name: Install dependencies | |
| uses: awalsh128/cache-apt-pkgs-action@v1 | |
| with: | |
| packages: libflint-dev libmpfr-dev libzstd-dev | |
| # We need to handle a bug that may cause cache key conflicts. | |
| # See: https://github.com/awalsh128/cache-apt-pkgs-action/pull/150 | |
| version: ${{ runner.arch }}-1.0 | |
| - name: Install MPI | |
| run: | | |
| sudo apt update | |
| sudo apt install -y -q libopenmpi-dev | |
| - name: Configure | |
| run: | | |
| opts='--disable-dependency-tracking' | |
| case ${{ matrix.bin }} in | |
| parform|parvorm) opts="$opts --disable-scalar --disable-threaded --enable-parform";; | |
| esac | |
| case ${{ matrix.bin }} in | |
| vorm|tvorm|parvorm) opts="$opts --enable-debug";; | |
| esac | |
| case "${{ matrix.flint }}" in | |
| no) opts="$opts --without-flint";; | |
| *) opts="$opts --with-flint";; | |
| esac | |
| opts="$opts --with-gmp --with-zlib --with-zstd" | |
| autoreconf -i | |
| ./configure $opts | |
| - name: Build | |
| run: make -C sources -j 4 ${{ matrix.bin }} | |
| - name: Cache library | |
| id: cache-formlib | |
| if: contains(fromJson('["extra"]'), matrix.test) | |
| uses: actions/cache@v4 | |
| with: | |
| path: formlib | |
| key: formlib-${{ matrix.test }}-v2 | |
| - name: Install library if necessary | |
| if: steps.cache-formlib.outputs.cache-hit != 'true' | |
| run: | | |
| mkdir -p formlib | |
| case ${{ matrix.test }} in | |
| extra) | |
| # forcer library for the forcer test in extra | |
| wget https://github.com/benruijl/forcer/archive/v1.0.0.tar.gz -O - | tar -x --gzip | |
| mv forcer-1.0.0/forcer.h formlib | |
| mv forcer-1.0.0/forcer formlib | |
| rm -rf forcer-1.0.0 | |
| # color library for the color test in extra | |
| wget https://github.com/form-dev/form-packages/archive/refs/tags/v1.0.0.tar.gz -O - | tar -x --gzip | |
| mv form-packages-1.0.0/color/color.h formlib | |
| rm -rf form-packages-1.0.0 | |
| # series library for test in extra | |
| wget https://github.com/a-maier/series/releases/download/1.0.0/series.h -P formlib | |
| ;; | |
| esac | |
| - name: Test | |
| run: ./check/check.rb ./sources/${{ matrix.bin }} --stat ${{ matrix.nthreads && format('-w{0}', matrix.nthreads) || '' }} ${{ matrix.timeout && format('--timeout {0}', matrix.timeout) || '' }} ${{ matrix.test != 'default' && format('-C {0}', matrix.test) || '' }} | |
| env: | |
| FORMPATH: ${{ github.workspace }}/formlib | |
| # Check memory errors (e.g., uninitialized values and memory leaks) | |
| # thoroughly by using Valgrind on Linux. To maximize the use of concurrent | |
| # jobs, we divide the tests into smaller parts. | |
| valgrind-check: | |
| name: Valgrind check (${{ matrix.test }}) for ${{ matrix.bin }}${{ matrix.nthreads && format(' -w{0}', matrix.nthreads) || '' }} (${{ matrix.group }}) | |
| needs: [check, check-i386] | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - {bin: vorm, test: default, group: 1/5} | |
| - {bin: vorm, test: default, group: 2/5} | |
| - {bin: vorm, test: default, group: 3/5} | |
| - {bin: vorm, test: default, group: 4/5} | |
| - {bin: vorm, test: default, group: 5/5} | |
| - {bin: tvorm, test: default, group: 1/10} | |
| - {bin: tvorm, test: default, group: 2/10} | |
| - {bin: tvorm, test: default, group: 3/10} | |
| - {bin: tvorm, test: default, group: 4/10} | |
| - {bin: tvorm, test: default, group: 5/10} | |
| - {bin: tvorm, test: default, group: 6/10} | |
| - {bin: tvorm, test: default, group: 7/10} | |
| - {bin: tvorm, test: default, group: 8/10} | |
| - {bin: tvorm, test: default, group: 9/10} | |
| - {bin: tvorm, test: default, group: 10/10} | |
| - {bin: tvorm, test: default, nthreads: 2, group: 1/10} | |
| - {bin: tvorm, test: default, nthreads: 2, group: 2/10} | |
| - {bin: tvorm, test: default, nthreads: 2, group: 3/10} | |
| - {bin: tvorm, test: default, nthreads: 2, group: 4/10} | |
| - {bin: tvorm, test: default, nthreads: 2, group: 5/10} | |
| - {bin: tvorm, test: default, nthreads: 2, group: 6/10} | |
| - {bin: tvorm, test: default, nthreads: 2, group: 7/10} | |
| - {bin: tvorm, test: default, nthreads: 2, group: 8/10} | |
| - {bin: tvorm, test: default, nthreads: 2, group: 9/10} | |
| - {bin: tvorm, test: default, nthreads: 2, group: 10/10} | |
| - {bin: vorm, test: extra, group: 1/1} | |
| - {bin: tvorm, test: extra, group: 1/1} | |
| - {bin: tvorm, test: extra, nthreads: 2, group: 1/1} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # ensures a reachable tag | |
| - name: Install dependencies | |
| uses: awalsh128/cache-apt-pkgs-action@v1 | |
| with: | |
| packages: libflint-dev libmpfr-dev libzstd-dev valgrind | |
| # We need to handle a bug that may cause cache key conflicts. | |
| # See: https://github.com/awalsh128/cache-apt-pkgs-action/pull/150 | |
| version: ${{ runner.arch }}-1.0 | |
| - name: Configure | |
| run: | | |
| opts='--disable-dependency-tracking' | |
| case ${{ matrix.bin }} in | |
| vorm) opts="$opts --enable-scalar --disable-threaded --disable-parform";; | |
| tvorm) opts="$opts --disable-scalar --enable-threaded --disable-parform";; | |
| esac | |
| case ${{ matrix.bin }} in | |
| vorm|tvorm|parvorm) opts="$opts --enable-debug";; | |
| esac | |
| opts="$opts --with-gmp --with-zlib --with-zstd" | |
| autoreconf -i | |
| ./configure $opts | |
| - name: Build | |
| run: make -C sources -j 4 ${{ matrix.bin }} | |
| - name: Cache library | |
| id: cache-formlib | |
| if: contains(fromJson('["extra"]'), matrix.test) | |
| uses: actions/cache@v4 | |
| with: | |
| path: formlib | |
| key: formlib-${{ matrix.test }}-v2 | |
| - name: Install library if necessary | |
| if: steps.cache-formlib.outputs.cache-hit != 'true' | |
| run: | | |
| mkdir -p formlib | |
| case ${{ matrix.test }} in | |
| extra) | |
| # forcer library for the forcer test in extra | |
| wget https://github.com/benruijl/forcer/archive/v1.0.0.tar.gz -O - | tar -x --gzip | |
| mv forcer-1.0.0/forcer.h formlib | |
| mv forcer-1.0.0/forcer formlib | |
| rm -rf forcer-1.0.0 | |
| # color library for the color test in extra | |
| wget https://github.com/form-dev/form-packages/archive/refs/tags/v1.0.0.tar.gz -O - | tar -x --gzip | |
| mv form-packages-1.0.0/color/color.h formlib | |
| rm -rf form-packages-1.0.0 | |
| # series library for test in extra | |
| wget https://github.com/a-maier/series/releases/download/1.0.0/series.h -P formlib | |
| ;; | |
| esac | |
| - name: Test | |
| run: ./check/check.rb valgrind ./sources/${{ matrix.bin }} --stat -g ${{ matrix.group }} --retries 5 ${{ matrix.nthreads && format('-w{0}', matrix.nthreads) || '' }} ${{ matrix.test != 'default' && format('-C {0}', matrix.test) || '' }} | |
| env: | |
| FORMPATH: ${{ github.workspace }}/formlib | |
| # Generate LCOV coverage data to be posted to coveralls.io. Note that | |
| # we measure code coverage only for tests checked with Valgrind. | |
| coverage: | |
| name: Code coverage (${{ matrix.test }}) for ${{ matrix.bin }}${{ matrix.nthreads && format(' -w{0}', matrix.nthreads) || '' }}${{ matrix.flint && format(' (flint - {0})', matrix.flint) || '' }} | |
| needs: [check, check-i386] | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - {bin: vorm, test: default} | |
| - {bin: tvorm, test: default} | |
| - {bin: tvorm, test: default, nthreads: 2} | |
| - {bin: vorm, test: extra, timeout: 60} | |
| - {bin: tvorm, test: extra, timeout: 60} | |
| - {bin: tvorm, test: extra, timeout: 60, nthreads: 2} | |
| - {bin: vorm, test: default, flint: no} | |
| - {bin: tvorm, test: default, flint: no} | |
| - {bin: tvorm, test: default, nthreads: 2, flint: no} | |
| - {bin: vorm, test: extra, timeout: 60, flint: no} | |
| - {bin: tvorm, test: extra, timeout: 60, flint: no} | |
| - {bin: tvorm, test: extra, timeout: 60, nthreads: 2, flint: no} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # ensures a reachable tag | |
| - name: Install dependencies | |
| uses: awalsh128/cache-apt-pkgs-action@v1 | |
| with: | |
| packages: lcov libflint-dev libmpfr-dev libzstd-dev | |
| # We need to handle a bug that may cause cache key conflicts. | |
| # See: https://github.com/awalsh128/cache-apt-pkgs-action/pull/150 | |
| version: ${{ runner.arch }}-1.0 | |
| - name: Configure | |
| run: | | |
| opts='--disable-dependency-tracking' | |
| case ${{ matrix.bin }} in | |
| vorm) opts="$opts --enable-scalar --disable-threaded --disable-parform";; | |
| tvorm) opts="$opts --disable-scalar --enable-threaded --disable-parform";; | |
| esac | |
| case "${{ matrix.flint }}" in | |
| no) opts="$opts --without-flint";; | |
| *) opts="$opts --with-flint";; | |
| esac | |
| opts="$opts --enable-debug --enable-coverage --with-gmp --with-zlib --with-zstd" | |
| autoreconf -i | |
| ./configure $opts | |
| - name: Build | |
| run: make -C sources -j 4 ${{ matrix.bin }} | |
| - name: Cache library | |
| id: cache-formlib | |
| if: contains(fromJson('["extra"]'), matrix.test) | |
| uses: actions/cache@v4 | |
| with: | |
| path: formlib | |
| key: formlib-${{ matrix.test }}-v2 | |
| - name: Install library if necessary | |
| if: steps.cache-formlib.outputs.cache-hit != 'true' | |
| run: | | |
| mkdir -p formlib | |
| case ${{ matrix.test }} in | |
| extra) | |
| # forcer library for the forcer test in extra | |
| wget https://github.com/benruijl/forcer/archive/v1.0.0.tar.gz -O - | tar -x --gzip | |
| mv forcer-1.0.0/forcer.h formlib | |
| mv forcer-1.0.0/forcer formlib | |
| rm -rf forcer-1.0.0 | |
| # color library for the color test in extra | |
| wget https://github.com/form-dev/form-packages/archive/refs/tags/v1.0.0.tar.gz -O - | tar -x --gzip | |
| mv form-packages-1.0.0/color/color.h formlib | |
| rm -rf form-packages-1.0.0 | |
| # series library for test in extra | |
| wget https://github.com/a-maier/series/releases/download/1.0.0/series.h -P formlib | |
| ;; | |
| esac | |
| - name: Test | |
| run: ./check/check.rb ./sources/${{ matrix.bin }} --stat --timeout ${{ matrix.timeout && format('{0}', matrix.timeout) || '30' }} ${{ matrix.nthreads && format('-w{0}', matrix.nthreads) || '' }} ${{ matrix.test != 'default' && format('-C {0}', matrix.test) || '' }} --fake-valgrind | |
| env: | |
| FORMPATH: ${{ github.workspace }}/formlib | |
| - name: Generate LCOV coverage data | |
| run: | | |
| lcov -d . -c -o coverage.lcov | |
| lcov -r coverage.lcov */usr/include/* -o coverage.lcov | |
| - name: Coveralls Parallel | |
| uses: coverallsapp/github-action@v2 | |
| with: | |
| flag-name: ${{ matrix.bin }}${{ matrix.nthreads && format(' -w{0}', matrix.nthreads) || '' }} (${{ matrix.test }})${{ matrix.flint && format(' (flint - {0})', matrix.flint) || '' }} | |
| parallel: true | |
| # Post LCOV coverage data to coveralls.io. | |
| coverage-finish: | |
| needs: [check, valgrind-check, coverage] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Coveralls Finished | |
| uses: coverallsapp/github-action@v2 | |
| with: | |
| parallel-finished: true | |
| # Tests with a 32-bit container. | |
| check-i386: | |
| name: 32-bit container check for ${{ matrix.bin }}${{ matrix.nthreads && format(' -w{0}', matrix.nthreads) || '' }} | |
| runs-on: ubuntu-latest | |
| container: | |
| image: i386/debian:11.5 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - {bin: form} | |
| - {bin: tform} | |
| - {bin: tform, nthreads: 2} | |
| steps: | |
| # We have to use v1. | |
| # See https://github.com/actions/checkout/issues/334 | |
| - name: Checkout repository | |
| uses: actions/checkout@v1 | |
| - name: Install dependencies | |
| run: | | |
| apt-get update | |
| apt-get -y install automake build-essential git libgmp-dev libmpfr-dev libzstd-dev ruby zlib1g-dev | |
| # Fix dubious ownership for Git operations. | |
| # See https://github.com/actions/runner/issues/2033#issuecomment-1204205989 | |
| - name: Set ownership | |
| run: chown -R $(id -u):$(id -g) $PWD | |
| - name: Configure | |
| run: | | |
| opts='--disable-dependency-tracking' | |
| case ${{ matrix.bin }} in | |
| form) opts="$opts --enable-scalar --disable-threaded --disable-parform";; | |
| tform) opts="$opts --disable-scalar --enable-threaded --disable-parform";; | |
| esac | |
| opts="$opts --disable-debug --with-gmp --with-zlib --with-zstd --without-flint" | |
| autoreconf -i | |
| ./configure $opts | |
| - name: Build | |
| run: make -C sources -j 4 ${{ matrix.bin }} | |
| - name: Test | |
| run: ./check/check.rb ./sources/${{ matrix.bin }} --stat --wordsize 2 ${{ matrix.nthreads && format('-w{0}', matrix.nthreads) || '' }} |