Layer 4 #44
Workflow file for this run
This file contains hidden or 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 | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
jobs: | |
format: | |
name: Format | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install zig | |
uses: mlugg/setup-zig@v1 | |
with: | |
version: 0.13.0 | |
- name: Format | |
run: zig fmt --check . | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install zig | |
uses: mlugg/setup-zig@v1 | |
with: | |
version: 0.13.0 | |
- name: Install msdk | |
run: | | |
git clone --depth=1 --branch v2023_06 https://github.com/Analog-Devices-MSDK/msdk | |
echo "MAXIM_PATH=$PWD/msdk" >> $GITHUB_ENV | |
- name: Install ARM GCC | |
run: | | |
sudo apt-get install -y gcc-arm-none-eabi | |
echo "GCC_ARM_EMBDEDDED=/usr/lib" >> $GITHUB_ENV | |
- name: Run tests | |
run: zig build test --summary all | |
docs: | |
name: Build Documentation | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install zig | |
uses: mlugg/setup-zig@v1 | |
with: | |
version: 0.13.0 | |
- name: Install msdk | |
run: | | |
git clone --depth=1 --branch v2023_06 https://github.com/Analog-Devices-MSDK/msdk | |
echo "MAXIM_PATH=$PWD/msdk" >> $GITHUB_ENV | |
- name: Install ARM GCC | |
run: | | |
sudo apt-get install -y gcc-arm-none-eabi | |
echo "GCC_ARM_EMBDEDDED=/usr/lib" >> $GITHUB_ENV | |
- name: Build documentation | |
run: zig build docs | |
- name: Upload static files as artifact | |
id: deployment | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: docs/ | |
deploy: | |
name: Deploy Documentation | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
needs: docs | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
permissions: | |
pages: write | |
id-token: write | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |