Skip to content

ci: add github actions for checking docs, antlr grammar, and proofs when files are changed #16135

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 0 additions & 44 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -210,12 +210,6 @@ commands:
name: Build_ossfuzz
command: scripts/ci/build_ossfuzz.sh

run_proofs:
steps:
- run:
name: Correctness proofs for optimization rules
command: scripts/run_proofs.sh

run_soltest:
steps:
- run:
Expand Down Expand Up @@ -244,12 +238,6 @@ commands:
no_output_timeout: 30m
command: .circleci/parallel_cli_tests.py

run_docs_pragma_min_version:
steps:
- run:
name: docs pragma version check
command: scripts/docs_version_pragma_check.sh

# --------------------------------------------------------------------------
# Artifact Commands

Expand Down Expand Up @@ -961,20 +949,6 @@ jobs:
command: scripts/pylint_all.py
- matrix_notify_failure_unless_pr

chk_antlr_grammar:
<<: *base_cimg_small
steps:
- checkout
- run:
name: Install Java
command: |
sudo apt -q update
sudo apt install -y openjdk-17-jdk
- run:
name: Run tests
command: scripts/test_antlr_grammar.sh
- matrix_notify_failure_unless_pr

chk_buglist:
<<: *base_node_small
steps:
Expand All @@ -990,20 +964,6 @@ jobs:
command: test/buglistTests.js
- matrix_notify_failure_unless_pr

chk_proofs:
<<: *base_ubuntu2404_small
steps:
- checkout
- run_proofs
- matrix_notify_failure_unless_pr

chk_docs_pragma_min_version:
<<: *base_ubuntu2404_small
steps:
- checkout
- run_docs_pragma_min_version
- matrix_notify_failure_unless_pr

t_ubu_pyscripts:
<<: *base_ubuntu2404_small
steps:
Expand Down Expand Up @@ -1879,17 +1839,13 @@ workflows:
- chk_coding_style: *requires_nothing
# DISABLED FOR 0.6.0 - chk_docs_examples: *requires_nothing
- chk_buglist: *requires_nothing
- chk_proofs: *requires_nothing
- chk_pylint: *requires_nothing
- chk_errorcodes: *requires_nothing
- chk_antlr_grammar: *requires_nothing
- chk_docs_pragma_min_version: *requires_nothing
- t_ubu_pyscripts: *requires_nothing
- t_win_pyscripts: *requires_nothing

# build-only
- b_docs: *requires_nothing
- b_ubu_ossfuzz: *requires_nothing
- b_ubu_2204: *requires_nothing
- b_ubu_2204_clang: *requires_nothing

Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/check-antlr-grammar.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: ANTLR Grammar Check

on:
push:
paths:
- 'docs/grammar/**'
pull_request:
paths:
- 'docs/grammar/**'

jobs:
chk_antlr_grammar:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'

- name: Run ANTLR grammar tests
run: scripts/test_antlr_grammar.sh
82 changes: 82 additions & 0 deletions .github/workflows/check-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: Documentation Checks and Build

on:
push:
paths:
- 'docs/**'
pull_request:
paths:
- 'docs/**'

jobs:
chk_spelling:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Install dependencies
run: |
pip install --user codespell

- name: Check spelling
run: ~/.local/bin/codespell

chk_pylint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Install Python dependencies
run: |
pip install --user pyyaml jsonschema pytest pylint

- name: Check pylint version
run: pylint --version

- name: Linting Python Scripts
run: scripts/pylint_all.py

chk_docs_pragma_min_version:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Check docs pragma version
run: scripts/docs_version_pragma_check.sh

b_docs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Store commit hash and prerelease
run: |
if [[ $GITHUB_REF == refs/heads/release || $GITHUB_REF == refs/tags/* ]]; then
echo -n > prerelease.txt
else
date -u +"nightly.%Y.%-m.%-d" > prerelease.txt
fi
echo -n "$GITHUB_SHA" > commit_hash.txt

- name: Build documentation
run: docs/docs.sh

- name: Upload documentation artifacts
uses: actions/upload-artifact@v4
with:
name: docs-html
path: docs/_build/html/
19 changes: 19 additions & 0 deletions .github/workflows/check-proofs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Formal Proofs Check

on:
push:
paths:
- 'test/formal/**'
pull_request:
paths:
- 'test/formal/**'

jobs:
chk_proofs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Correctness proofs for optimization rules
run: scripts/run_proofs.sh