Skip to content

Commit

Permalink
Merge branch 'main' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya authored Jul 21, 2023
2 parents 06c2047 + 1114bf9 commit 310fc09
Show file tree
Hide file tree
Showing 122 changed files with 4,804 additions and 1,349 deletions.
9 changes: 6 additions & 3 deletions .cmake-format.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
format:
line_width: 120
line_width: 100
tab_size: 2
max_pargs_hwrap: 3
max_pargs_hwrap: 5
max_subgroups_hwrap: 3
enable_sort: true
autosort: true
separate_ctrl_name_with_space: false
separate_fn_name_with_space: false
dangle_parens: false
dangle_parens: true
line_ending: unix
markup:
bullet_char: "*"
Expand Down
84 changes: 84 additions & 0 deletions .github/workflows/ci.cross.arm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: ci-cross-arm
on:
pull_request:
push:
branches:
- main
- master

jobs:
Test:
if: "!contains(github.event.head_commit.message, '[skip ci]')"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-22.04
cmake:
- true
task:
- rpi3:build.cross
- rpi3:build.cross.bare-metal
- rpi4:build.cross
- rpi4:build.cross.aarch64
- rpi4:build.cross.custom-toolchain
- rpi4-vcpkg:build.cross
include:
- task: rpi3:build.cross
install-cross-compiler: gcc-arm-linux-gnueabi g++-arm-linux-gnueabi gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf
target: arm-linux-gnueabi
- task: rpi3:build.cross.bare-metal
install-cross-compiler: gcc-arm-none-eabi binutils-arm-none-eabi libnewlib-arm-none-eabi
target: arm-none-eabi
- task: rpi4:build.cross
install-cross-compiler: g++-aarch64-linux-gnu gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu
target: aarch64-linux-gnu
- task: rpi4:build.cross.aarch64
install-cross-compiler: g++-aarch64-linux-gnu gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu
target: aarch64-linux-gnu
- task: rpi4:build.cross.custom-toolchain
install-cross-compiler: g++-aarch64-linux-gnu gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu
target: aarch64-linux-gnu
- task: rpi4-vcpkg:build.cross
install-cross-compiler: g++-aarch64-linux-gnu gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu
target: aarch64-linux-gnu
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Cache
uses: actions/cache@v3
with:
path: |
~/vcpkg
./build/vcpkg_installed
${{ env.HOME }}/.cache/vcpkg/archives
${{ env.XDG_CACHE_HOME }}/vcpkg/archives
${{ env.LOCALAPPDATA }}\vcpkg\archives
${{ env.APPDATA }}\vcpkg\archives
key: ${{ runner.os }}-cross-${{ matrix.target }}-${{ env.BUILD_TYPE }}-${{ hashFiles('**/CMakeLists.txt') }}-${{ hashFiles('./vcpkg.json')}}-${{ matrix.cmake }}
restore-keys: |
${{ runner.os }}-${{ env.BUILD_TYPE }}-
- name: Setup Cpp
uses: aminya/setup-cpp@v1
with:
cmake: ${{ matrix.cmake }}
ninja: true
vcpkg: true
conan: true
cppcheck: true
clangtidy: true
task: true
doxygen: true

- name: Setup ARM (Cross) Compiler
run: sudo apt-get install -y ${{ matrix.install-cross-compiler }}
shell: bash

- name: Build (Task)
run: |
task ${{ matrix.task }}
env:
CMAKE_GENERATOR: ${{ matrix.cmake_generator }}
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ on:

