diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index a8566677c..4a6271c26 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -69,6 +69,10 @@ jobs: echo "VERSION=PACKAGE_VERSION" | cpp -P -imacros config.h | tr -d \" \ >> $GITHUB_ENV + - name: Build + run: | + make -C build --jobs=$(($(nproc)+1)) + - name: Upload config.log uses: actions/upload-artifact@v4 if: failure() @@ -76,10 +80,6 @@ jobs: name: config-${{ matrix.os }}-${{ github.job }}.log path: build/config.log - - name: Build - run: | - make -C build --jobs=$(($(nproc)+1)) - # note: distcheck also creates the dist tarball - name: Build distribution archive & run tests run: | @@ -91,7 +91,7 @@ jobs: - name: Upload testsuite.log uses: actions/upload-artifact@v4 - if: failure() + # if: failure() -> always upload as build result documentation with: # Assume there's only one directory matching `build/gnucobol-*`: name: testsuite-${{ matrix.os }}-${{ github.job }}.log @@ -134,6 +134,7 @@ jobs: fail-fast: true matrix: os: [ubuntu-latest] + if: false needs: build runs-on: ${{ matrix.os }} @@ -162,6 +163,10 @@ jobs: --without-xml2 --without-json \ --without-iconv --disable-nls + - name: Build + run: | + make -C build --jobs=$(($(nproc)+1)) + - name: Upload config.log uses: actions/upload-artifact@v4 if: failure() @@ -169,10 +174,6 @@ jobs: name: config-${{ matrix.os }}-${{ github.job }}.log path: build/config.log - - name: Build - run: | - make -C build --jobs=$(($(nproc)+1)) - - name: run internal tests run: | make -C build check TESTSUITEFLAGS="--jobs=$(($(nproc)+1))" || \ @@ -180,7 +181,7 @@ jobs: - name: Upload testsuite.log uses: actions/upload-artifact@v4 - if: failure() + # if: failure() -> always upload as build result documentation with: name: testsuite-${{ matrix.os }}-${{ github.job }}.log path: build/tests/testsuite.log @@ -211,7 +212,7 @@ jobs: coverage: name: Coverage and Warnings - if: false + # if: false needs: build runs-on: ubuntu-latest @@ -243,10 +244,14 @@ jobs: run: | cd build ../configure --enable-code-coverage \ - --with-db --with-xml2 --with-json=cjson --with-curses=cursesw" \ + --with-db --with-xml2 --with-json=cjson --with-curses=ncursesw \ CPPFLAGS="-Werror=declaration-after-statement" \ CC="gcc -std=c89" + - name: Build + run: | + make -C build --jobs=$(($(nproc)+1)) + - name: Upload config.log uses: actions/upload-artifact@v4 if: failure() @@ -254,10 +259,6 @@ jobs: name: config-${{ matrix.os }}-${{ github.job }}.log path: build/config.log - - name: Build - run: | - make -C build --jobs=$(($(nproc)+1)) - - name: Coverage run: | # make -C build check-code-coverage # <- (ignores errors) @@ -268,7 +269,7 @@ jobs: - name: Upload testsuite.log uses: actions/upload-artifact@v4 - if: failure() + # if: failure() -> always upload as build result documentation with: name: testsuite-${{ matrix.os }}-${{ github.job }}.log path: build/tests/testsuite.log @@ -304,7 +305,7 @@ jobs: path: build/extended-coverage - name: Upload coverage to codecov - uses: codecov/codecov-action@v2 + uses: codecov/codecov-action@v3 with: # token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos directory: build diff --git a/.github/workflows/windows-msys1.yml b/.github/workflows/windows-msys1.yml index 204f7f444..f2002ab65 100644 --- a/.github/workflows/windows-msys1.yml +++ b/.github/workflows/windows-msys1.yml @@ -279,43 +279,11 @@ jobs: - name: Upload config-${{ matrix.target }}.log uses: actions/upload-artifact@v4 - # if: failure() -> always upload as build documentation + if: failure() with: name: config-${{ matrix.target }}.log path: ${{ env.GITHUB_WORKSPACE }}/build/config.log - - name: Run testsuite - run: | - sed -i '/AT_SETUP(\[temporary path invalid\])/a AT_SKIP_IF(\[true\])' tests/testsuite.src/used_binaries.at - - sed -i '/AT_SETUP(\[Compare FLOAT-LONG with floating-point literal\])/a AT_SKIP_IF(\[true\])' tests/testsuite.src/run_fundamental.at - sed -i '/AT_SETUP(\[Numeric operations (3) PACKED-DECIMAL\])/a AT_SKIP_IF(\[true\])' tests/testsuite.src/run_fundamental.at - sed -i '/AT_SETUP(\[Numeric operations (7)\])/a AT_SKIP_IF(\[true\])' tests/testsuite.src/run_fundamental.at - sed -i '/AT_SETUP(\[integer arithmetic on floating-point var\])/a AT_SKIP_IF(\[true\])' tests/testsuite.src/run_fundamental.at - sed -i '/AT_SETUP(\[FLOAT-DECIMAL w\/o SIZE ERROR\])/a AT_SKIP_IF(\[true\])' tests/testsuite.src/run_misc.at - sed -i '/AT_SETUP(\[FLOAT-SHORT \/ FLOAT-LONG w\/o SIZE ERROR\])/a AT_SKIP_IF(\[true\])' tests/testsuite.src/run_misc.at - sed -i '/AT_SETUP(\[FLOAT-LONG with SIZE ERROR\])/a AT_SKIP_IF(\[true\])' tests/testsuite.src/run_misc.at - sed -i '/AT_SETUP(\[FUNCTION ANNUITY\])/a AT_SKIP_IF(\[true\])' tests/testsuite.src/run_functions.at - sed -i '/AT_SETUP(\[FUNCTION INTEGER\])/a AT_SKIP_IF(\[true\])' tests/testsuite.src/run_functions.at - sed -i '/AT_SETUP(\[FUNCTION MOD (valid)\])/a AT_SKIP_IF(\[true\])' tests/testsuite.src/run_functions.at - sed -i '/AT_SETUP(\[FUNCTION SECONDS-FROM-FORMATTED-TIME\])/a AT_SKIP_IF(\[true\])' tests/testsuite.src/run_functions.at - sed -i '/AT_SETUP(\[GCOS floating-point usages\])/a AT_SKIP_IF(\[true\])' tests/testsuite.src/run_extensions.at - sed -i '/AT_SETUP(\[BINARY: 64bit unsigned arithmetic notrunc\])/a AT_SKIP_IF(\[true\])' tests/testsuite.src/data_binary.at - sed -i '/AT_SETUP(\[DISPLAY: ADD and SUBTRACT w\/o SIZE ERROR\])/a AT_SKIP_IF(\[true\])' tests/testsuite.src/data_display.at - sed -i '/AT_SETUP(\[DISPLAY: ADD and SUBTRACT, all ROUNDED MODEs\])/a AT_SKIP_IF(\[true\])' tests/testsuite.src/data_display.at - sed -i '/AT_SETUP(\[BCD ADD and SUBTRACT w\/o SIZE ERROR\])/a AT_SKIP_IF(\[true\])' tests/testsuite.src/data_packed.at - sed -i '/AT_SETUP(\[BCD ADD and SUBTRACT, all ROUNDED MODEs\])/a AT_SKIP_IF(\[true\])' tests/testsuite.src/data_packed.at - - rem Note: the extra CPATH below is only required in debug builds (otherwise gcc invoked from cobc does not find libcob.h [atlocal]), for some reason... - bash -lc "CPATH=$(pwd) make -C build/tests check TESTSUITEFLAGS=\"--jobs=$(($(nproc)+1))\"" - - - name: Upload testsuite-${{ matrix.target }}.log - uses: actions/upload-artifact@v4 - if: failure() - with: - name: testsuite-${{ matrix.target }}.log - path: ${{ env.GITHUB_WORKSPACE }}/build/tests/testsuite.log - - name: Cache newcob.val uses: actions/cache@v4 with: @@ -324,9 +292,10 @@ jobs: save-always: true enableCrossOsArchive: true - # FIXME: The NIST testsuite hangs forever in IF106A - name: Run NIST85 testsuite run: | + rem FIXME: The NIST testsuite hangs forever in IF106A + perl -pi -e 's/^# OBNC1M/\$skip{IF106A} = 1; # OBNC1M/' tests/cobol85/report.pl rem Note: the extra CPATH below is only required in debug builds (otherwise gcc invoked from cobc does not find libcob.h [atlocal]), for some reason... bash -lc "CPATH=$(pwd) make -C build/tests test --jobs=$(($(nproc)+1))" @@ -340,6 +309,38 @@ jobs: build/tests/cobol85/**/*.out build/tests/cobol85/**/duration.txt + - name: Run testsuite + run: | + sed -i '/AT_SETUP(\[temporary path invalid\])/a AT_XFAIL_IF(\[true\])' tests/testsuite.src/used_binaries.at + + sed -i '/AT_SETUP(\[Compare FLOAT-LONG with floating-point literal\])/a AT_XFAIL_IF(\[true\])' tests/testsuite.src/run_fundamental.at + sed -i '/AT_SETUP(\[Numeric operations (3) PACKED-DECIMAL\])/a AT_XFAIL_IF(\[true\])' tests/testsuite.src/run_fundamental.at + sed -i '/AT_SETUP(\[Numeric operations (7)\])/a AT_XFAIL_IF(\[true\])' tests/testsuite.src/run_fundamental.at + sed -i '/AT_SETUP(\[integer arithmetic on floating-point var\])/a AT_XFAIL_IF(\[true\])' tests/testsuite.src/run_fundamental.at + sed -i '/AT_SETUP(\[FLOAT-DECIMAL w\/o SIZE ERROR\])/a AT_XFAIL_IF(\[true\])' tests/testsuite.src/run_misc.at + sed -i '/AT_SETUP(\[FLOAT-SHORT \/ FLOAT-LONG w\/o SIZE ERROR\])/a AT_XFAIL_IF(\[true\])' tests/testsuite.src/run_misc.at + sed -i '/AT_SETUP(\[FLOAT-LONG with SIZE ERROR\])/a AT_XFAIL_IF(\[true\])' tests/testsuite.src/run_misc.at + sed -i '/AT_SETUP(\[FUNCTION ANNUITY\])/a AT_XFAIL_IF(\[true\])' tests/testsuite.src/run_functions.at + sed -i '/AT_SETUP(\[FUNCTION INTEGER\])/a AT_XFAIL_IF(\[true\])' tests/testsuite.src/run_functions.at + sed -i '/AT_SETUP(\[FUNCTION MOD (valid)\])/a AT_XFAIL_IF(\[true\])' tests/testsuite.src/run_functions.at + sed -i '/AT_SETUP(\[FUNCTION SECONDS-FROM-FORMATTED-TIME\])/a AT_XFAIL_IF(\[true\])' tests/testsuite.src/run_functions.at + sed -i '/AT_SETUP(\[GCOS floating-point usages\])/a AT_XFAIL_IF(\[true\])' tests/testsuite.src/run_extensions.at + sed -i '/AT_SETUP(\[BINARY: 64bit unsigned arithmetic notrunc\])/a AT_XFAIL_IF(\[true\])' tests/testsuite.src/data_binary.at + sed -i '/AT_SETUP(\[DISPLAY: ADD and SUBTRACT w\/o SIZE ERROR\])/a AT_XFAIL_IF(\[true\])' tests/testsuite.src/data_display.at + sed -i '/AT_SETUP(\[DISPLAY: ADD and SUBTRACT, all ROUNDED MODEs\])/a AT_XFAIL_IF(\[true\])' tests/testsuite.src/data_display.at + sed -i '/AT_SETUP(\[BCD ADD and SUBTRACT w\/o SIZE ERROR\])/a AT_XFAIL_IF(\[true\])' tests/testsuite.src/data_packed.at + sed -i '/AT_SETUP(\[BCD ADD and SUBTRACT, all ROUNDED MODEs\])/a AT_XFAIL_IF(\[true\])' tests/testsuite.src/data_packed.at + + rem Note: the extra CPATH below is only required in debug builds (otherwise gcc invoked from cobc does not find libcob.h [atlocal]), for some reason... + bash -lc "CPATH=$(pwd) make -C build/tests check TESTSUITEFLAGS=\"--jobs=$(($(nproc)+1))\"" + + - name: Upload testsuite-${{ matrix.target }}.log + uses: actions/upload-artifact@v4 + # if: failure() -> always upload as build result documentation + with: + name: testsuite-${{ matrix.target }}.log + path: ${{ env.GITHUB_WORKSPACE }}/build/tests/testsuite.log + - name: Package GnuCOBOL run: | bash -lc "make -C build distmingw"