Skip to content

feat: update to zig 0.16.0 #785

feat: update to zig 0.16.0

feat: update to zig 0.16.0 #785

Workflow file for this run

name: CI
on:
workflow_dispatch:
pull_request:
paths:
- '**.zig'
- '**.yml'
push:
branches:
- main
paths:
- '**.zig'
- '**.yml'
jobs:
test-vendor:
timeout-minutes: 10
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- uses: mlugg/setup-zig@v2
- name: Run lint
if: matrix.os == 'ubuntu-latest'
run: |
make lint
- name: Run tests
run: |
make test run
- name: Run tests with mbedtls_pthreads
run: |
make test run ARGS="-Dmbedtls_pthreads=true"
- name: Install deps
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt update && sudo apt install -y valgrind
- name: Memory leak detect
if: matrix.os == 'ubuntu-latest'
run: |
zig build -Dcpu=baseline --verbose
BINS=("./zig-out/bin/basic" "./zig-out/bin/advanced")
for bin in ${BINS[@]}; do
valgrind --leak-check=full --tool=memcheck \
--show-leak-kinds=all --error-exitcode=1 ${bin}
done
test-dynamic:
timeout-minutes: 10
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
- uses: mlugg/setup-zig@v2
- name: Set Environment Variables
run: |
echo "ZIG_ARGS='-Dlink_vendor=false'" >> $GITHUB_ENV
sudo apt update && sudo apt-get install -y libcurl4-openssl-dev
- name: Run tests
run: |
make test
- name: Install deps
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt update && sudo apt install -y valgrind
- name: Memory leak detect
if: matrix.os == 'ubuntu-latest'
run: |
zig build -Dcpu=baseline --verbose
BINS=("./zig-out/bin/basic" "./zig-out/bin/advanced")
for bin in ${BINS[@]}; do
valgrind --leak-check=full --tool=memcheck \
--show-leak-kinds=all --error-exitcode=1 ${bin}
done