From ee4b57b4c98477f522f676dfdd302126c24213cd Mon Sep 17 00:00:00 2001 From: Nexarian Date: Sat, 4 Feb 2023 14:56:51 -0500 Subject: [PATCH] Improvements for unit testing - Set max features to enable tests - Add names to each step - Enable test-suite.log artifact upload for distcheck. --- .github/workflows/build.yml | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 26d5758de6..b757e4c470 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -96,17 +96,17 @@ jobs: --disable-pixman" CONF_FLAGS_amd64_max: "--enable-ipv6 --enable-jpeg --enable-fuse --enable-mp3lame --enable-fdkaac --enable-opus --enable-rfxcodec --enable-painter - --enable-pixman --with-imlib2 --with-freetype2" + --enable-pixman --with-imlib2 --with-freetype2 --enable-tests" CONF_FLAGS_i386_max: "--enable-ipv6 --enable-jpeg --enable-mp3lame --enable-opus --enable-rfxcodec --enable-painter --disable-pixman --with-imlib2 --with-freetype2 - --host=i686-linux" + --host=i686-linux --enable-tests" PKG_CONFIG_PATH_i386: "/usr/lib/i386-linux-gnu/pkgconfig" CFLAGS_i386: "-m32" LDFLAGS_i386: "-m32" steps: - - name: Define feature and arch dependent environment variables + - name: "Define feature and arch dependent environment variables" # Note: any "variable=value" written to the $GITHUB_ENV file will be # defined as an environment variable for all future steps in this job # See: https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable @@ -116,12 +116,24 @@ jobs: echo "CFLAGS=$CFLAGS_${{ matrix.arch }}" >> $GITHUB_ENV echo "LDFLAGS=$LDFLAGS_${{ matrix.arch }}" >> $GITHUB_ENV - uses: actions/checkout@v3 - - run: sudo scripts/install_xrdp_build_dependencies_with_apt.sh ${{ matrix.feature_set }} ${{ matrix.arch }} --allow-downgrades --allow-remove-essential --allow-change-held-packages - - run: ./bootstrap - - run: ./configure $CONF_FLAGS - - run: make - - if: ${{ matrix.DISTCHECK }} - run: make distcheck + - name: "Install Dependencies" + run: sudo scripts/install_xrdp_build_dependencies_with_apt.sh ${{ matrix.feature_set }} ${{ matrix.arch }} --allow-downgrades --allow-remove-essential --allow-change-held-packages + - name: Bootstrap + run: ./bootstrap + - name: configure + run: ./configure $CONF_FLAGS + - name: make + run: make -j $(nproc) + - name: distcheck + id: dist_check + if: ${{ matrix.DISTCHECK }} + run: make distcheck -j $(nproc) + - name: "Artifact: test-suite.log distcheck" + uses: actions/upload-artifact@v3 + if: always() && steps.dist_check.outcome == 'failure' + with: + name: test-suite-distcheck-${{ matrix.cc }}-${{ matrix.feature_set }} + path: ${{ github.workspace }}/xrdp-*/_build/sub/tests/xrdp/test-suite.log cppcheck: name: cppcheck