jobs:
Test:
if: "!contains(github.event.head_commit.message, '[ci skip]')"
if: "!contains(github.event.head_commit.message, '[skip ci]')"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-20.04
- ubuntu-22.04
cmake:
- true
platform:
Expand All @@ -28,9 +28,11 @@ jobs:
cross_cc: i686-w64-mingw32-gcc
cross_cxx: i686-w64-mingw32-g++
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: true
- name: Cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
~/vcpkg
Expand All @@ -39,7 +41,7 @@ jobs:
${{ env.XDG_CACHE_HOME }}/vcpkg/archives
${{ env.LOCALAPPDATA }}\vcpkg\archives
${{ env.APPDATA }}\vcpkg\archives
key: ${{ runner.os }}-mingw-${{ matrix.platform }}-${{ env.BUILD_TYPE }}-${{ hashFiles('**/CMakeLists.txt') }}-${{ hashFiles('./vcpkg.json')}}-${{ matrix.cmake }}
key: ${{ runner.os }}-cross-mingw-${{ matrix.platform }}-${{ env.BUILD_TYPE }}-${{ hashFiles('**/CMakeLists.txt') }}-${{ hashFiles('./vcpkg.json')}}-${{ matrix.cmake }}
restore-keys: |
${{ runner.os }}-${{ env.BUILD_TYPE }}-
Expand All @@ -55,15 +57,15 @@ jobs:
task: true
doxygen: true
powershell: true

- name: Setup MinGW
uses: egor-tensin/setup-mingw@v2
with:
platform: ${{ matrix.cmake }}
platform: ${{ matrix.platform }}

- name: Build (Minimal)
run: |
task build_minimal_mingw
task minimal:build.mingw
env:
CMAKE_GENERATOR: ${{ matrix.cmake_generator }}
CROSS_CC: ${{ matrix.cross_cc }}
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/ci.emscripten.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,21 @@ on:

jobs:
Test:
if: "!contains(github.event.head_commit.message, '[ci skip]')"
if: "!contains(github.event.head_commit.message, '[skip ci]')"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-20.04
- ubuntu-22.04
cmake:
- true
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: true
- name: Cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
~/vcpkg
Expand All @@ -44,12 +46,12 @@ jobs:
clangtidy: true
task: true
doxygen: true

- name: Setup emscripten
uses: mymindstorm/setup-emsdk@v11

- name: Build
run: |
task build_emscripten
task emscripten:build
env:
CMAKE_GENERATOR: ${{ matrix.cmake_generator }}
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
Test:
if: "!contains(github.event.head_commit.message, '[ci skip]')"
if: "!contains(github.event.head_commit.message, '[skip ci]')"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand Down Expand Up @@ -52,6 +52,8 @@ jobs:
vcvarsall: true
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Cache
uses: actions/cache@v3
with:
Expand Down Expand Up @@ -83,8 +85,6 @@ jobs:
- name: Test
run: |
task test
task test_release
task test_install
env:
CMAKE_GENERATOR: ${{ matrix.cmake_generator }}

Expand Down
47 changes: 47 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: docs
on:
push:
branches:
- main

jobs:
Test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
submodules: true

- name: Setup Cpp
uses: aminya/setup-cpp@v1
with:
cmake: true
ninja: true
task: true
doxygen: true

- name: Setup pandoc
run: |
wget https://github.com/jgm/pandoc/releases/download/3.1.2/pandoc-3.1.2-1-amd64.deb
sudo dpkg -i pandoc-3.1.2-1-amd64.deb
rm pandoc-3.1.2-1-amd64.deb
- name: Build Documentation
run: |
git checkout main
task docs
# TODO Automatic deploys fail
# - name: Deploy Documentation
# uses: Cecilapp/GitHub-Pages-deploy@v3
# with:
# build_dir: docs/build/html/
# branch: gh-pages
# email: [email protected]
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
.cache/
test/build/
install/
test_install/build/
test_install/build/
build/
compile_commands.json
.mypy_cache/
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "examples/cpp_vcpkg_project"]
path = examples/cpp_vcpkg_project
url = https://github.com/aminya/cpp_vcpkg_project
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 aminya
Copyright (c) 2022-2100 Amin Yahyaabadi

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Loading

0 comments on commit 310fc09

Please sign in to comment.