From cc374f05376ffed9c27c20661471bafb0b9d419f Mon Sep 17 00:00:00 2001 From: Huang Rui Date: Wed, 28 Feb 2024 15:13:34 +0800 Subject: [PATCH] github: Update GitHub Actions workflow for KiCad project - Name workflow to 'KiCad Project Build and Validation' - Add detailed step names for clarity - Include steps for ERC, DRC, and file generation - Configure CMake with Ninja build system - Cache apt packages for efficiency Signed-off-by: Huang Rui --- .github/workflows/build.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..8f3bf2af --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,33 @@ +name: KiCad Project Build and Validation + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + runs-on: ubuntu-22.04 + name: KiCad Project Build and Validation + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + with: + submodules: recursive + - name: Add KiCad Repository + run: | + sudo add-apt-repository ppa:kicad/kicad-8.0-releases + sudo apt update + - name: Cache Required Packages + uses: awalsh128/cache-apt-pkgs-action@latest + with: + packages: cmake ninja-build kicad kicad-library-all + version: 1.0 + - name: Check fmc_basic_peripheral + run: | + cmake -B ${{github.workspace}}/fmc_basic_peripheral/build -G Ninja + cmake --build ${{github.workspace}}/fmc_basic_peripheral/build --target erc + cmake --build ${{github.workspace}}/fmc_basic_peripheral/build --target drc + cmake --build ${{github.workspace}}/fmc_basic_peripheral/build --target production + cmake --build ${{github.workspace}}/fmc_basic_peripheral/build --target pdf