From 09dc662e395dea5d842645d25afbb837b6e6f9d3 Mon Sep 17 00:00:00 2001 From: Ivan Belokobylskiy Date: Sun, 26 Nov 2023 15:04:54 +0400 Subject: [PATCH] check windows build --- .github/workflows/build-windows.yml | 46 +++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/build-windows.yml diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml new file mode 100644 index 0000000..afa392b --- /dev/null +++ b/.github/workflows/build-windows.yml @@ -0,0 +1,46 @@ +name: Build z03mmc firmware + +on: + push: +# branches: [ "master" ] + pull_request: +# branches: [ "master" ] + +env: + # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) + BUILD_TYPE: Release + TOOLCHAIN_DIR: ${{github.workspace}}/tc32 + SDK_DIR: ${{github.workspace}}/tl_zigbee_sdk + ARTIFACT_DIR: ${{github.workspace}}/build/src/ + +jobs: + build: + runs-on: windows-latest + + steps: + - uses: actions/checkout@v3 + + - name: Get toolchain + run: git clone https://github.com/devbis/tc32.git -b windows --depth 1 ${{ env.TOOLCHAIN_DIR }} + + - name: Get SDK + run: git clone https://github.com/devbis/tl_zigbee_sdk.git -b 3.6.8.5 --depth 1 ${{ env.SDK_DIR }} + + - name: Build LYWSD03MMC + id: lywsd03mmc + run: | + cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DSDK_PREFIX=${{env.SDK_DIR}} -DTOOLCHAIN_PREFIX=${{env.TOOLCHAIN_DIR}} -DMANUFACTURER_CODE=0x1141 + cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target=z03mmc.zigbee + echo "status=success" >> $GITHUB_OUTPUT + + - name: Upload a Build Artifact + uses: actions/upload-artifact@v3 + if: steps.lywsd03mmc.outputs.status == 'success' && !cancelled() + with: + # Artifact name + name: firmware + # A file, directory or wildcard pattern that describes what to upload + path: | + ${{ env.ARTIFACT_DIR }}/*.bin + ${{ env.ARTIFACT_DIR }}/*.zigbee +