Update build-v2.yml #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build ARM32 | |
on: | |
push: | |
branches: | |
- master | |
- dev | |
- 'release/*' | |
pull_request: | |
branches: | |
- '**' | |
workflow_dispatch: | |
env: | |
BUILD_TYPE: Debug | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Install Dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y build-essential gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf cmake | |
- name: Verify Toolchain File | |
# Check if the toolchain file exists and debug its path | |
run: | | |
if [ ! -f "${{github.workspace}}/Toolchain-cross-armhf.cmake" ]; then | |
echo "Toolchain file not found: ${{github.workspace}}/Toolchain-cross-armhf.cmake" | |
exit 1 | |
fi | |
- name: Create Build Directory | |
run: cmake -E make_directory ${{github.workspace}}/build | |
- name: Configure CMake for ARM32 | |
working-directory: ${{github.workspace}}/build | |
run: | | |
cmake .. -DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/Toolchain-cross-armhf.cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE | |
- name: Build | |
working-directory: ${{github.workspace}}/build | |
run: cmake --build . --config ${{env.BUILD_TYPE}} | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: build-artifact-arm32 | |
path: ${{github.workspace}}/build |