|
| 1 | +name: Validate Debian build |
| 2 | + |
| 3 | +on: [push, pull_request] |
| 4 | + |
| 5 | +jobs: |
| 6 | + build: |
| 7 | + strategy: |
| 8 | + matrix: |
| 9 | + os: [ubuntu-24.04] |
| 10 | + runs-on: ${{ matrix.os }} |
| 11 | + steps: |
| 12 | + - uses: actions/checkout@v4 |
| 13 | + with: |
| 14 | + fetch-depth: 0 |
| 15 | + submodules: recursive |
| 16 | + - uses: actions/cache@v4 |
| 17 | + with: |
| 18 | + path: | |
| 19 | + /home/runner/.ccache |
| 20 | + /home/runner/.cache/ccache |
| 21 | + key: debian-validate:${{ matrix.os }}:${{ github.sha }} |
| 22 | + restore-keys: 'debian-validate:${{ matrix.os }}:' |
| 23 | + - name: disable man-db trigger # See https://github.com/actions/runner-images/issues/10977 |
| 24 | + run: | |
| 25 | + echo "set man-db/auto-update false" | sudo debconf-communicate |
| 26 | + sudo dpkg-reconfigure man-db |
| 27 | + - name: install deps |
| 28 | + run: | |
| 29 | + ln -s build/debian debian |
| 30 | + sudo apt update |
| 31 | + sudo apt remove --yes libpython3*-dev # By default github images have python3-dev packages installed, drop them |
| 32 | + sudo apt install --yes build-essential ccache |
| 33 | + sudo apt satisfy --yes --no-install-recommends "`perl ./debian/print-build-deps.pl`" |
| 34 | + - name: build |
| 35 | + env: |
| 36 | + CMAKE_CXX_COMPILER_LAUNCHER: ccache |
| 37 | + CMAKE_C_COMPILER_LAUNCHER: ccache |
| 38 | + run: dpkg-buildpackage --no-sign -b -j4 |
| 39 | + - name: test |
| 40 | + continue-on-error: true |
| 41 | + run: | |
| 42 | + set -x |
| 43 | + test ! -f /opt/xilinix/xrt/bin/xclbinutil |
| 44 | + if pkg-config --exists xrt; then echo "XRT pkg-config file installed: `pkg-config --modversion xrt`"; false; else true; fi |
| 45 | + sudo dpkg -i ../xrt_*.deb |
| 46 | + test -f /opt/xilinx/xrt/bin/xclbinutil |
| 47 | + pkg-config --exists xrt |
| 48 | + mkdir build-test |
| 49 | + cd build-test |
| 50 | + c++ -ohello `pkg-config --cflags --libs xrt` -Wall ../tests/xrt/00_hello/main.cpp |
| 51 | +
|
| 52 | +# vim: sts=2 sw=2 et |
0 commit comments