Skip to content

Commit 43657ff

Browse files
committed
Update Github Actions
1 parent a822d17 commit 43657ff

4 files changed

Lines changed: 134 additions & 77 deletions

File tree

.github/workflows/build.yml renamed to .github/workflows/build-cross-platform.yml

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,25 @@
1-
name: Build & Test
1+
name: CI
22

3+
# Controls when the workflow will run
34
on:
5+
# Triggers the workflow on push or pull request events but only for the main branch
46
push:
5-
branches: [main, develop]
7+
branches: [ main ]
68
pull_request:
7-
branches: [main, develop]
8-
schedule:
9-
- cron: "0 0 * * 0" # Weekly on Sunday
9+
branches: [ main ]
10+
11+
# Allows you to run this workflow manually from the Actions tab
12+
workflow_dispatch:
1013

1114
jobs:
12-
build:
15+
cross-platform-build:
16+
name: Build (${{ matrix.os }}, ${{ matrix.build-type }})
1317
strategy:
1418
matrix:
19+
# Order: Most important platforms first (Ubuntu for CI, then Windows/macOS)
1520
os: [ubuntu-latest, windows-latest, macos-latest]
16-
build-type: [debug, release, relwithdebinfo]
21+
# Order: Release first (production), then debug (development), then debug+symbols
22+
build-type: [release, debug]
1723
fail-fast: false # Don't cancel other jobs if one fails, to get full test coverage
1824

1925
runs-on: ${{ matrix.os }}
@@ -63,7 +69,7 @@ jobs:
6369
make BUILD_TYPE=${{ matrix.build-type }} clean all -j$(nproc 2>/dev/null || echo 4)
6470
fi
6571
shell: bash
66-
72+
6773
- name: Generate assembly and disassembly
6874
run: |
6975
cd examples/task-manager
@@ -101,9 +107,18 @@ jobs:
101107
fi
102108
shell: bash
103109

104-
test-examples:
105-
runs-on: ubuntu-latest
106-
110+
integration-tests:
111+
112+
name: Integration Tests
113+
needs: cross-platform-build # Ensure this runs after the build job
114+
115+
strategy:
116+
matrix:
117+
os: [ubuntu-latest] # Run tests on Ubuntu for CI, can add Windows/macOS later
118+
fail-fast: false # Don't cancel other jobs if one fails, to get full test coverage
119+
120+
runs-on: ${{ matrix.os }}
121+
107122
steps:
108123
- uses: actions/checkout@v6
109124

@@ -127,4 +142,4 @@ jobs:
127142
[ -f "examples/task-manager/build/app/tm" ] || { echo "task-manager executable not found!"; exit 1; }
128143
echo "✓ task-manager executable built successfully"
129144
[ -f "examples/donut-basic/build/app/donut" ] || { echo "donut-basic executable not found!"; exit 1; }
130-
echo "✓ donut-basic executable built successfully"
145+
echo "✓ donut-basic executable built successfully"

.github/workflows/build-docs.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Build Documentation
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- "examples/ImGui/**"
8+
- ".github/workflows/build-docs.yml"
9+
pull_request:
10+
branches: [main]
11+
paths:
12+
- "examples/ImGui/**"
13+
14+
jobs:
15+
build-doxygen-docs:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v6
19+
20+
- name: Install Doxygen + dependencies
21+
run: |
22+
sudo apt-get update
23+
sudo apt-get install -y doxygen graphviz
24+
25+
- name: Generate documentation (ImGui example)
26+
run: |
27+
cd examples/ImGui
28+
make docs || true
29+
continue-on-error: true
30+
31+
- name: Upload documentation artifact (For debugging purposes)
32+
if: always()
33+
uses: actions/upload-artifact@v4
34+
with:
35+
name: doxygen-html-docs
36+
path: examples/ImGui/build/docs/html/
37+
retention-days: 15

.github/workflows/documentation.yml

Lines changed: 0 additions & 65 deletions
This file was deleted.
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Validate Documentation
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
paths:
7+
- 'README.md'
8+
- 'examples/**/README.md'
9+
- 'examples/**/docs/**'
10+
- '.github/workflows/validate-docs.yml'
11+
pull_request:
12+
branches: [ main ]
13+
paths:
14+
- 'README.md'
15+
- 'examples/**/README.md'
16+
- 'examples/**/docs/**'
17+
workflow_dispatch: # Allows you to run this workflow manually from the Actions tab
18+
19+
# Avoid running multiple instances of this workflow simultaneously on the same branch, which can happen with multiple pushes or PRs. This ensures that only the latest run is active, and previous runs are cancelled.
20+
concurrency:
21+
group: ${{ github.workflow }}-${{ github.ref }}
22+
cancel-in-progress: true
23+
24+
jobs:
25+
26+
markdown-lint:
27+
name: Markdown Lint
28+
runs-on: ubuntu-latest
29+
permissions:
30+
contents: read
31+
32+
steps:
33+
- name: Checkout repository
34+
uses: actions/checkout@v4
35+
with:
36+
fetch-depth: 0 # Fetch all history for accurate linting
37+
38+
- name: Setup Node.js
39+
uses: actions/setup-node@v4
40+
with:
41+
node-version: '20' # versión LTS
42+
cache: 'npm'
43+
44+
- name: Install markdownlint-cli
45+
run: npm install -g markdownlint-cli@0.44
46+
47+
- name: Run markdownlint
48+
run: |
49+
markdownlint --config .markdownlint.jsonc \
50+
"README.md" \
51+
"examples/**/README.md" \
52+
"examples/**/docs/**/*.md" \
53+
|| true
54+
# The || true prevents the build from breaking if there are warnings (you can remove it if you want strict failure)
55+
56+
link-check:
57+
runs-on: ubuntu-latest
58+
permissions:
59+
contents: read
60+
61+
steps:
62+
- uses: actions/checkout@v4
63+
64+
- name: Check for broken links
65+
uses: gaurav-nelson/github-action-markdown-link-check@v1
66+
with:
67+
use-recursive-processing: true
68+
use-quiet-mode: false
69+
base-branch: main
70+
file-extensions: 'md, markdown'

0 commit comments

Comments
 (0)