Skip to content

Commit 027a2c2

Browse files
author
AhmedYasserrr
committed
refactor: restructure codebase for pybind11 and add CI workflow
1 parent a3417eb commit 027a2c2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+67
-4
lines changed

.github/workflows/build.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# .github/workflows/build.yml
2+
name: Build ectool
3+
4+
on:
5+
push:
6+
branches: [ main ]
7+
pull_request:
8+
9+
jobs:
10+
build-linux:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
with:
15+
submodules: recursive
16+
17+
- name: Install dependencies
18+
run: |
19+
sudo apt update
20+
sudo apt install -y cmake clang ninja-build git libftdi1-dev libusb-1.0-0-dev pkg-config
21+
22+
- name: Configure CMake
23+
run: |
24+
mkdir _build
25+
cd _build
26+
CC=clang CXX=clang++ cmake -GNinja ..
27+
28+
- name: Build
29+
run: |
30+
cd _build
31+
ninja
32+
33+
- name: Upload artifact
34+
uses: actions/upload-artifact@v3
35+
with:
36+
name: ectool-linux
37+
path: _build/src/ectool
38+
39+
build-windows:
40+
runs-on: windows-2022
41+
steps:
42+
- uses: actions/checkout@v3
43+
with:
44+
submodules: recursive
45+
46+
- name: Configure CMake
47+
run: |
48+
mkdir _build
49+
cd _build
50+
& "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -A x64 -T ClangCL ..
51+
52+
- name: Build
53+
run: |
54+
cd _build
55+
& "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" --build . --config RelWithDebInfo --parallel
56+
57+
- name: Upload artifact
58+
uses: actions/upload-artifact@v3
59+
with:
60+
name: ectool-windows
61+
path: |
62+
_build/src/RelWithDebInfo/ectool.exe
63+
_build/src/RelWithDebInfo/ectool.pdb

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
build/*

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ endif()
1818

1919
set(CMAKE_CXX_STANDARD 17)
2020

21-
add_subdirectory(src)
22-
add_subdirectory(extern)
21+
add_subdirectory(src/core)
22+
add_subdirectory(src/extern)
2323

2424
if(WIN32)
25-
add_subdirectory(getopt)
25+
add_subdirectory(src/getopt)
2626
endif()

extern/FrameworkWindowsUtils

Submodule FrameworkWindowsUtils deleted from d49e270
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)