Skip to content

Test script: introducing support for multiple toolchain versions #1190

Test script: introducing support for multiple toolchain versions

Test script: introducing support for multiple toolchain versions #1190

name: Sphinx Plugin Tests
on:
push:
paths:
- 'frontend/sphinx/tests/**'
- 'frontend/sphinx/widget/**'
pull_request:
branches:
- master
defaults:
run:
working-directory: frontend
jobs:
sphinx-plugin:
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: ['3.11']
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install GNAT FSF
run: |
sudo mkdir -p /opt/ada/default
sudo mkdir -p /opt/ada/selected
gnat_version=("12.2.0-1" "14.1.0-3")
sudo mkdir /opt/ada/gnat
for tool_version in ${gnat_version[@]}; do
echo Installing GNAT $tool_version
sudo wget -O gnat.tar.gz https://github.com/alire-project/GNAT-FSF-builds/releases/download/gnat-${tool_version}/gnat-x86_64-linux-${tool_version}.tar.gz && \
sudo tar xzf gnat.tar.gz && \
sudo mv gnat-* /opt/ada/gnat/${tool_version} && \
sudo rm *.tar.gz
done
sudo echo "/opt/ada/default/gnat/bin" >> $GITHUB_PATH
sudo echo "/opt/ada/selected/gnat/bin" >> $GITHUB_PATH
gnat_prove_version=("12.1.0-1" "14.1.0-1")
sudo mkdir /opt/ada/gnatprove
for tool_version in ${gnat_prove_version[@]}; do
echo Installing GNATprove $v
sudo wget -O gnatprove.tar.gz https://github.com/alire-project/GNAT-FSF-builds/releases/download/gnatprove-${tool_version}/gnatprove-x86_64-linux-${tool_version}.tar.gz && \
sudo tar xzf gnatprove.tar.gz && \
sudo mv gnatprove-* /opt/ada/gnatprove/${tool_version} && \
sudo rm *.tar.gz
done
sudo echo "/opt/ada/default/gnatprove/bin" >> $GITHUB_PATH
sudo echo "/opt/ada/selected/gnatprove/bin" >> $GITHUB_PATH
gprbuild_version=("22.0.0-1" "24.0.0-1")
sudo mkdir /opt/ada/gprbuild
for tool_version in ${gprbuild_version[@]}; do
echo Installing GPRbuild $v
sudo wget -O gprbuild.tar.gz https://github.com/alire-project/GNAT-FSF-builds/releases/download/gprbuild-${tool_version}/gprbuild-x86_64-linux-${tool_version}.tar.gz && \
sudo tar xzf gprbuild.tar.gz && \
sudo mv gprbuild-* /opt/ada/gprbuild/${tool_version} && \
sudo rm *.tar.gz
done
sudo echo "/opt/ada/default/gprbuild/bin" >> $GITHUB_PATH
sudo echo "/opt/ada/selected/gprbuild/bin" >> $GITHUB_PATH
sudo ln -sf /opt/ada/gnat/12.2.0-1 /opt/ada/default/gnat
sudo ln -sf /opt/ada/gnatprove/12.1.0-1 /opt/ada/default/gnatprove
sudo ln -sf /opt/ada/gprbuild/22.0.0-1 /opt/ada/default/gnatprove
sudo chmod -R ugo+w /opt/ada/selected
- name: Increase max user watches
run: |
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && \
sudo sysctl -p
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Test Sphinx Widget Parser Plugin
run: make test_parser