Skip to content

Commit 5893021

Browse files
committed
Added github actions CI
1 parent 14e3c09 commit 5893021

File tree

6 files changed

+192
-0
lines changed

6 files changed

+192
-0
lines changed

.github/clang-format-deploy.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: clang-format Check
2+
on: [pull_request]
3+
jobs:
4+
formatting-check:
5+
name: Formatting Check
6+
runs-on: ubuntu-latest
7+
steps:
8+
9+
- name: 🌐 Downloading .clang-format from TheAtlasEngine
10+
run: wget https://github.com/engine3d-dev/TheAtlasEngine/blob/main/.clang-format -O .clang-format
11+
12+
- uses: actions/checkout@v4
13+
- name: Run clang-format style check for C/C++/Protobuf programs.
14+
uses: jidicula/clang-format-action@v4.14.0
15+
with:
16+
clang-format-version: 19
17+
check-path: '.'
18+
fallback-style: 'LLVM' # optional

.github/clang-tidy.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: C++ Linter
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
linux-build:
7+
name: "Linter"
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
12+
- uses: cpp-linter/cpp-linter-action@main
13+
id: linter
14+
env:
15+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
16+
with:
17+
style: '.clang-format' # Use .clang-format config file
18+
version: 19 # Using clang-tidy19
19+
tidy-checks: '.clang-tidy' # Use .clang-tidy config file
20+
# only 'update' a single comment in a pull request thread.
21+
thread-comments: ${{ github.event_name == 'pull_request' && 'update' }}
22+
23+
- name: Fail fast?!
24+
if: steps.linter.outputs.checks-failed > 0
25+
run: exit 1

.github/deploy.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Breaking change was removing the bit timing sections from hal::can::settings,
2+
# now it is just baud_rate.
3+
name: 🚀 Deploy Version
4+
5+
on:
6+
workflow_dispatch:
7+
8+
jobs:
9+
engine3d:
10+
uses: engine3d-dev/ci/.github/workflows/deploy.yml@main
11+
with:
12+
# version: ${{ github.ref_name }}
13+
arch: x86_64
14+
os: Linux
15+
secrets: inherit

.github/linux.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Linux Build Tests
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
linux-build:
7+
name: "Linux-Build"
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
12+
- name: Install LLVM
13+
run: wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh && sudo ./llvm.sh
14+
15+
- name: Install LLVM's C++ Standard Library
16+
run: sudo apt install libc++-17-dev libc++abi-17-dev
17+
18+
- name: Installing pipx
19+
run: sudo apt install pipx
20+
21+
- name: Installing Prerequisites for Linux
22+
run: |
23+
sudo apt-get update
24+
sudo apt install lsb-release wget software-properties-common gnupg libgtk2.0-dev libgl1-mesa-dev -y
25+
# sudo apt install libx11-dev libx11-xcb-dev libfontenc-dev libice-dev libsm-dev libxau-dev libxaw7-dev libxt-dev libxtst-dev libxrender-dev libxrandr-dev libxi-dev -y
26+
sudo apt-get install -y libx11-dev libx11-xcb-dev libfontenc-dev libice-dev libsm-dev libxau-dev libxaw7-dev libxt-dev libxtst-dev libxrender-dev libxrandr-dev libxi-dev
27+
sudo apt install software-properties-common -y
28+
sudo add-apt-repository ppa:deadsnakes/ppa
29+
30+
- name: Installing Conan
31+
run: pipx install "conan>=2.10.1"
32+
33+
- name: Setting up Conan Profiles
34+
# run: conan config install -sf profiles/x86_64/linux/ -tf profiles https://github.com/engine3d-dev/conan-config.git
35+
run: conan config install -sf profiles/x86_64/linux/ -tf profiles https://github.com/engine3d-dev/conan-config.git --args "profiles_update"
36+
37+
- name: Installing project dependencies
38+
run: conan remote add engine3d-conan https://libhal.jfrog.io/artifactory/api/conan/engine3d-conan
39+
40+
- name: Cloning Atlas repository
41+
run: git clone https://github.com/engine3d-dev/TheAtlasEngine
42+
43+
- name: Building Atlas
44+
run: conan build . -b missing -c tools.system.package_manager:sudo=True -c tools.system.package_manager:mode=install
45+

.github/mac.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Macos Build Tests
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
macos-build:
7+
name: "M1 Mac Build"
8+
runs-on: macos-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
12+
- name: Install Homebrew
13+
run: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
14+
15+
- name: Install LLVM
16+
run: |
17+
brew install python pipx llvm@17
18+
19+
- name: Installing conan
20+
run: pipx install "conan>=2.10.2"
21+
22+
- name: Installing clang-tidy
23+
run: sudo ln -s $(brew --prefix llvm)/bin/clang-tidy /usr/local/bin/
24+
25+
- name: Install Rosetta
26+
run: /usr/sbin/softwareupdate --install-rosetta --agree-to-license
27+
28+
- name: Setting up Conan profile
29+
run: conan config install -sf profiles/armv8/mac/ -tf profiles https://github.com/engine3d-dev/conan-config.git
30+
31+
- name: Installing Atlas repositories
32+
run: conan remote add engine3d-conan https://libhal.jfrog.io/artifactory/api/conan/engine3d-conan
33+
34+
- name: Cloning Atlas repository
35+
run: git clone https://github.com/engine3d-dev/TheAtlasEngine
36+
37+
- name: Building the project
38+
run: conan build . -b missing

.github/windows.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Windows Build Tests
2+
3+
on: [pull_request, workflow_dispatch]
4+
5+
jobs:
6+
windows-build:
7+
name: "Windows-Build"
8+
runs-on: windows-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
12+
# - name: Setting up C++ on Windows
13+
# shell: pwsh
14+
# run: winget install Microsoft.VisualStudio.2022.BuildTools --override "--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended -p --installWhileDownloading"
15+
16+
- name: Installing Choco
17+
shell: pwsh
18+
run: Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
19+
20+
- name: Install tooling with Choco
21+
shell: pwsh
22+
run: |
23+
choco install cmake.install --version=3.31.6
24+
cmake --version
25+
choco install llvm --version=20.1.4
26+
clang++ --version
27+
choco install git make mingw
28+
29+
# - name: Installing python
30+
# run: choco install python --version=3.12.2
31+
32+
- name: Pip installing conan
33+
shell: pwsh
34+
run: pip install conan
35+
36+
# - name: Installing vulkan
37+
# shell: pwsh
38+
# run: winget install --id=KhronosGroup.VulkanSDK -e
39+
40+
- name: Setting up conan profiles
41+
shell: pwsh
42+
run: conan config install -sf profiles/x86_64/Windows/ -tf profiles https://github.com/engine3d-dev/conan-config.git --args "profiles_update"
43+
44+
- name: Setting up packages
45+
shell: pwsh
46+
run: conan remote add engine3d-conan https://libhal.jfrog.io/artifactory/api/conan/engine3d-conan
47+
48+
- name: Running Test Cases
49+
shell: pwsh
50+
run: conan build . -b missing
51+

0 commit comments

Comments
 (0)