-
Notifications
You must be signed in to change notification settings - Fork 1
122 lines (115 loc) · 3.01 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
cpp:
runs-on: ubuntu-latest
container: makeappdev/cpp-dev:24.04
strategy:
matrix:
include:
- compiler: gcc
- compiler: clang
steps:
- uses: actions/checkout@v4
- name: Build ${{ matrix.compiler }}
run: |
use_${{ matrix.compiler }}.sh
mkdir -p build
cd build
cmake -DCMAKE_BUILD_TYPE=Debug ..
make -j8
make test
make coverage
cd ..
- uses: actions/upload-artifact@v4
with:
path: build/ccov/all-merged
name: artifacts-cpp-${{ matrix.compiler }}
python:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
env:
UV_SYSTEM_PYTHON: 1
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
uv pip install -r requirements.txt
- name: Tests
run: make test
- name: Coverage
run: make coverage_reports
- uses: actions/upload-artifact@v4
with:
path: tools/htmlcov
name: artifacts-python
AsciiDoc:
runs-on: ubuntu-latest
container: asciidoctor/docker-asciidoctor:latest
steps:
- name: Install rsync
run: apk add rsync
- uses: actions/checkout@v4
- name: Build
run: |
cd docs
make html
make pdf
cd ..
- uses: actions/upload-artifact@v4
with:
path: docs/output
name: artifacts-docs
slides:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build
run: |
mkdir -p build && chmod -R 0777 build
make slides
- uses: actions/upload-artifact@v4
with:
path: slides/build
name: artifacts-slides
deploy:
needs:
- cpp
- python
- AsciiDoc
- slides
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download all workflow run artifacts
uses: actions/download-artifact@v4
- name: Prepare Deploy
run: |
mkdir -p public
mv artifacts-slides/* public
mv artifacts-docs/* public
mkdir -p public/coverage
mv artifacts-cpp-clang public/coverage/cpp
mv artifacts-python/ public/coverage/python
mkdir -p public/export
make package
mv export/*.zip public/export
make solution_package
mv export/*.zip public/export
echo "# This branch is for deployment only" >> public/README.md
- name: Deploy Artifacts
if: github.ref == 'refs/heads/master'
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: public
single-commit: true
silent: true