Update toolchain #59
Workflow file for this run
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: zig-build | |
# Controls when the workflow will run | |
on: | |
# Triggers the workflow on push or pull request events but only for the "master" branch | |
push: | |
branches: | |
- master | |
- release/* | |
- feature/* | |
pull_request: | |
branches: | |
- master | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build" | |
build: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
environment: zig-build | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
cache: 'pip' | |
# Not necessary for this workflow, but useful for debugging | |
- name: Install arm-none-eabi-gcc | |
run: | | |
sudo apt-get install -y gcc-arm-none-eabi clang-format | |
# Installs dependencies using pip | |
- name: Install deps | |
run: | | |
python -m pip install --upgrade pip setuptools wheel -r requirements.txt | |
python -m pip install --upgrade -r csrc/mcuboot/mcuboot/scripts/requirements.txt | |
# Runs the Zig formatter and AST checker | |
- name: Run Zig formatter | |
run: python -m ziglang fmt --check --ast-check --color off . | |
# Runs Zig using the Python environment | |
- name: Run Zig program | |
run: python -m ziglang build | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: embedded-files-${{ github.sha }}.zip | |
path: | | |
zig-out/firmware/*.elf | |
zig-out/firmware/*.bin | |
zig-out/firmware/*.hex | |
if-no-files-found: error | |
retention-days: 90 | |
compression-level: 0 |