Test script: introducing support for multiple toolchain versions #1195
Workflow file for this run
This file contains 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: 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 OS Deps | |
run: | | |
sudo apt-get update && \ | |
sudo apt-get install -y \ | |
crudini | |
- name: Install GNAT FSF | |
run: | | |
toolchain_config=${GITHUB_WORKSPACE}/frontend/py_modules/code_projects/toolchain.ini | |
path_ada_toolchain_root=$(crudini --get $toolchain_config toolchain_path root) | |
path_ada_toolchain_default=$(crudini --get $toolchain_config toolchain_path default) | |
path_ada_toolchain_selected=$(crudini --get $toolchain_config toolchain_path selected) | |
default_version_gnat=$(crudini --get $toolchain_config default_version gnat) | |
default_version_gnatprove=$(crudini --get $toolchain_config default_version gnatprove) | |
default_version_gprbuild=$(crudini --get $toolchain_config default_version gprbuild) | |
toolchain_versions_gnat=$(crudini --get $toolchain_config toolchains gnat) | |
toolchain_versions_gnatprove=$(crudini --get $toolchain_config toolchains gnatprove) | |
toolchain_versions_gprbuild=$(crudini --get $toolchain_config toolchains gprbuild) | |
echo path_ada_toolchain_root: $path_ada_toolchain_root | |
echo path_ada_toolchain_default: $path_ada_toolchain_default | |
echo path_ada_toolchain_selected: $path_ada_toolchain_selected | |
echo default_version_gnat: $default_version_gnat | |
echo default_version_gnatprove: $default_version_gnatprove | |
echo default_version_gprbuild: $default_version_gprbuild | |
echo toolchain_versions_gnat: $toolchain_versions_gnat | |
echo toolchain_versions_gnatprove $toolchain_versions_gnatprove | |
echo toolchain_versions_gprbuild $toolchain_versions_gprbuild | |
sudo mkdir -p ${path_ada_toolchain_root} | |
sudo mkdir -p ${path_ada_toolchain_default} | |
sudo mkdir -p ${path_ada_toolchain_selected} | |
gnat_version=(${toolchain_versions_gnat}) | |
sudo mkdir ${path_ada_toolchain_root}/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-* ${path_ada_toolchain_root}/gnat/${tool_version} && \ | |
sudo rm *.tar.gz | |
done | |
sudo echo "${path_ada_toolchain_default}/gnat/bin" >> $GITHUB_PATH | |
sudo echo "${path_ada_toolchain_selected}/gnat/bin" >> $GITHUB_PATH | |
gnat_prove_version=(${toolchain_versions_gnatprove}) | |
sudo mkdir ${path_ada_toolchain_root}/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-* ${path_ada_toolchain_root}/gnatprove/${tool_version} && \ | |
sudo rm *.tar.gz | |
done | |
sudo echo "${path_ada_toolchain_default}/gnatprove/bin" >> $GITHUB_PATH | |
sudo echo "${path_ada_toolchain_selected}/gnatprove/bin" >> $GITHUB_PATH | |
gprbuild_version=(${toolchain_versions_gprbuild}) | |
sudo mkdir ${path_ada_toolchain_root}/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-* ${path_ada_toolchain_root}/gprbuild/${tool_version} && \ | |
sudo rm *.tar.gz | |
done | |
sudo echo "${path_ada_toolchain_default}/gprbuild/bin" >> $GITHUB_PATH | |
sudo echo "${path_ada_toolchain_selected}/gprbuild/bin" >> $GITHUB_PATH | |
sudo ln -sf ${path_ada_toolchain_root}/gnat/${default_version_gnat} ${path_ada_toolchain_default}/gnat | |
sudo ln -sf ${path_ada_toolchain_root}/gnatprove/${default_version_gnatprove} ${path_ada_toolchain_default}/gnatprove | |
sudo ln -sf ${path_ada_toolchain_root}/gprbuild/${default_version_gprbuild} ${path_ada_toolchain_default}/gprbuild | |
sudo chmod -R ugo+w ${path_ada_toolchain_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 |