feat: add comprehensive test infrastructure and apiproto_utils unit t… #219
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: CI | |
| on: | |
| push: | |
| workflow_dispatch: | |
| jobs: | |
| container-job: | |
| strategy: | |
| matrix: | |
| os: ["debian:12", "debian:11", "debian:10", "ubuntu:22.04", "ubuntu:20.04"] | |
| arch: [amd64, arm64] | |
| exclude: | |
| - os: "debian:10" | |
| arch: arm64 | |
| runs-on: ${{ matrix.arch == 'arm64' && 'ubuntu-22.04-arm' || 'ubuntu-latest' }} | |
| container: | |
| image: ${{ matrix.os }} | |
| options: --platform linux/${{ matrix.arch }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Make artifact name valid | |
| id: make-artifact-name-valid | |
| run: | | |
| OS_NAME=$(echo "${{ matrix.os }}" | tr ':' '-') | |
| echo "os_name=$OS_NAME" >> $GITHUB_OUTPUT | |
| - name: Install prereqs | |
| run: | | |
| apt-get update | |
| DEBIAN_FRONTEND=noninteractive apt-get install -y tzdata | |
| dpkg-reconfigure -f noninteractive tzdata | |
| - name: Install dependencies | |
| run: | | |
| scripts/install-deps.sh --install-aduc-deps --install-do --install-cmake --install-shellcheck | |
| - name: Build packages and tests | |
| run: scripts/build.sh --clean --build-unit-tests --build-packages --type MinSizeRel | |
| - name: Run tests | |
| run: | | |
| cd out | |
| ctest | |
| - name: Upload Debian packages | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: deb-packages-${{ steps.make-artifact-name-valid.outputs.os_name }}-${{ matrix.arch }} | |
| path: out/*.deb | |
| retention-days: 3 |