Skip to content

CI

CI #130

Workflow file for this run

name: "CI"
on:
push:
branches: [ main ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
schedule:
- cron: '25 2 * * 2'
jobs:
build_analyze:
runs-on: windows-2022
permissions:
security-events: write
strategy:
fail-fast: False
matrix:
arch: [x64, arm64]
build_type: [Debug, Release]
sdk_version: [19041, 22621]
# Run unit tests and CodeQL analysis on x64Debug only
include:
- arch: x64
build_type: Debug
codeql: True
sdk_version: 19041
name: build_${{matrix.arch}}_${{matrix.build_type}}_${{matrix.sdk_version}}
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Initialize CodeQL
if: ${{ matrix.codeql }}
uses: github/codeql-action/init@v3
with:
languages: cpp
- name: Install Windows SDK
uses: GuillaumeFalourd/setup-windows10-sdk-action@v2
with:
sdk-version: ${{ matrix.sdk_version }}
- name: Build
run: |
mkdir build && pushd build
cmake -A ${{ matrix.arch }} -DCMAKE_SYSTEM_VERSION=10.0.${{ matrix.sdk_version }}.0 -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ..
cmake --build . --parallel --config ${{ matrix.build_type }}
popd
- name: Perform CodeQL Analysis
if: ${{ matrix.codeql }}
uses: github/codeql-action/analyze@v3
- name: Collect test artifact
uses: actions/upload-artifact@v4
with:
name: proxy-wifi-test-${{ matrix.arch }}-${{ matrix.build_type }}-${{ matrix.sdk_version }}
path: build/test/${{ matrix.build_type }}/proxy-wifi-test.exe
run_unit_tests:
needs: build_analyze
runs-on: windows-2022
steps:
- name: Download test artifact
id: download
uses: actions/download-artifact@v4
with:
name: proxy-wifi-test-x64-Debug-19041
- name: Run tests
run: ${{steps.download.outputs.download-path}}/proxy-wifi-test.exe -s >> test-logs.txt
- name: Collect test logs on failure
uses: actions/upload-artifact@v4
if: failure()
with:
name: test-logs
path: test-logs.txt