Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| db47fe1433 | |||
| 6479d1d578 | |||
| 78bf8c9236 | |||
| 3c1d03bb1d | |||
| c18654a0a8 |
@ -2,5 +2,4 @@
|
|||||||
Checks: "bugprone-*, clang-analyzer-*, clang-diagnostic-*, concurrency-*, cppcoreguidelines-*, google-*, misc-*, modernize-*, performance-*, portability-*, -modernize-use-trailing-return-type"
|
Checks: "bugprone-*, clang-analyzer-*, clang-diagnostic-*, concurrency-*, cppcoreguidelines-*, google-*, misc-*, modernize-*, performance-*, portability-*, -modernize-use-trailing-return-type"
|
||||||
WarningsAsErrors: true
|
WarningsAsErrors: true
|
||||||
HeaderFilterRegex: ""
|
HeaderFilterRegex: ""
|
||||||
AnalyzeTemporaryDtors: false
|
|
||||||
FormatStyle: none
|
FormatStyle: none
|
||||||
|
|||||||
@ -5,8 +5,8 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: garm-k8s
|
||||||
container: gitea.shrukanslab.xyz/sl-devs/cpp-template/dev-environment:latest
|
container: gitea.shrukanslab.xyz/shrukan/cpp-template/dev-environment:latest
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository code
|
- name: Check out repository code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@ -14,19 +14,16 @@ jobs:
|
|||||||
- name: Unit test
|
- name: Unit test
|
||||||
run: just test
|
run: just test
|
||||||
|
|
||||||
- name: Compress test report
|
|
||||||
run: tar -czf build/test_logs.tar.gz build/meson-logs
|
|
||||||
|
|
||||||
- name: Archive test report
|
- name: Archive test report
|
||||||
uses: actions/upload-artifact@v3
|
uses: christopherhx/gitea-upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: test_logs
|
name: test_logs
|
||||||
path: build/test_logs.tar.gz
|
path: build/meson-logs
|
||||||
retention-days: 5
|
retention-days: 5
|
||||||
|
|
||||||
coverage:
|
coverage:
|
||||||
runs-on: ubuntu-latest
|
runs-on: garm-k8s
|
||||||
container: gitea.shrukanslab.xyz/sl-devs/cpp-template/dev-environment:latest
|
container: gitea.shrukanslab.xyz/shrukan/cpp-template/dev-environment:latest
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository code
|
- name: Check out repository code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@ -38,15 +35,15 @@ jobs:
|
|||||||
run: tar -czf build/coverage.tar.gz build/meson-logs/coveragereport
|
run: tar -czf build/coverage.tar.gz build/meson-logs/coveragereport
|
||||||
|
|
||||||
- name: Archive coverage report
|
- name: Archive coverage report
|
||||||
uses: actions/upload-artifact@v3
|
uses: christopherhx/gitea-upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: coverage_report
|
name: coverage_report
|
||||||
path: build/coverage.tar.gz
|
path: build/meson-logs/coveragereport
|
||||||
retention-days: 5
|
retention-days: 5
|
||||||
|
|
||||||
static_analysis:
|
static_analysis:
|
||||||
runs-on: ubuntu-latest
|
runs-on: garm-k8s
|
||||||
container: gitea.shrukanslab.xyz/sl-devs/cpp-template/dev-environment:latest
|
container: gitea.shrukanslab.xyz/shrukan/cpp-template/dev-environment:latest
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository code
|
- name: Check out repository code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@ -58,8 +55,8 @@ jobs:
|
|||||||
run: just check
|
run: just check
|
||||||
|
|
||||||
sanitize:
|
sanitize:
|
||||||
runs-on: ubuntu-latest
|
runs-on: garm-k8s
|
||||||
container: gitea.shrukanslab.xyz/sl-devs/cpp-template/dev-environment:latest
|
container: gitea.shrukanslab.xyz/shrukan/cpp-template/dev-environment:latest
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository code
|
- name: Check out repository code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|||||||
@ -7,9 +7,8 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-docs:
|
build-docs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: garm-k8s
|
||||||
|
container: gitea.shrukanslab.xyz/shrukan/cpp-template/dev-environment:latest
|
||||||
container: gitea.shrukanslab.xyz/sl-devs/cpp-template/dev-environment:latest
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository code
|
- name: Check out repository code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@ -20,12 +19,9 @@ jobs:
|
|||||||
- name: Build docs
|
- name: Build docs
|
||||||
run: just docs
|
run: just docs
|
||||||
|
|
||||||
- name: Compress docs
|
|
||||||
run: tar -czf build/docs.tar.gz build/docs
|
|
||||||
|
|
||||||
- name: Archive docs
|
- name: Archive docs
|
||||||
uses: actions/upload-artifact@v3
|
uses: christopherhx/gitea-upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: docs
|
name: docs
|
||||||
path: build/docs.tar.gz
|
path: build/docs
|
||||||
retention-days: 5
|
retention-days: 5
|
||||||
|
|||||||
@ -9,7 +9,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-dev-image:
|
build-dev-image:
|
||||||
runs-on: ubuntu-latest
|
runs-on: garm-k8s
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository code
|
- name: Check out repository code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@ -34,7 +34,7 @@ jobs:
|
|||||||
platforms: linux/amd64
|
platforms: linux/amd64
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
gitea.shrukanslab.xyz/sl-devs/cpp-template/dev-environment:latest
|
gitea.shrukanslab.xyz/shrukan/cpp-template/dev-environment:latest
|
||||||
|
|
||||||
- name: Logout from Docker Registry
|
- name: Logout from Docker Registry
|
||||||
run: docker logout gitea.shrukanslab.xyz
|
run: docker logout gitea.shrukanslab.xyz
|
||||||
|
|||||||
@ -2,15 +2,19 @@
|
|||||||
# See https://pre-commit.com/hooks.html for more hooks
|
# See https://pre-commit.com/hooks.html for more hooks
|
||||||
repos:
|
repos:
|
||||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
rev: v4.4.0
|
rev: v4.5.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: trailing-whitespace
|
- id: trailing-whitespace
|
||||||
|
stages: [pre-commit]
|
||||||
- id: end-of-file-fixer
|
- id: end-of-file-fixer
|
||||||
|
stages: [pre-commit]
|
||||||
- id: check-added-large-files
|
- id: check-added-large-files
|
||||||
|
stages: [pre-commit]
|
||||||
|
|
||||||
- repo: https://github.com/commitizen-tools/commitizen
|
- repo: https://github.com/commitizen-tools/commitizen
|
||||||
rev: 3.8.0
|
rev: v4.8.3
|
||||||
hooks:
|
hooks:
|
||||||
- id: commitizen
|
- id: commitizen
|
||||||
|
stages: [commit-msg]
|
||||||
- id: commitizen-branch
|
- id: commitizen-branch
|
||||||
stages: [push]
|
stages: [pre-push]
|
||||||
|
|||||||
31
Dockerfile
31
Dockerfile
@ -1,18 +1,23 @@
|
|||||||
FROM gcc:13
|
FROM gcc:15
|
||||||
|
|
||||||
# Install build tools
|
# Install build tools
|
||||||
RUN apt-get update && apt-get install -y python3 python3-pip ninja-build clang-format clang-tidy gdb openjdk-17-jdk-headless graphviz git curl zsh \
|
RUN apt-get update && apt-get install -y python3 python3-pip ninja-build clang-format clang-tidy gdb openjdk-21-jdk-headless graphviz git curl zsh \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
RUN pip install --break-system-packages meson gcovr
|
# Install node for actions
|
||||||
|
RUN curl -fsSL https://deb.nodesource.com/setup_current.x | bash - && apt-get install -y nodejs
|
||||||
|
|
||||||
|
# Install python tools, break-system-packages is needed for debian-based images
|
||||||
|
RUN pip install --break-system-packages meson pre-commit commitizen gcovr
|
||||||
|
|
||||||
|
# Install just
|
||||||
RUN curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to /usr/bin
|
RUN curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to /usr/bin
|
||||||
|
|
||||||
# Install mold from tarball, as the version in the package manager is very old
|
# Install mold from tarball, as the version in the package manager is very old
|
||||||
RUN wget -O mold.tar.gz https://github.com/rui314/mold/releases/download/v2.4.0/mold-2.4.0-x86_64-linux.tar.gz && \
|
RUN wget -O mold.tar.gz https://github.com/rui314/mold/releases/download/v2.40.4/mold-2.40.4-x86_64-linux.tar.gz && \
|
||||||
tar -xzf mold.tar.gz && \
|
tar -xzf mold.tar.gz && \
|
||||||
cp -r mold-2.4.0-x86_64-linux/* /usr/local/ && \
|
cp -r mold-2.40.4-x86_64-linux/* /usr/local/ && \
|
||||||
rm -r mold-2.4.0-x86_64-linux && \
|
rm -r mold-2.40.4-x86_64-linux && \
|
||||||
rm mold.tar.gz
|
rm mold.tar.gz
|
||||||
|
|
||||||
# Set mold as the default linker
|
# Set mold as the default linker
|
||||||
@ -22,17 +27,17 @@ ENV CXX_LD=mold
|
|||||||
# Install plantuml
|
# Install plantuml
|
||||||
RUN wget --progress=bar:force:noscroll https://github.com/plantuml/plantuml/releases/download/v1.2024.3/plantuml-mit-1.2024.3.jar -O /usr/local/bin/plantuml.jar
|
RUN wget --progress=bar:force:noscroll https://github.com/plantuml/plantuml/releases/download/v1.2024.3/plantuml-mit-1.2024.3.jar -O /usr/local/bin/plantuml.jar
|
||||||
|
|
||||||
# Install node for actions
|
# Install mermaid-cli
|
||||||
RUN curl -fsSL https://deb.nodesource.com/setup_current.x | bash - && apt-get install -y nodejs
|
RUN npm install -g @mermaid-js/mermaid-cli
|
||||||
|
|
||||||
# Install latest doxygen
|
# Install latest doxygen
|
||||||
RUN wget --progress=bar:force:noscroll https://www.doxygen.nl/files/doxygen-1.10.0.linux.bin.tar.gz && \
|
RUN wget --progress=bar:force:noscroll https://www.doxygen.nl/files/doxygen-1.14.0.linux.bin.tar.gz && \
|
||||||
tar -xzf doxygen-1.10.0.linux.bin.tar.gz && \
|
tar -xzf doxygen-1.14.0.linux.bin.tar.gz && \
|
||||||
cd doxygen-1.10.0 && \
|
cd doxygen-1.14.0 && \
|
||||||
make install && \
|
make install && \
|
||||||
cd .. && \
|
cd .. && \
|
||||||
rm -r doxygen-1.10.0.linux.bin.tar.gz && \
|
rm -r doxygen-1.14.0.linux.bin.tar.gz && \
|
||||||
rm -r doxygen-1.10.0
|
rm -r doxygen-1.14.0
|
||||||
|
|
||||||
# Add a user `dev` with UID/GID 1000
|
# Add a user `dev` with UID/GID 1000
|
||||||
# Set zsh as the default shell for this user
|
# Set zsh as the default shell for this user
|
||||||
|
|||||||
2
Justfile
2
Justfile
@ -69,5 +69,5 @@ clean:
|
|||||||
|
|
||||||
# Obliterate the build directory
|
# Obliterate the build directory
|
||||||
spotless:
|
spotless:
|
||||||
rm -r {{BUILD_PREFIX}}
|
rm -rf {{BUILD_PREFIX}}
|
||||||
meson subprojects purge --confirm
|
meson subprojects purge --confirm
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
[wrap-file]
|
[wrap-file]
|
||||||
directory = doctest-2.4.11
|
directory = doctest-2.4.12
|
||||||
source_url = https://github.com/doctest/doctest/archive/refs/tags/v2.4.11.tar.gz
|
source_url = https://github.com/doctest/doctest/archive/refs/tags/v2.4.12.tar.gz
|
||||||
source_filename = doctest-2.4.11.tar.gz
|
source_filename = doctest-2.4.12.tar.gz
|
||||||
source_hash = 632ed2c05a7f53fa961381497bf8069093f0d6628c5f26286161fbd32a560186
|
source_hash = 73381c7aa4dee704bd935609668cf41880ea7f19fa0504a200e13b74999c2d70
|
||||||
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/doctest_2.4.11-1/doctest-2.4.11.tar.gz
|
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/doctest_2.4.12-1/doctest-2.4.12.tar.gz
|
||||||
wrapdb_version = 2.4.11-1
|
wrapdb_version = 2.4.12-1
|
||||||
|
|
||||||
[provide]
|
[provide]
|
||||||
dependency_names = doctest
|
dependency_names = doctest
|
||||||
|
|||||||
Reference in New Issue
Block a user