Skip to content

refactor: restructure codebase for pybind11 and add CI workflow #1

refactor: restructure codebase for pybind11 and add CI workflow

refactor: restructure codebase for pybind11 and add CI workflow #1

Workflow file for this run

# .github/workflows/build.yml
name: Build ectool
on:
push:
branches: [ main ]
pull_request:
jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y cmake clang ninja-build git libftdi1-dev libusb-1.0-0-dev pkg-config
- name: Configure CMake
run: |
mkdir _build
cd _build
CC=clang CXX=clang++ cmake -GNinja ..
- name: Build
run: |
cd _build
ninja
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ectool-linux
path: _build/src/ectool
build-windows:
runs-on: windows-2022
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Configure CMake
run: |
mkdir _build
cd _build
& "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -A x64 -T ClangCL ..
- name: Build
run: |
cd _build
& "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" --build . --config RelWithDebInfo --parallel
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ectool-windows
path: |
_build/src/RelWithDebInfo/ectool.exe
_build/src/RelWithDebInfo/ectool.pdb