Configure github actions #4
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 and Test Baremetal ARM | |
on: | |
push: | |
branches: | |
- main | |
- f/config_github_actions | |
pull_request: | |
branches: | |
- main | |
- f/config_github_actions | |
jobs: | |
build: | |
name: Build Baremetal ARM | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install ARM GCC | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y gcc-arm-none-eabi binutils-arm-none-eabi | |
- name: Configure and build | |
run: | | |
cmake -S . -B cmake_build/ -G Ninja | |
cmake --build cmake_build/ --verbose | |
- name: Check for Binary | |
run: | | |
if [ ! -f build/baremetal_arm.bin ]; then | |
echo "Binary not generated!" | |
exit 1 | |
fi | |
- name: Upload Build Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: baremetal_arm | |
path: cmake_build/ | |