|
| 1 | +--- |
| 2 | + |
| 3 | +name: Build on various Operating Systems |
| 4 | + |
| 5 | +on: |
| 6 | + push: |
| 7 | + branches: [devel, master] |
| 8 | + pull_request: |
| 9 | + branches: [devel, master] |
| 10 | + |
| 11 | +env: |
| 12 | + ARTIFACT: lsp-r3d-base-lib |
| 13 | + VALGRIND_ARGS: --error-exitcode=255 --leak-check=full --track-origins=yes --keep-debuginfo=yes --suppressions=.github/workflows/valgrind.supp |
| 14 | + |
| 15 | +jobs: |
| 16 | + arch_linux: |
| 17 | + runs-on: ubuntu-latest |
| 18 | + container: |
| 19 | + image: archlinux:latest |
| 20 | + steps: |
| 21 | + - name: Add debug repositories |
| 22 | + run: | |
| 23 | + printf "[core-debug]\nInclude = /etc/pacman.d/mirrorlist\n[extra-debug]\nInclude = /etc/pacman.d/mirrorlist\n[community-debug]\nInclude = /etc/pacman.d/mirrorlist" >> /etc/pacman.conf |
| 24 | + printf 'Server = https://geo.mirror.pkgbuild.com/$repo/os/$arch\n%s\n' "$(cat /etc/pacman.d/mirrorlist)" > /etc/pacman.d/mirrorlist |
| 25 | + - name: Install dependencies |
| 26 | + run: pacman --noconfirm -Syu base-devel glibc-debug git valgrind |
| 27 | + - uses: actions/checkout@v2 |
| 28 | + - name: Configure project |
| 29 | + run: make config TEST=1 |
| 30 | + - name: Fetch project dependencies |
| 31 | + run: make fetch |
| 32 | + - name: Build project |
| 33 | + run: make VERBOSE=1 |
| 34 | + - name: Run unit tests |
| 35 | + run: .build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test utest --verbose --jobs 1 |
| 36 | + - name: Run unit tests with memcheck |
| 37 | + run: | |
| 38 | + for test in $(.build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test utest --list --suppress); do \ |
| 39 | + echo "***** MEMCHECK $test *****"; \ |
| 40 | + valgrind ${{env.VALGRIND_ARGS}} .build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test utest --verbose --jobs 1 --nofork --debug $test; \ |
| 41 | + done |
| 42 | + arch_linux_debug: |
| 43 | + runs-on: ubuntu-latest |
| 44 | + container: |
| 45 | + image: archlinux:latest |
| 46 | + steps: |
| 47 | + - name: Add debug repositories |
| 48 | + run: | |
| 49 | + printf "[core-debug]\nInclude = /etc/pacman.d/mirrorlist\n[extra-debug]\nInclude = /etc/pacman.d/mirrorlist\n[community-debug]\nInclude = /etc/pacman.d/mirrorlist" >> /etc/pacman.conf |
| 50 | + printf 'Server = https://geo.mirror.pkgbuild.com/$repo/os/$arch\n%s\n' "$(cat /etc/pacman.d/mirrorlist)" > /etc/pacman.d/mirrorlist |
| 51 | + - name: Install dependencies |
| 52 | + run: pacman --noconfirm -Syu base-devel glibc-debug git valgrind |
| 53 | + - uses: actions/checkout@v2 |
| 54 | + - name: Configure project |
| 55 | + run: make config TEST=1 DEBUG=1 |
| 56 | + - name: Fetch project dependencies |
| 57 | + run: make fetch |
| 58 | + - name: Build project |
| 59 | + run: make VERBOSE=1 |
| 60 | + - name: Run unit tests |
| 61 | + run: .build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test utest --verbose --jobs 1 |
| 62 | + - name: Run unit tests with memcheck |
| 63 | + run: | |
| 64 | + for test in $(.build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test utest --list --suppress); do \ |
| 65 | + echo "***** MEMCHECK $test *****"; \ |
| 66 | + valgrind ${{env.VALGRIND_ARGS}} .build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test utest --verbose --jobs 1 --nofork --debug $test; \ |
| 67 | + done |
| 68 | + opensuse_leap: |
| 69 | + runs-on: ubuntu-latest |
| 70 | + container: |
| 71 | + image: opensuse/leap:latest |
| 72 | + steps: |
| 73 | + - name: Install dependencies |
| 74 | + run: zypper --non-interactive --no-gpg-checks in tar gzip git make valgrind gcc gcc-c++ |
| 75 | + - uses: actions/checkout@v2 |
| 76 | + - name: Configure project |
| 77 | + run: make config TEST=1 |
| 78 | + - name: Fetch project dependencies |
| 79 | + run: make fetch |
| 80 | + - name: Build project |
| 81 | + run: make VERBOSE=1 |
| 82 | + - name: Run unit tests |
| 83 | + run: .build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test utest --verbose --jobs 1 |
| 84 | + - name: Run unit tests with memcheck |
| 85 | + run: | |
| 86 | + for test in $(.build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test utest --list --suppress); do \ |
| 87 | + echo "***** MEMCHECK $test *****"; \ |
| 88 | + valgrind ${{env.VALGRIND_ARGS}} .build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test utest --verbose --jobs 1 --nofork --debug $test; \ |
| 89 | + done |
| 90 | + debian_stable: |
| 91 | + runs-on: ubuntu-latest |
| 92 | + container: |
| 93 | + image: debian:stable |
| 94 | + steps: |
| 95 | + - name: Update repositories |
| 96 | + run: apt-get update |
| 97 | + - name: Install dependencies |
| 98 | + run: apt-get -y install git make pkg-config valgrind gcc g++ |
| 99 | + - uses: actions/checkout@v2 |
| 100 | + - name: Configure project |
| 101 | + run: make config TEST=1 |
| 102 | + - name: Fetch project dependencies |
| 103 | + run: make fetch |
| 104 | + - name: Build project |
| 105 | + run: make VERBOSE=1 |
| 106 | + - name: Run unit tests |
| 107 | + run: .build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test utest --verbose --jobs 1 |
| 108 | + - name: Run unit tests with memcheck |
| 109 | + run: | |
| 110 | + for test in $(.build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test utest --list --suppress); do \ |
| 111 | + echo "***** MEMCHECK $test *****"; \ |
| 112 | + valgrind ${{env.VALGRIND_ARGS}} .build/target/${{env.ARTIFACT}}/${{env.ARTIFACT}}-test utest --verbose --jobs 1 --nofork --debug $test; \ |
| 113 | + done |
0 commit comments