Skip to content

Commit 879632d

Browse files
committed
Takeover from eac.useblocks.com
0 parents  commit 879632d

66 files changed

Lines changed: 12714 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.devcontainer/Dockerfile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Use the same base image as the devcontainer
2+
FROM mcr.microsoft.com/vscode/devcontainers/base:ubuntu24.04
3+
4+
# Install necessary packages using a single RUN command to optimize layers
5+
RUN apt-get update \
6+
&& apt-get install -y --no-install-recommends \
7+
default-jre \
8+
graphviz \
9+
cmake \
10+
&& rm -rf /var/lib/apt/lists/*
11+
12+
13+
# Install uv
14+
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
15+
ENV PATH="/root/.local/bin:$PATH"
16+
# Set the default working directory and user
17+
WORKDIR /workspace
18+
USER vscode
19+
20+
21+

.devcontainer/devcontainer.json

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"name": "xac",
3+
"build": {
4+
"dockerfile": "./Dockerfile",
5+
"context": "."
6+
},
7+
"postCreateCommand": "bash -i ./scripts/postCreateCommand.sh",
8+
// use ubCode environment variables as an alternavtive too mounting in the .ubcode folder
9+
"containerEnv": {
10+
"UBCODE_LICENSE_KEY": "${localEnv:UBCODE_LICENSE_KEY}",
11+
"UBCODE_LICENSE_USER": "${localEnv:UBCODE_LICENSE_USER}"
12+
},
13+
"mounts": [
14+
//"source=${localEnv:HOME}/.cache,target=/home/vscode/.cache,type=bind,consistency=cached",
15+
//"source=${localEnv:HOME}/.ssh,target=/home/vscode/.ssh,type=bind,consistency=cached",
16+
//"source=${localEnv:HOME}/.netrc,target=/home/vscode/.netrc,type=bind,consistency=cached",
17+
"source=${localEnv:HOME}/.docker,target=/home/vscode/.docker,type=bind,consistency=cached",
18+
//"source=${localEnv:HOME}/.ubcode,target=/home/vscode/.config/ubcode,type=bind,consistency=cached",
19+
"source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind"
20+
],
21+
"customizations": {
22+
"vscode": {
23+
"settings": {},
24+
"extensions": [
25+
"useblocks.ubcode",
26+
"ms-python.python"
27+
]
28+
},
29+
"settings": {
30+
"terminal.integrated.shell.linux": "bash",
31+
"terminal.integrated.profiles.linux": {
32+
"bash (container default)": {
33+
"path": "/usr/bin/bash",
34+
"overrideName": true
35+
}
36+
}
37+
}
38+
},
39+
"remoteUser": "vscode",
40+
"runArgs": [
41+
"--shm-size=2gb",
42+
"--network=host",
43+
"--cap-add=SYS_PTRACE",
44+
"--security-opt",
45+
"seccomp=unconfined",
46+
"--privileged"
47+
]
48+
}

.github/workflows/gh_pages.yml

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
# Workflow for building and deploying the Sphinx site to GitHub Pages
2+
#
3+
name: Deploy docs to GH Pages
4+
5+
on:
6+
# Runs on pushes targeting the default branch
7+
push:
8+
branches: ["main"]
9+
10+
# Allows you to run this workflow manually from the Actions tab
11+
workflow_dispatch:
12+
13+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
14+
permissions:
15+
contents: read
16+
pages: write
17+
id-token: write
18+
19+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
20+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
21+
concurrency:
22+
group: "pages"
23+
cancel-in-progress: false
24+
25+
env:
26+
BUILD_TYPE: Release
27+
28+
jobs:
29+
cpp-build:
30+
name: C++ Build and Test
31+
runs-on: ubuntu-latest
32+
steps:
33+
- uses: actions/checkout@v5
34+
- uses: lukka/get-cmake@latest
35+
36+
# Install lcov for coverage support
37+
- name: Install lcov
38+
run: sudo apt-get update && sudo apt-get install -y lcov
39+
40+
- name: Build C++ Project with Tests
41+
working-directory: src
42+
run: |
43+
# Configure CMake without coverage for CI (coverage can be added later if needed)
44+
cmake -B build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
45+
46+
# Build the project
47+
cmake --build build --config ${{env.BUILD_TYPE}}
48+
49+
- name: Run C++ Tests
50+
working-directory: src/build
51+
run: |
52+
# Run tests with XML output
53+
./eac_test --gtest_output=xml:test-results.xml
54+
55+
- name: Upload Test Results
56+
uses: actions/upload-artifact@v4
57+
with:
58+
name: test-results
59+
path: src/build/test-results.xml
60+
61+
build:
62+
name: Build Documentation
63+
runs-on: ubuntu-latest
64+
needs: cpp-build
65+
steps:
66+
- uses: actions/checkout@v5
67+
68+
- name: Setup Pages
69+
id: pages
70+
uses: actions/configure-pages@v5
71+
72+
- name: Download Test Results
73+
uses: actions/download-artifact@v4
74+
with:
75+
name: test-results
76+
path: src/build
77+
78+
- name: Install System Dependencies
79+
run: sudo apt-get update && sudo apt-get install -y graphviz plantuml
80+
81+
- name: Install uv
82+
uses: astral-sh/setup-uv@v5
83+
with:
84+
enable-cache: true
85+
86+
- name: Install Python dependencies
87+
run: uv sync
88+
89+
- name: Build Sphinx Documentation
90+
run: uv run sphinx-build -b html docs docs/_build/html
91+
92+
- name: Upload Documentation Artifact
93+
uses: actions/upload-pages-artifact@v4
94+
with:
95+
path: docs/_build/html
96+
97+
deploy:
98+
environment:
99+
name: github-pages
100+
url: ${{ steps.deployment.outputs.page_url }}
101+
needs: build
102+
runs-on: ubuntu-latest
103+
name: Deploy
104+
steps:
105+
- name: Deploy to GitHub Pages
106+
id: deployment
107+
uses: actions/deploy-pages@v4

.github/workflows/pr_checks.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Workflow for building and testing on pull requests
2+
#
3+
name: PR Checks
4+
5+
on:
6+
# Runs on pull requests targeting the main branch
7+
pull_request:
8+
branches: ["main"]
9+
10+
# Allows you to run this workflow manually from the Actions tab
11+
workflow_dispatch:
12+
13+
env:
14+
BUILD_TYPE: Release
15+
16+
jobs:
17+
cpp-build:
18+
name: C++ Build and Test
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v5
22+
- uses: lukka/get-cmake@latest
23+
24+
# Install lcov for coverage support
25+
- name: Install lcov
26+
run: sudo apt-get update && sudo apt-get install -y lcov
27+
28+
- name: Build C++ Project with Tests
29+
working-directory: src
30+
run: |
31+
# Configure CMake without coverage for CI
32+
cmake -B build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
33+
34+
# Build the project
35+
cmake --build build --config ${{env.BUILD_TYPE}}
36+
37+
- name: Run C++ Tests
38+
working-directory: src/build
39+
run: |
40+
# Run tests with XML output
41+
./eac_test --gtest_output=xml:test-results.xml
42+
43+
- name: Upload Test Results
44+
uses: actions/upload-artifact@v4
45+
with:
46+
name: test-results
47+
path: src/build/test-results.xml
48+
49+
build:
50+
name: Build Documentation
51+
runs-on: ubuntu-latest
52+
needs: cpp-build
53+
steps:
54+
- uses: actions/checkout@v4
55+
56+
- name: Download Test Results
57+
uses: actions/download-artifact@v4
58+
with:
59+
name: test-results
60+
path: src/build
61+
62+
- name: Install System Dependencies
63+
run: sudo apt-get update && sudo apt-get install -y graphviz plantuml
64+
65+
- name: Install uv
66+
uses: astral-sh/setup-uv@v5
67+
with:
68+
enable-cache: true
69+
70+
- name: Install Python dependencies
71+
run: uv sync
72+
73+
- name: Build Sphinx Documentation
74+
run: uv run sphinx-build -E -a -b html docs docs/_build/html

.gitignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# python generated files
2+
__pycache__/
3+
*.py[oc]
4+
build/
5+
dist/
6+
wheels/
7+
*.egg-info
8+
9+
# venv
10+
.venv
11+
.python-version
12+
_build
13+
.report.json
14+
.vscode
15+
*.bkp
16+
17+
# macOS
18+
.DS_Store
19+
20+
# C++ testing
21+
src/Testing/

0 commit comments

Comments
 (0)