Skip to content
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
17 changes: 10 additions & 7 deletions .git-hooks/pre-push.py
Original file line number Diff line number Diff line change
Expand Up @@ -506,14 +506,17 @@ def run(self) -> int:
if not self.abort and first_new_commit is not None:
self.check_changed_files(first_new_commit)

return 0 if (self.errors == 0 and not self.abort) else 1
print('Checking documentation coverage for LLVM Backend...')
mono_repo_dir = edgutil.find_mono_repo_or_exit()
doc_check_proc = subprocess.run(
[sys.executable, 'dev_tools/check_doc_coverage.py', 'src/llvm_gen_be.cpp', 'src/llvm_gen_be_abi_aapcs64.cpp', 'src/llvm_gen_be_abi_arm32.cpp', 'src/llvm_gen_be_abi_loongarch64.cpp', 'src/llvm_gen_be_abi_mips.cpp', 'src/llvm_gen_be_abi_ppc64.cpp', 'src/llvm_gen_be_abi_riscv64.cpp', 'src/llvm_gen_be_abi_s390x.cpp', 'src/llvm_gen_be_abi_sparc.cpp', 'src/llvm_gen_be_abi_sysv_x86_64.cpp', 'src/llvm_gen_be_abi_wasm.cpp', 'src/llvm_gen_be_abi_win64.cpp', 'src/llvm_gen_be_abi_x86_32.cpp', 'src/llvm_gen_be_asm.cpp', 'src/llvm_gen_be_codegen.cpp', 'src/llvm_gen_be_const.cpp', 'src/llvm_gen_be_coro.cpp', 'src/llvm_gen_be_debug.cpp', 'src/llvm_gen_be_debug_scopes.cpp', 'src/llvm_gen_be_debug_types.cpp', 'src/llvm_gen_be_decl.cpp', 'src/llvm_gen_be_eh.cpp', 'src/llvm_gen_be_error.cpp', 'src/llvm_gen_be_expr.cpp', 'src/llvm_gen_be_omp.cpp', 'src/llvm_gen_be_opt.cpp', 'src/llvm_gen_be_ptrmem.cpp', 'src/llvm_gen_be_rtti.cpp', 'src/llvm_gen_be_stmt.cpp', 'src/llvm_gen_be_type.cpp', 'src/llvm_gen_be_vtable.cpp'],
cwd = mono_repo_dir
)
if doc_check_proc.returncode != 0:
print(' [POLICY] LLVM Backend documentation coverage check failed.')
self.errors += 1

def wait_for_minimum_run_time() -> None:
'''Sleep until the hook has been running for MIN_RUN_SECONDS.'''
remaining = MIN_RUN_SECONDS - (time.monotonic() - START_TIME)
if remaining > 0:
print(f"Pushing in {remaining:.0f}s (Ctrl-C to cancel)...")
time.sleep(remaining)
return 0 if (self.errors == 0 and not self.abort) else 1

def wait_for_minimum_run_time() -> None:
'''Sleep until the hook has been running for MIN_RUN_SECONDS.'''
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/acknowledg-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ env:
jobs:
client:
name: Deploy client
if: github.ref == 'refs/heads/main'
if: github.repository == 'edgcpp/compiler' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
timeout-minutes: 15
environment: acknowledg
Expand Down Expand Up @@ -118,7 +118,7 @@ jobs:

server:
name: Deploy server
if: github.ref == 'refs/heads/main'
if: github.repository == 'edgcpp/compiler' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
timeout-minutes: 15
environment: acknowledg
Expand All @@ -129,7 +129,7 @@ jobs:
persist-credentials: false

- name: Set up uv
uses: astral-sh/setup-uv@v10.3.0
uses: astral-sh/setup-uv@v10.3.3

- name: Build server wheel
id: build
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/acknowledg-forge-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ permissions:
jobs:
test:
name: Test
if: github.ref == 'refs/heads/main'
if: github.repository == 'edgcpp/compiler' && github.ref == 'refs/heads/main'
uses: ./.github/workflows/acknowledg-forge.yml

publish:
Expand All @@ -69,7 +69,7 @@ jobs:
persist-credentials: false

- name: Set up uv
uses: astral-sh/setup-uv@v10.3.0
uses: astral-sh/setup-uv@v10.3.3

- name: Build image
env:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/acknowledg-forge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
persist-credentials: false

- name: Set up uv
uses: astral-sh/setup-uv@v10.3.0
uses: astral-sh/setup-uv@v10.3.3

- name: Typecheck
run: dev_tools/services/acknowledg-forge/typecheck.sh
Expand All @@ -79,7 +79,7 @@ jobs:
persist-credentials: false

- name: Set up uv
uses: astral-sh/setup-uv@v10.3.0
uses: astral-sh/setup-uv@v10.3.3

- name: Build image
env:
Expand Down
24 changes: 22 additions & 2 deletions .github/workflows/build-and-test-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ jobs:
timeout-minutes: 15
steps:
- name: Download partial test-result artifacts
uses: actions/download-artifact@v7
uses: actions/download-artifact@v8
with:
pattern: test-results-*
path: aggregated-test-results
Expand All @@ -174,6 +174,7 @@ jobs:
RUN_ID: ${{ github.run_id }}
RUN_ATTEMPT: ${{ github.run_attempt }}
run: |
mkdir -p aggregated-test-results
python3 - > aggregated-test-results/ci-meta.json <<'EOF'
import json, os
print(json.dumps({
Expand Down Expand Up @@ -214,7 +215,7 @@ jobs:

- name: Download per-config coverage reports
continue-on-error: true
uses: actions/download-artifact@v7
uses: actions/download-artifact@v8
with:
pattern: coverage-*
path: coverage
Expand Down Expand Up @@ -371,3 +372,22 @@ jobs:
path: bench-results/
if-no-files-found: error
retention-days: 14

coverage-llvm:
name: LLVM Backend Code Coverage
runs-on: ubuntu-24.04
timeout-minutes: 60
steps:
- name: Check out repository
uses: actions/checkout@v7

- name: Install LLVM and Clang Coverage Tools
run: |
sudo apt-get update
sudo apt-get install -y ninja-build cmake clang llvm llvm-dev libomp-dev python3

- name: Verify 100% Doxygen Documentation Coverage
run: python3 dev_tools/check_doc_coverage.py

- name: Verify 100% LLVM Backend Code Coverage
run: python3 dev_tools/check_llvm_be_coverage.py
2 changes: 1 addition & 1 deletion .github/workflows/ci-toolchain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ jobs:
persist-credentials: false

- name: Download ${{ env.CI_PRESET }} build
uses: actions/download-artifact@v7
uses: actions/download-artifact@v8
with:
name: build-${{ env.CI_PRESET }}
# upload-artifact strips the shared build directory prefix, leaving
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/llvm_be_coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: LLVM Backend Coverage

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
coverage:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v7

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y cmake ninja-build clang llvm llvm-dev libomp-dev python3

- name: Verify 100% Documentation Coverage
run: |
python3 dev_tools/check_doc_coverage.py

- name: Run Tests with 100% Coverage
run: |
python3 dev_tools/check_llvm_be_coverage.py
2 changes: 1 addition & 1 deletion .github/workflows/promote-test-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
record: ${{ fromJSON(needs.find.outputs.records) }}
steps:
- name: Download ${{ matrix.record }}
uses: actions/download-artifact@v7
uses: actions/download-artifact@v8
with:
name: ${{ matrix.record }}
path: .tmp/tested
Expand Down
Loading
Loading