Skip to content

Prevent use of specific messages as sequence element #3624

Prevent use of specific messages as sequence element

Prevent use of specific messages as sequence element #3624

Workflow file for this run

name: tests
on:
push:
schedule:
- cron: '0 2 * * *'
jobs:
skip_check_general:
name: Skip Check General
continue-on-error: true
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v3.4.0
with:
paths_ignore: '["*.gpr", "examples/**", "tests/spark/**"]'
checks:
name: Checks
needs: skip_check_general
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
target:
- packages
- dependencies
- black
- isort
- flake8
- pylint
- mypy
- pydocstyle
- contracts
- doc
steps:
- uses: actions/checkout@v2
if: ${{ needs.skip_check_general.outputs.should_skip != 'true' }}
with:
submodules: true
- name: Set up Python
if: ${{ needs.skip_check_general.outputs.should_skip != 'true' }}
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Determine exact Python version
if: ${{ needs.skip_check_general.outputs.should_skip != 'true' }}
run:
echo "PYTHON_VERSION=$(python -c 'import platform; print(platform.python_version())')" >> $GITHUB_ENV
- name: Cache Python dependencies
if: ${{ needs.skip_check_general.outputs.should_skip != 'true' }}
uses: actions/cache@v2
with:
path: |
~/.cache/pip
~/.local/lib/python${{ matrix.python-version }}/site-packages
~/.local/bin
key: ${{ runner.os }}-python${{ env.PYTHON_VERSION }}-${{ hashFiles('setup.py', '*.cfg', '*.ini', '.pylintrc', '.flake8') }}
- name: Cache GNAT Community
if: ${{ needs.skip_check_general.outputs.should_skip != 'true' }}
uses: actions/cache@v2
with:
path: /home/runner/work/gnat
key: ${{ runner.os }}-gnat-ce2021
- name: Install GNAT Community
if: ${{ needs.skip_check_general.outputs.should_skip != 'true' }}
uses: ada-actions/toolchain@ce2021
with:
distrib: community
install_dir: /home/runner/work/gnat
- name: Install dependencies
if: ${{ needs.skip_check_general.outputs.should_skip != 'true' }}
run: |
echo "$HOME/.local/bin" >> $GITHUB_PATH
echo "PYTHONPATH=$PWD" >> $GITHUB_ENV
sudo apt install libgmp-dev patchelf
python -m pip install --upgrade pip wheel
make install_devel
- name: Check
if: ${{ needs.skip_check_general.outputs.should_skip != 'true' }}
run: |
make check_${{ matrix.target }}
installation:
name: Installation
needs: skip_check_general
if: ${{ needs.skip_check_python.outputs.should_skip != 'true' }}
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Cache GNAT Community
uses: actions/cache@v2
with:
path: /home/runner/work/gnat
key: ${{ runner.os }}-gnat-ce2021
- name: Install GNAT Community
uses: ada-actions/toolchain@ce2021
with:
distrib: community
install_dir: /home/runner/work/gnat
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel virtualenv
- name: Install
run: |
make test_installation
skip_check_python:
name: Skip Check Python
continue-on-error: true
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v3.4.0
with:
paths: '["rflx/**", "tests/**"]'
paths_ignore: '["tests/spark/**"]'
tests_python:
name: Tests
needs: skip_check_python
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
target:
- "python_coverage"
python-version:
- 3.7
- 3.8
- 3.9
gnat-distrib:
- "community"
include:
- target: "python_unit"
python-version: 3.7
gnat-distrib: "community"
- target: "python_property"
python-version: 3.7
gnat-distrib: "community"
- target: "python_optimized"
python-version: 3.7
gnat-distrib: "community"
- target: "python_optimized"
python-version: 3.7
gnat-distrib: "fsf"
steps:
- uses: actions/checkout@v2
if: ${{ needs.skip_check_python.outputs.should_skip != 'true' }}
with:
submodules: true
- name: Set up Python ${{ matrix.python-version }}
if: ${{ needs.skip_check_python.outputs.should_skip != 'true' }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Determine exact Python version
if: ${{ needs.skip_check_python.outputs.should_skip != 'true' }}
run:
echo "PYTHON_VERSION=$(python -c 'import platform; print(platform.python_version())')" >> $GITHUB_ENV
- name: Cache Python dependencies
if: ${{ needs.skip_check_python.outputs.should_skip != 'true' }}
uses: actions/cache@v2
with:
path: |
~/.cache/pip
~/.local/lib/python${{ matrix.python-version }}/site-packages
~/.local/bin
key: ${{ runner.os }}-python${{ env.PYTHON_VERSION }}-${{ hashFiles('setup.py', '*.cfg', '*.ini', '.pylintrc', '.flake8') }}
- name: Cache GNAT Community
if: ${{ needs.skip_check_python.outputs.should_skip != 'true' }}
uses: actions/cache@v2
with:
path: /home/runner/work/gnat
key: ${{ runner.os }}-gnat-ce2021
- name: Install GNAT Community
if: ${{ needs.skip_check_python.outputs.should_skip != 'true' }}
uses: ada-actions/toolchain@ce2021
with:
distrib: community
install_dir: /home/runner/work/gnat
- name: Install dependencies
if: ${{ needs.skip_check_python.outputs.should_skip != 'true' }}
run: |
echo "$HOME/.local/bin" >> $GITHUB_PATH
echo "PYTHONPATH=$PWD" >> $GITHUB_ENV
echo "HYPOTHESIS_PROFILE=ci" >> $GITHUB_ENV
echo "PYTEST_ADDOPTS=--basetemp=build" >> $GITHUB_ENV
sudo apt install graphviz libgmp-dev patchelf
python -m pip install --upgrade pip wheel
make install_devel
- name: Install Alire
if: ${{ needs.skip_check_python.outputs.should_skip != 'true' && matrix.gnat-distrib == 'fsf' }}
uses: alire-project/setup-alire@v1
- name: Install FSF GNAT
if: ${{ needs.skip_check_python.outputs.should_skip != 'true' && matrix.gnat-distrib == 'fsf' }}
run: |
make install_gnat
- name: Connect to Memcached server
if: ${{ needs.skip_check_python.outputs.should_skip != 'true' }}
shell: bash
env:
SSH_KEY: ${{ secrets.MEMCACHED_SSH_KEY }}
SERVER: ${{ secrets.MEMCACHED_SERVER }}
run: |
eval $(ssh-agent -s)
echo "$SSH_KEY" | tr -d '\r' | ssh-add - &>/dev/null
mkdir -p ~/.ssh
chmod 700 ~/.ssh
ssh-keyscan $SERVER >> ~/.ssh/known_hosts
chmod 644 ~/.ssh/known_hosts
ssh -L 11211:localhost:11211 -N -T -f -o ExitOnForwardFailure=yes -o ServerAliveInterval=10 -o ServerAliveCountMax=3 ci@$SERVER &>/dev/null
echo "stats" | nc -q 1 localhost 11211
- name: Configure kernel parameters
if: ${{ needs.skip_check_python.outputs.should_skip != 'true' }}
run: |
sudo /sbin/sysctl -w net.ipv4.ping_group_range="0 2147483647"
- name: Test
if: ${{ needs.skip_check_python.outputs.should_skip != 'true' }}
run: |
eval `make printenv_gnat`
gnat --version
make test_${{ matrix.target }}
verification_python_scheduled:
name: Verification
if: github.event.schedule
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
target: ["python_property_verification"]
python-version: [3.7]
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Determine exact Python version
run:
echo "PYTHON_VERSION=$(python -c 'import platform; print(platform.python_version())')" >> $GITHUB_ENV
- name: Cache Python dependencies
uses: actions/cache@v2
with:
path: |
~/.cache/pip
~/.local/lib/python${{ matrix.python-version }}/site-packages
~/.local/bin
key: ${{ runner.os }}-python${{ env.PYTHON_VERSION }}-${{ hashFiles('setup.py', '*.cfg', '*.ini', '.pylintrc', '.flake8') }}
- name: Cache GNAT Community
uses: actions/cache@v2
with:
path: /home/runner/work/gnat
key: ${{ runner.os }}-gnat-ce2021
- name: Install GNAT Community
uses: ada-actions/toolchain@ce2021
with:
distrib: community
install_dir: /home/runner/work/gnat
- name: Install dependencies
run: |
echo "$HOME/.local/bin" >> $GITHUB_PATH
echo "PYTHONPATH=$PWD" >> $GITHUB_ENV
echo "HYPOTHESIS_PROFILE=ci" >> $GITHUB_ENV
echo "PYTEST_ADDOPTS=--basetemp=build" >> $GITHUB_ENV
sudo apt install graphviz libgmp-dev patchelf
python -m pip install --upgrade pip wheel
make install_devel
- name: Connect to Memcached server
shell: bash
env:
SSH_KEY: ${{ secrets.MEMCACHED_SSH_KEY }}
SERVER: ${{ secrets.MEMCACHED_SERVER }}
run: |
eval $(ssh-agent -s)
echo "$SSH_KEY" | tr -d '\r' | ssh-add - &>/dev/null
mkdir -p ~/.ssh
chmod 700 ~/.ssh
ssh-keyscan $SERVER >> ~/.ssh/known_hosts
chmod 644 ~/.ssh/known_hosts
ssh -L 11211:localhost:11211 -N -T -f -o ExitOnForwardFailure=yes -o ServerAliveInterval=10 -o ServerAliveCountMax=3 ci@$SERVER &>/dev/null
echo "stats" | nc -q 1 localhost 11211
- name: Test
run: |
make test_${{ matrix.target }}
skip_check_spark:
name: Skip Check SPARK
continue-on-error: true
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v3.4.0
with:
paths: '["*.gpr", "tests/spark/**"]'
tests_spark:
name: Tests
needs: skip_check_spark
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
target:
- "spark"
- "spark NOPREFIX=1"
- "spark_optimized"
gnat-distrib:
- "community"
- "fsf"
steps:
- uses: actions/checkout@v2
if: ${{ needs.skip_check_spark.outputs.should_skip != 'true' }}
with:
submodules: true
- name: Cache GNAT Community
if: ${{ needs.skip_check_spark.outputs.should_skip != 'true' }}
uses: actions/cache@v2
with:
path: /home/runner/work/gnat
key: ${{ runner.os }}-gnat-ce2021
- name: Install GNAT Community
if: ${{ needs.skip_check_spark.outputs.should_skip != 'true' }}
uses: ada-actions/toolchain@ce2021
with:
distrib: community
install_dir: /home/runner/work/gnat
- name: Install Alire
if: ${{ needs.skip_check_spark.outputs.should_skip != 'true' && matrix.gnat-distrib == 'fsf' }}
uses: alire-project/setup-alire@v1
- name: Install FSF GNAT
if: ${{ needs.skip_check_spark.outputs.should_skip != 'true' && matrix.gnat-distrib == 'fsf' }}
run: |
make install_gnat
- name: Test
if: ${{ needs.skip_check_spark.outputs.should_skip != 'true' }}
run: |
eval `make printenv_gnat`
gnat --version
make test_${{ matrix.target }}
runtime_compatibility:
name: Runtime compatibility
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
gnat-distrib:
- "community"
- "fsf"
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Cache GNAT Community
uses: actions/cache@v2
with:
path: /home/runner/work/gnat
key: ${{ runner.os }}-gnat-ce2021
- name: Install GNAT Community
uses: ada-actions/toolchain@ce2021
with:
distrib: community
install_dir: /home/runner/work/gnat
- name: Install Alire
if: ${{ matrix.gnat-distrib == 'fsf' }}
uses: alire-project/setup-alire@v1
- name: Install FSF GNAT
if: ${{ matrix.gnat-distrib == 'fsf' }}
run: |
make install_gnat
- name: Build
run: |
eval `make printenv_gnat`
gnat --version
make test_runtime
verification_spark:
name: Verification
needs: skip_check_spark
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
test:
- "builtin_types"
- "custom_types"
- "ethernet"
- "ipv4"
- "tlv"
- "in_tlv"
- "enumeration"
- "sequence"
- "derivation"
- "expression"
- "fixed_size"
steps:
- uses: actions/checkout@v2
if: ${{ needs.skip_check_spark.outputs.should_skip != 'true' }}
with:
submodules: true
- name: Set up Python
if: ${{ needs.skip_check_spark.outputs.should_skip != 'true' }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Determine exact Python version
if: ${{ needs.skip_check_spark.outputs.should_skip != 'true' }}
run:
echo "PYTHON_VERSION=$(python -c 'import platform; print(platform.python_version())')" >> $GITHUB_ENV
- name: Cache Python dependencies
if: ${{ needs.skip_check_spark.outputs.should_skip != 'true' }}
uses: actions/cache@v2
with:
path: |
~/.cache/pip
~/.local/lib/python${{ matrix.python-version }}/site-packages
~/.local/bin
key: ${{ runner.os }}-python${{ env.PYTHON_VERSION }}-${{ hashFiles('setup.py', '*.cfg', '*.ini', '.pylintrc', '.flake8') }}
- name: Cache GNAT Community
if: ${{ needs.skip_check_spark.outputs.should_skip != 'true' }}
uses: actions/cache@v2
with:
path: /home/runner/work/gnat
key: ${{ runner.os }}-gnat-ce2021
- name: Install GNAT Community
if: ${{ needs.skip_check_spark.outputs.should_skip != 'true' }}
uses: ada-actions/toolchain@ce2021
with:
distrib: community
install_dir: /home/runner/work/gnat
- name: Install dependencies
if: ${{ needs.skip_check_spark.outputs.should_skip != 'true' }}
run: |
echo "$HOME/.local/bin" >> $GITHUB_PATH
echo "PYTHONPATH=$PWD" >> $GITHUB_ENV
sudo apt install libgmp-dev patchelf
python -m pip install --upgrade pip wheel
make install_devel
- name: Connect to Memcached server
if: ${{ needs.skip_check_spark.outputs.should_skip != 'true' }}
shell: bash
env:
SSH_KEY: ${{ secrets.MEMCACHED_SSH_KEY }}
SERVER: ${{ secrets.MEMCACHED_SERVER }}
run: |
eval $(ssh-agent -s)
echo "$SSH_KEY" | tr -d '\r' | ssh-add - &>/dev/null
mkdir -p ~/.ssh
chmod 700 ~/.ssh
ssh-keyscan $SERVER >> ~/.ssh/known_hosts
chmod 644 ~/.ssh/known_hosts
ssh -L 11211:localhost:11211 -N -T -f -o ExitOnForwardFailure=yes -o ServerAliveInterval=10 -o ServerAliveCountMax=3 ci@$SERVER &>/dev/null
echo "stats" | nc -q 1 localhost 11211
- name: Verify
if: ${{ needs.skip_check_spark.outputs.should_skip != 'true' }}
run: |
make prove_tests TEST=${{ matrix.test }}
verification_spark_scheduled:
name: Verification
if: github.event.schedule
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
test:
- "in_ethernet"
- "in_ipv4"
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Determine exact Python version
run:
echo "PYTHON_VERSION=$(python -c 'import platform; print(platform.python_version())')" >> $GITHUB_ENV
- name: Cache Python dependencies
uses: actions/cache@v2
with:
path: |
~/.cache/pip
~/.local/lib/python${{ matrix.python-version }}/site-packages
~/.local/bin
key: ${{ runner.os }}-python${{ env.PYTHON_VERSION }}-${{ hashFiles('setup.py', '*.cfg', '*.ini', '.pylintrc', '.flake8') }}
- name: Cache GNAT Community
uses: actions/cache@v2
with:
path: /home/runner/work/gnat
key: ${{ runner.os }}-gnat-ce2021
- name: Install GNAT Community
uses: ada-actions/toolchain@ce2021
with:
distrib: community
install_dir: /home/runner/work/gnat
- name: Install dependencies
run: |
echo "$HOME/.local/bin" >> $GITHUB_PATH
echo "PYTHONPATH=$PWD" >> $GITHUB_ENV
sudo apt install libgmp-dev patchelf
python -m pip install --upgrade pip wheel
make install_devel
- name: Connect to Memcached server
shell: bash
env:
SSH_KEY: ${{ secrets.MEMCACHED_SSH_KEY }}
SERVER: ${{ secrets.MEMCACHED_SERVER }}
run: |
eval $(ssh-agent -s)
echo "$SSH_KEY" | tr -d '\r' | ssh-add - &>/dev/null
mkdir -p ~/.ssh
chmod 700 ~/.ssh
ssh-keyscan $SERVER >> ~/.ssh/known_hosts
chmod 644 ~/.ssh/known_hosts
ssh -L 11211:localhost:11211 -N -T -f -o ExitOnForwardFailure=yes -o ServerAliveInterval=10 -o ServerAliveCountMax=3 ci@$SERVER &>/dev/null
echo "stats" | nc -q 1 localhost 11211
- name: Verify
run: |
make prove_tests TEST=${{ matrix.test }}
skip_check_apps:
name: Skip Check Apps
continue-on-error: true
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v3.4.0
with:
paths: '["defaults.gpr", "examples/apps/**", "rflx/**"]'
tests_apps:
name: App Tests
needs: skip_check_apps
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
python-version:
- 3.7
- 3.8
- 3.9
gnat-distrib:
- "community"
include:
- python-version: 3.7
gnat-distrib: "fsf"
steps:
- uses: actions/checkout@v2
if: ${{ needs.skip_check_apps.outputs.should_skip != 'true' }}
with:
submodules: true
- name: Set up Python ${{ matrix.python-version }}
if: ${{ needs.skip_check_apps.outputs.should_skip != 'true' }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Determine exact Python version
if: ${{ needs.skip_check_apps.outputs.should_skip != 'true' }}
run:
echo "PYTHON_VERSION=$(python -c 'import platform; print(platform.python_version())')" >> $GITHUB_ENV
- name: Cache Python dependencies
if: ${{ needs.skip_check_apps.outputs.should_skip != 'true' }}
uses: actions/cache@v2
with:
path: |
~/.cache/pip
~/.local/lib/python${{ matrix.python-version }}/site-packages
~/.local/bin
key: ${{ runner.os }}-python${{ env.PYTHON_VERSION }}-${{ hashFiles('setup.py', '*.cfg', '*.ini', '.pylintrc', '.flake8') }}
- name: Cache GNAT Community
if: ${{ needs.skip_check_apps.outputs.should_skip != 'true' }}
uses: actions/cache@v2
with:
path: /home/runner/work/gnat
key: ${{ runner.os }}-gnat-ce2021
- name: Install GNAT Community
if: ${{ needs.skip_check_apps.outputs.should_skip != 'true' }}
uses: ada-actions/toolchain@ce2021
with:
distrib: community
install_dir: /home/runner/work/gnat
- name: Install dependencies
if: ${{ needs.skip_check_apps.outputs.should_skip != 'true' }}
run: |
echo "$HOME/.local/bin" >> $GITHUB_PATH
echo "PYTHONPATH=$PWD" >> $GITHUB_ENV
echo "HYPOTHESIS_PROFILE=ci" >> $GITHUB_ENV
echo "PYTEST_ADDOPTS=--basetemp=build" >> $GITHUB_ENV
sudo apt install graphviz libgmp-dev patchelf
python -m pip install --upgrade pip wheel
make install_devel
- name: Install Alire
if: ${{ needs.skip_check_apps.outputs.should_skip != 'true' && matrix.gnat-distrib == 'fsf' }}
uses: alire-project/setup-alire@v1
- name: Install FSF GNAT
if: ${{ needs.skip_check_apps.outputs.should_skip != 'true' && matrix.gnat-distrib == 'fsf' }}
run: |
make install_gnat
- name: Configure kernel parameters
if: ${{ needs.skip_check_apps.outputs.should_skip != 'true' }}
run: |
sudo /sbin/sysctl -w net.ipv4.ping_group_range="0 2147483647"
- name: Test
if: ${{ needs.skip_check_apps.outputs.should_skip != 'true' }}
run: |
eval `make printenv_gnat`
gnat --version
make test_apps
verification_apps:
name: App Verification
needs: skip_check_apps
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
app:
- ping
- dhcp_client
steps:
- uses: actions/checkout@v2
if: ${{ needs.skip_check_apps.outputs.should_skip != 'true' }}
with:
submodules: true
- name: Set up Python
if: ${{ needs.skip_check_apps.outputs.should_skip != 'true' }}
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Determine exact Python version
if: ${{ needs.skip_check_apps.outputs.should_skip != 'true' }}
run:
echo "PYTHON_VERSION=$(python -c 'import platform; print(platform.python_version())')" >> $GITHUB_ENV
- name: Cache Python dependencies
if: ${{ needs.skip_check_apps.outputs.should_skip != 'true' }}
uses: actions/cache@v2
with:
path: |
~/.cache/pip
~/.local/lib/python${{ matrix.python-version }}/site-packages
~/.local/bin
key: ${{ runner.os }}-python${{ env.PYTHON_VERSION }}-${{ hashFiles('setup.py', '*.cfg', '*.ini', '.pylintrc', '.flake8') }}
- name: Cache GNAT Community
if: ${{ needs.skip_check_apps.outputs.should_skip != 'true' }}
uses: actions/cache@v2
with:
path: /home/runner/work/gnat
key: ${{ runner.os }}-gnat-ce2021
- name: Install GNAT Community
if: ${{ needs.skip_check_apps.outputs.should_skip != 'true' }}
uses: ada-actions/toolchain@ce2021
with:
distrib: community
install_dir: /home/runner/work/gnat
- name: Install dependencies
if: ${{ needs.skip_check_apps.outputs.should_skip != 'true' }}
run: |
echo "$HOME/.local/bin" >> $GITHUB_PATH
echo "PYTHONPATH=$PWD" >> $GITHUB_ENV
sudo apt install libgmp-dev patchelf
python -m pip install --upgrade pip wheel
make install_devel
- name: Connect to Memcached server
if: ${{ needs.skip_check_apps.outputs.should_skip != 'true' }}
shell: bash
env:
SSH_KEY: ${{ secrets.MEMCACHED_SSH_KEY }}
SERVER: ${{ secrets.MEMCACHED_SERVER }}
run: |
eval $(ssh-agent -s)
echo "$SSH_KEY" | tr -d '\r' | ssh-add - &>/dev/null
mkdir -p ~/.ssh
chmod 700 ~/.ssh
ssh-keyscan $SERVER >> ~/.ssh/known_hosts
chmod 644 ~/.ssh/known_hosts
ssh -L 11211:localhost:11211 -N -T -f -o ExitOnForwardFailure=yes -o ServerAliveInterval=10 -o ServerAliveCountMax=3 ci@$SERVER &>/dev/null
echo "stats" | nc -q 1 localhost 11211
- name: Verify
if: ${{ needs.skip_check_apps.outputs.should_skip != 'true' }}
run: |
make -C examples/apps/${{ matrix.app }} prove
skip_check_specs:
name: Skip Check Specs
continue-on-error: true
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v3.4.0
with:
paths: '["defaults.gpr", "examples/specs/**", "rflx/**"]'
tests_specs:
name: Specification Tests
needs: skip_check_specs
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
gnat-distrib:
- "community"
- "fsf"
steps:
- uses: actions/checkout@v2
if: ${{ needs.skip_check_specs.outputs.should_skip != 'true' }}
with:
submodules: true
- name: Set up Python ${{ matrix.python-version }}
if: ${{ needs.skip_check_specs.outputs.should_skip != 'true' }}
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Determine exact Python version
if: ${{ needs.skip_check_specs.outputs.should_skip != 'true' }}
run:
echo "PYTHON_VERSION=$(python -c 'import platform; print(platform.python_version())')" >> $GITHUB_ENV
- name: Cache Python dependencies
if: ${{ needs.skip_check_specs.outputs.should_skip != 'true' }}
uses: actions/cache@v2
with:
path: |
~/.cache/pip
~/.local/lib/python${{ matrix.python-version }}/site-packages
~/.local/bin
key: ${{ runner.os }}-python${{ env.PYTHON_VERSION }}-${{ hashFiles('setup.py', '*.cfg', '*.ini', '.pylintrc', '.flake8') }}
- name: Cache GNAT Community
if: ${{ needs.skip_check_specs.outputs.should_skip != 'true' }}
uses: actions/cache@v2
with:
path: /home/runner/work/gnat
key: ${{ runner.os }}-gnat-ce2021
- name: Install GNAT Community
if: ${{ needs.skip_check_specs.outputs.should_skip != 'true' }}
uses: ada-actions/toolchain@ce2021
with:
distrib: community
install_dir: /home/runner/work/gnat
- name: Install dependencies
if: ${{ needs.skip_check_specs.outputs.should_skip != 'true' }}
run: |
echo "$HOME/.local/bin" >> $GITHUB_PATH
echo "PYTHONPATH=$PWD" >> $GITHUB_ENV
echo "HYPOTHESIS_PROFILE=ci" >> $GITHUB_ENV
echo "PYTEST_ADDOPTS=--basetemp=build" >> $GITHUB_ENV
sudo apt install graphviz libgmp-dev patchelf
python -m pip install --upgrade pip wheel
make install_devel
- name: Install Alire
if: ${{ needs.skip_check_specs.outputs.should_skip != 'true' && matrix.gnat-distrib == 'fsf' }}
uses: alire-project/setup-alire@v1
- name: Install FSF GNAT
if: ${{ needs.skip_check_specs.outputs.should_skip != 'true' && matrix.gnat-distrib == 'fsf' }}
run: |
make install_gnat
- name: Test
if: ${{ needs.skip_check_specs.outputs.should_skip != 'true' }}
run: |
eval `make printenv_gnat`
gnat --version
make test_specs