actions #4
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: | |
jobs: | |
format: | |
name: Format | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install zig | |
run: | | |
curl -sSfL https://ziglang.org/download/0.13.0/zig-linux-x86-0.13.0.tar.xz | tar -xJ | |
echo $PWD/zig-linux-x86-0.13.0 >> $GITHUB_PATH | |
- name: Format | |
run: zig fmt --check . | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install zig | |
run: | | |
curl -sSfL https://ziglang.org/download/0.13.0/zig-linux-x86-0.13.0.tar.xz | tar -xJ | |
echo $PWD/zig-linux-x86-0.13.0 >> $GITHUB_PATH | |
- name: Install msdk | |
run: | | |
git clone https://github.com/Analog-Devices-MSDK/msdk | |
cd msdk && git checkout v2023_06 | |
echo "MAXIM_PATH=$PWD/msdk" >> $GITHUB_ENV | |
- name: Install ARM GCC | |
run: | | |
sudo apt-get install gcc-arm-none-eabi | |
echo "GCC_ARM_EMBDEDDED=/usr/lib/arm-none-eabi" >> $GITHUB_ENV | |
- name: Run tests | |
run: zig build test --summary all | |
docs: | |
name: Documentation | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install zig | |
run: | | |
curl -sSfL https://ziglang.org/download/0.13.0/zig-linux-x86-0.13.0.tar.xz | tar -xJ | |
echo $PWD/zig-linux-x86-0.13.0 >> $GITHUB_PATH | |
- name: Install msdk | |
run: | | |
git clone https://github.com/Analog-Devices-MSDK/msdk | |
cd msdk && git checkout v2023_06 | |
echo "MAXIM_PATH=$PWD/msdk" >> $GITHUB_ENV | |
- name: Install ARM GCC | |
run: | | |
sudo apt-get install gcc-arm-none-eabi | |
echo "GCC_ARM_EMBDEDDED=/usr/lib/arm-none-eabi" >> $GITHUB_ENV | |
- name: Run tests | |
run: zig build docs |